expose options better

This commit is contained in:
Malte E 2022-03-27 22:32:29 +02:00
parent af17e4f8c0
commit d7cb2bd647
2 changed files with 67 additions and 16 deletions

View File

@ -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

View File

@ -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
}
ComboBox {
id: newRoomPreset
Layout.preferredWidth: implicitWidth
ToggleButton {
Layout.alignment: Qt.AlignRight
model: [qsTr("Private Chat"), qsTr("Public Chat"), qsTr("Trusted Private Chat")]
Layout.preferredWidth: implicitWidth
id: isTrusted
checked: false
enabled: isPrivate.checked
}
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
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();