Fix notification.
This commit is contained in:
parent
a7f62c13b0
commit
f0dd0a4c1d
|
@ -472,7 +472,7 @@ Rectangle {
|
||||||
color: "#273338"
|
color: "#273338"
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemDelegate {
|
RippleEffect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
onClicked: errorControl.visible = false
|
onClicked: errorControl.visible = false
|
||||||
|
|
|
@ -298,9 +298,6 @@ Item {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
id: roomPanelInput
|
id: roomPanelInput
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: 48
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import Spectral 0.1
|
||||||
|
|
||||||
import "qrc:/js/md.js" as Markdown
|
import "qrc:/js/md.js" as Markdown
|
||||||
|
|
||||||
Rectangle {
|
Control {
|
||||||
property bool isReply
|
property bool isReply
|
||||||
property string replyUserID
|
property string replyUserID
|
||||||
property string replyEventID
|
property string replyEventID
|
||||||
|
@ -23,13 +23,16 @@ Rectangle {
|
||||||
property int autoCompleteBeginPosition
|
property int autoCompleteBeginPosition
|
||||||
property int autoCompleteEndPosition
|
property int autoCompleteEndPosition
|
||||||
|
|
||||||
color: MSettings.darkTheme ? "#303030" : "#fafafa"
|
padding: 0
|
||||||
|
|
||||||
radius: height / 2
|
background: Rectangle {
|
||||||
|
color: MSettings.darkTheme ? "#303030" : "#fafafa"
|
||||||
|
radius: 24
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: ElevationEffect {
|
layer.effect: ElevationEffect {
|
||||||
elevation: 1
|
elevation: 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
|
@ -102,12 +105,12 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
contentItem: RowLayout {
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
id: uploadButton
|
id: uploadButton
|
||||||
visible: !isReply
|
visible: !isReply
|
||||||
|
|
||||||
|
@ -135,22 +138,15 @@ Rectangle {
|
||||||
onClicked: clearReply()
|
onClicked: clearReply()
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 48
|
|
||||||
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
property real progress: 0
|
property real progress: 0
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
id: inputField
|
id: inputField
|
||||||
|
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
placeholderText: isReply ? "Reply to " + replyUserID : "Send a Message"
|
placeholderText: isReply ? "Reply to " + replyUserID : "Send a Message"
|
||||||
leftPadding: 16
|
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
@ -298,9 +294,10 @@ Rectangle {
|
||||||
currentRoom.postPlainText(text)
|
currentRoom.postPlainText(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
id: emojiButton
|
id: emojiButton
|
||||||
|
|
||||||
contentItem: MaterialIcon {
|
contentItem: MaterialIcon {
|
||||||
|
|
11
qml/main.qml
11
qml/main.qml
|
@ -55,7 +55,7 @@ ApplicationWindow {
|
||||||
quitOnLastWindowClosed: !MSettings.showTray
|
quitOnLastWindowClosed: !MSettings.showTray
|
||||||
|
|
||||||
onNotificationClicked: {
|
onNotificationClicked: {
|
||||||
roomForm.enteredRoom = spectralController.connection.room(roomId)
|
roomListForm.enteredRoom = spectralController.connection.room(roomId)
|
||||||
roomForm.goToEvent(eventId)
|
roomForm.goToEvent(eventId)
|
||||||
showWindow()
|
showWindow()
|
||||||
}
|
}
|
||||||
|
@ -131,12 +131,15 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
onVisibleChanged: {
|
||||||
spectralController.onErrorOccured.connect(function(error, detail) {
|
if (visible) spectralController.onErrorOccured.connect(showError)
|
||||||
|
else spectralController.onErrorOccured.disconnect(showError)
|
||||||
|
}
|
||||||
|
|
||||||
|
function showError(error, detail) {
|
||||||
loginDialog.busy = false
|
loginDialog.busy = false
|
||||||
loginButtonTooltip.text = error + ": " + detail
|
loginButtonTooltip.text = error + ": " + detail
|
||||||
loginButtonTooltip.open()
|
loginButtonTooltip.open()
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function doLogin() {
|
function doLogin() {
|
||||||
|
|
Loading…
Reference in New Issue