added room settings qml

This commit is contained in:
Jedi18 2021-02-09 23:11:39 +05:30
parent e0207ff337
commit 37679ac57e
5 changed files with 179 additions and 2 deletions

View file

@ -0,0 +1,157 @@
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.2
import QtQuick.Window 2.3
import im.nheko 1.0
ApplicationWindow {
id: roomSettingsDialog
property var roomSettings
x: MainWindow.x + (MainWindow.width / 2) - (width / 2)
y: MainWindow.y + (MainWindow.height / 2) - (height / 2)
height: 600
width: 420
minimumHeight: 420
palette: colors
color: colors.window
title: "Room Settings"
modality: Qt.Modal
Shortcut {
sequence: StandardKey.Cancel
onActivated: roomSettingsDialog.close()
}
ColumnLayout {
id: contentLayout
anchors.fill: parent
anchors.margins: 10
spacing: 10
Avatar {
url: ""
height: 130
width: 130
displayName: ""
userid: ""
Layout.alignment: Qt.AlignHCenter
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
MatrixText {
text: "room name"
font.pixelSize: 24
Layout.alignment: Qt.AlignHCenter
}
MatrixText {
text: "1 member"
Layout.alignment: Qt.AlignHCenter
}
}
ImageButton {
Layout.alignment: Qt.AlignHCenter
image: ":/icons/icons/ui/edit.png"
}
MatrixText {
text: "SETTINGS"
}
RowLayout {
MatrixText {
text: "Notifications"
}
Item {
Layout.fillWidth: true
}
ComboBox {
model: [ "Muted", "Mentions only", "All messages" ]
}
}
RowLayout {
MatrixText {
text: "Room access"
}
ComboBox {
Layout.fillWidth: true
model: [ "Anyone and guests", "Anyone", "Invited users" ]
}
}
RowLayout {
MatrixText {
text: "Encryption"
}
Item {
Layout.fillWidth: true
}
Switch {
}
}
RowLayout {
MatrixText {
text: "Respond to key requests"
}
Item {
Layout.fillWidth: true
}
Switch {
}
}
MatrixText {
text: "INFO"
}
RowLayout {
MatrixText {
text: "Internal ID"
}
Item {
Layout.fillWidth: true
}
MatrixText {
text: "asdajdhasjkdhaskjdhasjdks"
font.pixelSize: 12
}
}
RowLayout {
MatrixText {
text: "Room Version"
}
Item {
Layout.fillWidth: true
}
MatrixText {
text: "6"
font.pixelSize: 12
}
}
Button {
Layout.alignment: Qt.AlignRight
text: "Ok"
}
}
}

View file

@ -52,6 +52,14 @@ Page {
}
Component {
id: roomSettingsComponent
RoomSettings {
}
}
Component {
id: mobileCallInviteDialog
@ -166,6 +174,14 @@ Page {
}
}
Connections {
target: TimelineManager
onOpenRoomSettingsDialog: {
var roomSettings = roomSettingsComponent.createObject(timelineRoot);
roomSettings.show();
}
}
Connections {
target: CallManager
onNewInviteState: {

View file

@ -139,6 +139,7 @@
<file>qml/TimelineRow.qml</file>
<file>qml/TopBar.qml</file>
<file>qml/TypingIndicator.qml</file>
<file>qml/RoomSettings.qml</file>
<file>qml/emoji/EmojiButton.qml</file>
<file>qml/emoji/EmojiPicker.qml</file>
<file>qml/UserProfile.qml</file>