diff options
Diffstat (limited to 'resources/qml')
-rw-r--r-- | resources/qml/MessageInputWarning.qml | 5 | ||||
-rw-r--r-- | resources/qml/TimelineView.qml | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/resources/qml/MessageInputWarning.qml b/resources/qml/MessageInputWarning.qml index af65ebc1..9b0b0907 100644 --- a/resources/qml/MessageInputWarning.qml +++ b/resources/qml/MessageInputWarning.qml @@ -11,6 +11,7 @@ Rectangle { id: warningRoot required property string text + property color bubbleColor: Nheko.theme.error implicitHeight: visible ? warningDisplay.implicitHeight + 4 * Nheko.paddingSmall : 0 height: implicitHeight @@ -22,9 +23,9 @@ Rectangle { visible: warningRoot.visible // TODO: Qt.alpha() would make more sense but it wasn't working... - color: Qt.rgba(Nheko.theme.error.r, Nheko.theme.error.g, Nheko.theme.error.b, 0.3) + color: Qt.rgba(bubbleColor.r, bubbleColor.g, bubbleColor.b, 0.3) border.width: 1 - border.color: Nheko.theme.error + border.color: bubbleColor radius: 3 anchors.fill: parent anchors.margins: visible ? Nheko.paddingSmall : 0 diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index f0e71c60..abda16b9 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -160,7 +160,13 @@ Item { MessageInputWarning { text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(room ? room.input.currentCommand : "") - visible: room ? room.input.containsInvalidCommand : false + visible: room ? room.input.containsInvalidCommand && !room.input.containsIncompleteCommand : false + } + + MessageInputWarning { + text: qsTr("/%1 looks like an incomplete command. To send it anyway, add a space to the end of your message.").arg(room ? room.input.currentCommand : "") + visible: room ? room.input.containsIncompleteCommand : false + bubbleColor: Nheko.theme.orange } ReplyPopup { |