Eventdelegate: Merge menu print and debug console
Also fix avatar-message spacing
This commit is contained in:
parent
5674d0c7b7
commit
7c42066d75
2
TODO.md
2
TODO.md
|
@ -11,7 +11,6 @@
|
|||
- When qml syntax highlighting supports ES6 string interpolation, use them
|
||||
|
||||
- Fixes
|
||||
- Scroll to begin/end
|
||||
- `minutesBetween()` for 13:13:58 and 14:15:07
|
||||
- `# > quote` doesn't color
|
||||
- Pressing backspace in composer sometimes doesn't work
|
||||
|
@ -42,6 +41,7 @@
|
|||
- Copy to X11 selection
|
||||
- Link previews
|
||||
- Take the previews into account to calculate delegate min height
|
||||
- Support images not just at the end of the message
|
||||
|
||||
- Just use Shortcut onHeld instead of analyzing the current velocity
|
||||
in `smartVerticalFlick()`
|
||||
|
|
|
@ -5,7 +5,7 @@ import "../../utils.js" as Utils
|
|||
|
||||
Row {
|
||||
id: eventContent
|
||||
spacing: theme.spacing / 2
|
||||
spacing: theme.spacing / 1.25
|
||||
|
||||
readonly property string eventText: Utils.processedEventText(model)
|
||||
readonly property string eventTime: Utils.formatTime(model.date)
|
||||
|
|
|
@ -53,6 +53,19 @@ Column {
|
|||
property string hoveredImage: ""
|
||||
|
||||
|
||||
function json() {
|
||||
return JSON.stringify(
|
||||
Utils.getItem(
|
||||
modelSources[[
|
||||
"Event", chatPage.userId, chatPage.roomId
|
||||
]],
|
||||
"client_id",
|
||||
model.client_id
|
||||
),
|
||||
null, 4)
|
||||
}
|
||||
|
||||
|
||||
Daybreak {
|
||||
visible: dayBreak
|
||||
width: eventDelegate.width
|
||||
|
@ -114,26 +127,14 @@ Column {
|
|||
Utils.copyToClipboard(selectableLabelContainer.joinedSelection)
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
icon.name: "settings"
|
||||
text: qsTr("Print event item")
|
||||
visible: debugMode
|
||||
onTriggered: print(JSON.stringify(Utils.getItem(
|
||||
modelSources[[
|
||||
"Event", chatPage.userId, chatPage.roomId
|
||||
]],
|
||||
"client_id",
|
||||
model.client_id
|
||||
), null, 4))
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
icon.name: "settings"
|
||||
text: qsTr("Set as debug console target")
|
||||
visible: debugMode
|
||||
onTriggered: {
|
||||
mainUI.debugConsole.target = [eventDelegate, eventContent]
|
||||
mainUI.debugConsole.runJS("t[0].json()")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ Window {
|
|||
wrapMode: Text.Wrap
|
||||
color: theme.chat.message.quote
|
||||
font.family: theme.fontFamily.mono
|
||||
visible: model.input
|
||||
visible: Boolean(model.input)
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ Window {
|
|||
color: model.error ?
|
||||
theme.colors.errorText : theme.colors.text
|
||||
font.family: theme.fontFamily.mono
|
||||
visible: model.output
|
||||
visible: Boolean(model.output)
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user