diff options
author | Malte E <malte.e@mailbox.org> | 2022-03-27 22:32:29 +0200 |
---|---|---|
committer | Malte E <malte.e@mailbox.org> | 2022-03-28 22:06:18 +0200 |
commit | d7cb2bd64734adb6938b85ac28075c2c8e8d25e0 (patch) | |
tree | e7588cc710565621dd44ddde7cc062b62d5319a1 /resources | |
parent | run lint (diff) | |
download | nheko-d7cb2bd64734adb6938b85ac28075c2c8e8d25e0.tar.xz |
expose options better
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/dialogs/CreateDirect.qml | 4 | ||||
-rw-r--r-- | resources/qml/dialogs/CreateRoom.qml | 77 |
2 files changed, 66 insertions, 15 deletions
diff --git a/resources/qml/dialogs/CreateDirect.qml b/resources/qml/dialogs/CreateDirect.qml index b76e728a..3ae0b72d 100644 --- a/resources/qml/dialogs/CreateDirect.qml +++ b/resources/qml/dialogs/CreateDirect.qml @@ -19,6 +19,10 @@ ApplicationWindow { minimumHeight: layout.implicitHeight+2*layout.anchors.margins+footer.height minimumWidth: footer.width + Shortcut { + sequence: StandardKey.Cancel + onActivated: roomDirectoryWindow.close() + } DelegateModel { id: dMod model: profile? profile.deviceList : undefined diff --git a/resources/qml/dialogs/CreateRoom.qml b/resources/qml/dialogs/CreateRoom.qml index 85db8f10..c000642d 100644 --- a/resources/qml/dialogs/CreateRoom.qml +++ b/resources/qml/dialogs/CreateRoom.qml @@ -15,6 +15,10 @@ ApplicationWindow { title: qsTr("Create Room") minimumWidth: rootLayout.implicitWidth+2*rootLayout.anchors.margins minimumHeight: rootLayout.implicitHeight+footer.implicitHeight+2*rootLayout.anchors.margins + Shortcut { + sequence: StandardKey.Cancel + onActivated: createRoomRoot.close() + } GridLayout { id: rootLayout anchors.fill: parent @@ -36,43 +40,86 @@ ApplicationWindow { focus: true placeholderText: qsTr("Topic") } - MatrixTextField { - id: newRoomAlias + RowLayout { Layout.columnSpan: 2 Layout.fillWidth: true - - focus: true - placeholderText: qsTr("Alias") + Label { + Layout.preferredWidth: implicitWidth + text: qsTr("#") + color: Nheko.colors.text + } + MatrixTextField { + id: newRoomAlias + focus: true + placeholderText: qsTr("Alias") + } + Label { + Layout.preferredWidth: implicitWidth + property string userName: userInfoGrid.profile.userid + text: userName.substring(userName.indexOf(":")) + color: Nheko.colors.text + } } Label { Layout.preferredWidth: implicitWidth Layout.alignment: Qt.AlignLeft - text: qsTr("Room Visibility") + text: qsTr("Private") color: Nheko.colors.text + HoverHandler { + id: privateHover + } + ToolTip.visible: privateHover.hovered + ToolTip.text: qsTr("Only invited users can join the room") + ToolTip.delay: Nheko.tooltipDelay } - ComboBox { - id: newRoomVisibility - Layout.preferredWidth: implicitWidth + ToggleButton { Layout.alignment: Qt.AlignRight - model: [qsTr("Private"), qsTr("Public")] + Layout.preferredWidth: implicitWidth + id: isPrivate + checked: true } Label { Layout.preferredWidth: implicitWidth Layout.alignment: Qt.AlignLeft - text: qsTr("Room Preset") + text: qsTr("Trusted") color: Nheko.colors.text + HoverHandler { + id: trustedHover + } + ToolTip.visible: trustedHover.hovered + ToolTip.text: qsTr("All invitees are given the same power level as the creator") + ToolTip.delay: Nheko.tooltipDelay + } + ToggleButton { + Layout.alignment: Qt.AlignRight + Layout.preferredWidth: implicitWidth + id: isTrusted + checked: false + enabled: isPrivate.checked } - ComboBox { - id: newRoomPreset + Label { Layout.preferredWidth: implicitWidth + Layout.alignment: Qt.AlignLeft + text: qsTr("Encryption") + color: Nheko.colors.text + HoverHandler { + id: encryptionHover + } + ToolTip.visible: encryptionHover.hovered + ToolTip.text: qsTr("Caution: Encryption cannot be disabled") + ToolTip.delay: Nheko.tooltipDelay + } + ToggleButton { Layout.alignment: Qt.AlignRight - model: [qsTr("Private Chat"), qsTr("Public Chat"), qsTr("Trusted Private Chat")] + Layout.preferredWidth: implicitWidth + id: isEncrypted + checked: false } } footer: DialogButtonBox { standardButtons: DialogButtonBox.Cancel Button { - text: "Create Room" + text: qsTr("Create Room") DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole } onRejected: createRoomRoot.close(); |