Compare commits
1 Commits
master
...
work/nvrwh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db79d35c65 |
@@ -92,7 +92,7 @@ KirigamiComponents.ConvergentContextMenu {
|
||||
const dialog = Qt.createComponent("org.kde.kirigami", "PromptDialog").createObject(QQC2.Overlay.overlay, {
|
||||
title: i18nc("@title", "Verification Request Sent"),
|
||||
subtitle: i18nc("@info:label", "To proceed, accept the verification request on another device."),
|
||||
standardButtons: Kirigami.Dialog.Ok
|
||||
standardButtons: QQC2.Dialog.Ok
|
||||
})
|
||||
dialog.open();
|
||||
root.connection.onNewKeyVerificationSession.connect(() => {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
@@ -11,7 +12,7 @@ import org.kde.kirigamiaddons.delegates as Delegates
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
required property NeoChatConnection connection
|
||||
@@ -23,7 +24,7 @@ Kirigami.Dialog {
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.NoButton
|
||||
standardButtons: QQC2.Dialog.NoButton
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
title: i18nc("@title: dialog to switch between logged in accounts", "Switch Account")
|
||||
|
||||
@@ -8,33 +8,30 @@ import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
required property var user
|
||||
|
||||
width: Math.min(Kirigami.Units.gridUnit * 24, QQC2.ApplicationWindow.window.width)
|
||||
height: Kirigami.Units.gridUnit * 8
|
||||
|
||||
standardButtons: QQC2.Dialog.Close
|
||||
title: i18nc("@title:dialog", "Start a chat")
|
||||
subtitle: i18n("Do you want to start a chat with %1?", root.user.displayName)
|
||||
dialogType: Kirigami.PromptDialog.Warning
|
||||
|
||||
contentItem: QQC2.Label {
|
||||
text: i18n("Do you want to start a chat with %1?", root.user.displayName)
|
||||
textFormat: Text.PlainText
|
||||
wrapMode: Text.Wrap
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
onRejected: {
|
||||
root.close();
|
||||
}
|
||||
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
text: i18nc("@action:button", "Start Chat")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "im-user"
|
||||
onTriggered: {
|
||||
onClicked: {
|
||||
root.user.requestDirectChat();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,32 +8,30 @@ import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
required property string url
|
||||
|
||||
width: Math.min(Kirigami.Units.gridUnit * 24, QQC2.ApplicationWindow.window.width)
|
||||
height: Kirigami.Units.gridUnit * 8
|
||||
leftPadding: Kirigami.Units.largeSpacing
|
||||
rightPadding: Kirigami.Units.largeSpacing
|
||||
|
||||
title: i18nc("@title:dialog", "User Consent")
|
||||
subtitle: i18nc("@info", "Your homeserver requires you to agree to its terms and conditions before being able to use it. Please click the button below to read them.")
|
||||
dialogType: Kirigami.PromptDialog.Warning
|
||||
|
||||
contentItem: QQC2.Label {
|
||||
text: i18nc("@info", "Your homeserver requires you to agree to its terms and conditions before being able to use it. Please click the button below to read them.")
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
onRejected: {
|
||||
root.close();
|
||||
}
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
text: i18nc("@action:button", "Open")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "internet-services"
|
||||
onTriggered: {
|
||||
onClicked: {
|
||||
UrlHelper.openUrl(root.url);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.kde.prison
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
required property string room
|
||||
@@ -23,7 +23,7 @@ Kirigami.Dialog {
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.NoButton
|
||||
standardButtons: QQC2.Dialog.NoButton
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
title: i18nc("@title:dialog", "Join Room")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Window
|
||||
import QtQuick.Layouts
|
||||
|
||||
@@ -10,7 +11,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
/**
|
||||
@@ -31,35 +32,41 @@ Kirigami.Dialog {
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
footer: QQC2.DialogButtonBox {
|
||||
QQC2.Button {
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
enabled: roomIdAliasText.isValidText
|
||||
text: i18n("OK")
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
// We don't necessarily have all the info so fill out the best we can.
|
||||
let roomId = roomIdAliasText.isAlias() ? "" : roomIdAliasText.text;
|
||||
let displayName = "";
|
||||
let avatarUrl = "";
|
||||
let alias = roomIdAliasText.isAlias() ? roomIdAliasText.text : "";
|
||||
let topic = "";
|
||||
let memberCount = -1;
|
||||
let isJoined = false;
|
||||
if (roomIdAliasText.room) {
|
||||
roomId = roomIdAliasText.room.id;
|
||||
displayName = roomIdAliasText.room.displayName;
|
||||
avatarUrl = roomIdAliasText.room.avatarUrl.toString().length > 0 ? connection.makeMediaUrl(roomIdAliasText.room.avatarUrl) : "";
|
||||
alias = roomIdAliasText.room.canonicalAlias;
|
||||
topic = roomIdAliasText.room.topic;
|
||||
memberCount = roomIdAliasText.room.joinedCount;
|
||||
isJoined = true;
|
||||
}
|
||||
root.roomSelected(roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
QQC2.Button {
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole
|
||||
text: i18n("Cancel")
|
||||
icon.name: "dialog-cancel"
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
// We don't necessarily have all the info so fill out the best we can.
|
||||
let roomId = roomIdAliasText.isAlias() ? "" : roomIdAliasText.text;
|
||||
let displayName = "";
|
||||
let avatarUrl = "";
|
||||
let alias = roomIdAliasText.isAlias() ? roomIdAliasText.text : "";
|
||||
let topic = "";
|
||||
let memberCount = -1;
|
||||
let isJoined = false;
|
||||
if (roomIdAliasText.room) {
|
||||
roomId = roomIdAliasText.room.id;
|
||||
displayName = roomIdAliasText.room.displayName;
|
||||
avatarUrl = roomIdAliasText.room.avatarUrl.toString().length > 0 ? connection.makeMediaUrl(roomIdAliasText.room.avatarUrl) : "";
|
||||
alias = roomIdAliasText.room.canonicalAlias;
|
||||
topic = roomIdAliasText.room.topic;
|
||||
memberCount = roomIdAliasText.room.joinedCount;
|
||||
isJoined = true;
|
||||
}
|
||||
root.roomSelected(roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined);
|
||||
root.close();
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
/**
|
||||
@@ -31,19 +31,6 @@ Kirigami.Dialog {
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
enabled: userIdText.isValidText
|
||||
text: i18n("OK")
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
root.connection.requestDirectChat(userIdText.text);
|
||||
root.accept();
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
FormCard.FormTextFieldDelegate {
|
||||
@@ -75,6 +62,21 @@ Kirigami.Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
enabled: userIdText.isValidText
|
||||
text: i18n("OK")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "dialog-ok"
|
||||
onClicked: {
|
||||
root.connection.requestDirectChat(userIdText.text);
|
||||
root.accept();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
userIdText.forceActiveFocus();
|
||||
timer.restart();
|
||||
|
||||
@@ -15,27 +15,18 @@ import Quotient
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
required property NeoChatRoom room
|
||||
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
enabled: optionModel.allValuesSet && questionTextField.text.length > 0
|
||||
text: i18nc("@action:button", "Send")
|
||||
icon.name: "document-send"
|
||||
onTriggered: {
|
||||
root.room.postPoll(pollTypeCombo.currentValue, questionTextField.text, optionModel.values())
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
]
|
||||
title: i18nc("@title: create new poll in the room", "Create Poll")
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
title: i18nc("@title: create new poll in the room", "Create Poll")
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
@@ -153,4 +144,19 @@ Kirigami.Dialog {
|
||||
onClicked: optionModel.append({optionText: ""})
|
||||
}
|
||||
}
|
||||
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
enabled: optionModel.allValuesSet && questionTextField.text.length > 0
|
||||
text: i18nc("@action:button", "Send")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "document-send"
|
||||
onClicked: {
|
||||
root.room.postPoll(pollTypeCombo.currentValue, questionTextField.text, optionModel.values())
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,13 +10,11 @@ import org.kde.kirigamiaddons.components
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
property var connection
|
||||
|
||||
parent: applicationWindow().overlay
|
||||
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
@@ -9,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
required property NeoChatRoom parentRoom
|
||||
@@ -28,7 +29,7 @@ Kirigami.Dialog {
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
|
||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||
standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
|
||||
|
||||
onAccepted: parentRoom.removeChild(root.roomId, removeOfficalCheck.checked)
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ QQC2.ComboBox {
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: addServerSheet
|
||||
|
||||
width: Math.min(Kirigami.Units.gridUnit * 15, QQC2.ApplicationWindow.window.width)
|
||||
@@ -182,15 +182,19 @@ QQC2.ComboBox {
|
||||
}
|
||||
}
|
||||
|
||||
customFooterActions: Kirigami.Action {
|
||||
text: i18nc("@action:button", "Ok")
|
||||
enabled: serverUrlField.acceptableInput && serverUrlField.isValidServer
|
||||
onTriggered: {
|
||||
serverListModel.addServer(serverUrlField.text);
|
||||
root.currentIndex = root.indexOfValue(serverUrlField.text);
|
||||
root.server = root.currentValue;
|
||||
serverUrlField.text = "";
|
||||
addServerSheet.close();
|
||||
footer: QQC2.DialogButtonBox {
|
||||
QQC2.Button {
|
||||
enabled: serverUrlField.acceptableInput && serverUrlField.isValidServer
|
||||
text: i18nc("@action:button", "Ok")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "dialog-ok"
|
||||
onClicked: {
|
||||
serverListModel.addServer(serverUrlField.text);
|
||||
root.currentIndex = root.indexOfValue(serverUrlField.text);
|
||||
root.server = root.currentValue;
|
||||
serverUrlField.text = "";
|
||||
addServerSheet.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.kde.prison
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
// This dialog is sometimes used outside the context of a room, e.g., when scanning a user's QR code.
|
||||
@@ -28,7 +28,7 @@ Kirigami.Dialog {
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.NoButton
|
||||
standardButtons: QQC2.Dialog.NoButton
|
||||
|
||||
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||
title: i18nc("@title:menu Account details dialog", "Account Details")
|
||||
|
||||
@@ -123,7 +123,7 @@ QQC2.Control {
|
||||
displayHint: QQC2.AbstractButton.IconOnly
|
||||
|
||||
onTriggered: {
|
||||
newPollDialog.createObject(QQC2.Overlay.overlay, {
|
||||
newPollDialog.createObject(root.QQC2.Overlay.overlay, {
|
||||
room: root.currentRoom
|
||||
}).open();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ FormCard.FormCardPage {
|
||||
visible: !root.connection
|
||||
}
|
||||
|
||||
property Kirigami.Dialog passwordSheet: Kirigami.Dialog {
|
||||
property QQC2.Dialog passwordSheet: QQC2.Dialog {
|
||||
id: passwordSheet
|
||||
|
||||
property string deviceId
|
||||
@@ -74,7 +74,6 @@ FormCard.FormCardPage {
|
||||
|
||||
title: i18n("Remove device")
|
||||
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
FormCard.FormCard {
|
||||
FormCard.FormTextFieldDelegate {
|
||||
id: passwordField
|
||||
@@ -82,16 +81,19 @@ FormCard.FormCardPage {
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
}
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
text: i18nc("As in 'Remove this device'", "Remove")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "delete"
|
||||
onTriggered: {
|
||||
onClicked: {
|
||||
devicesModel.logout(passwordSheet.deviceId, passwordField.text);
|
||||
passwordField.text = "";
|
||||
passwordSheet.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
signal submitPassword(string password)
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
title: i18nc("@title", "Edit User Power Level")
|
||||
|
||||
@@ -19,8 +19,17 @@ Kirigami.Dialog {
|
||||
property int powerLevel
|
||||
|
||||
width: Kirigami.Units.gridUnit * 24
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: QQC2.Dialog.NoButton
|
||||
standardButtons: QQC2.Dialog.Ok
|
||||
onAccepted: {
|
||||
root.room.setUserPowerLevel(root.userId, powerLevelComboBox.currentValue);
|
||||
root.close();
|
||||
root.destroy();
|
||||
}
|
||||
|
||||
onOpened: {
|
||||
if (root.opened) {
|
||||
@@ -38,15 +47,4 @@ Kirigami.Dialog {
|
||||
valueRole: "value"
|
||||
}
|
||||
}
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Confirm")
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
root.room.setUserPowerLevel(root.userId, powerLevelComboBox.currentValue);
|
||||
root.close();
|
||||
root.destroy();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -416,14 +416,20 @@ FormCard.FormCardPage {
|
||||
}
|
||||
}
|
||||
|
||||
property Kirigami.Dialog roomUpgradeDialog: Kirigami.Dialog {
|
||||
property QQC2.Dialog roomUpgradeDialog: QQC2.Dialog {
|
||||
id: roomUpgradeDialog
|
||||
|
||||
property var currentRoomVersion
|
||||
|
||||
width: Kirigami.Units.gridUnit * 16
|
||||
|
||||
title: i18n("Upgrade the Room")
|
||||
|
||||
width: Kirigami.Units.gridUnit * 16
|
||||
standardButtons: QQC2.Dialog.Ok
|
||||
onAccepted: {
|
||||
room.switchVersion(spinBox.value);
|
||||
roomUpgradeDialog.close();
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
FormCard.FormSpinBoxDelegate {
|
||||
id: spinBox
|
||||
@@ -433,15 +439,5 @@ FormCard.FormCardPage {
|
||||
value: room.version
|
||||
}
|
||||
}
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Confirm")
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
room.switchVersion(spinBox.value);
|
||||
roomUpgradeDialog.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,14 +11,15 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
title: i18nc("@title:dialog", "Custom Room Sort Order")
|
||||
|
||||
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
||||
height: Math.min(parent.height, Kirigami.Units.gridUnit * 24)
|
||||
padding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||
standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
|
||||
|
||||
Component.onCompleted: {
|
||||
header.background.children[0].visible = true
|
||||
@@ -117,14 +118,15 @@ Kirigami.Dialog {
|
||||
Component {
|
||||
id: addParameterDialogComponent
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: addParameterDialog
|
||||
title: i18nc("@title:dialog", "Select Parameter to Add")
|
||||
|
||||
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
||||
height: Math.min(parent.height, Kirigami.Units.gridUnit * 24)
|
||||
padding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
Component.onCompleted: {
|
||||
header.background.children[0].visible = true
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.kde.neochat
|
||||
/**
|
||||
* @brief A dialog to select a parent space to add to a given room.
|
||||
*/
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
/**
|
||||
@@ -24,24 +24,26 @@ Kirigami.Dialog {
|
||||
|
||||
title: i18nc("@title", "Select new official parent")
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
width: Math.min(root.parent.width, Kirigami.Units.gridUnit * 24)
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
standardButtons: Kirigami.Dialog.Cancel
|
||||
customFooterActions: [
|
||||
Kirigami.Action {
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
enabled: chosenRoomDelegate.visible && root.room.canModifyParent(chosenRoomDelegate.roomId)
|
||||
text: i18n("OK")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
onClicked: {
|
||||
root.room.addParent(chosenRoomDelegate.roomId, makeCanonicalCheck.checked, existingOfficialCheck.checked);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
@@ -13,7 +13,7 @@ import Quotient
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.Dialog {
|
||||
QQC2.Dialog {
|
||||
id: root
|
||||
|
||||
/**
|
||||
@@ -26,17 +26,15 @@ Kirigami.Dialog {
|
||||
*/
|
||||
property list<string> restrictedIds: room.restrictedIds
|
||||
|
||||
parent: applicationWindow().overlay
|
||||
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||
width: Math.min(root.parent.width, Kirigami.Units.gridUnit * 24)
|
||||
title: i18nc("@title", "Select Spaces")
|
||||
|
||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||
standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
|
||||
onAccepted: {
|
||||
let ids = [];
|
||||
for (var i in spaceGroup.buttons) {
|
||||
|
||||
Reference in New Issue
Block a user