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, {
|
const dialog = Qt.createComponent("org.kde.kirigami", "PromptDialog").createObject(QQC2.Overlay.overlay, {
|
||||||
title: i18nc("@title", "Verification Request Sent"),
|
title: i18nc("@title", "Verification Request Sent"),
|
||||||
subtitle: i18nc("@info:label", "To proceed, accept the verification request on another device."),
|
subtitle: i18nc("@info:label", "To proceed, accept the verification request on another device."),
|
||||||
standardButtons: Kirigami.Dialog.Ok
|
standardButtons: QQC2.Dialog.Ok
|
||||||
})
|
})
|
||||||
dialog.open();
|
dialog.open();
|
||||||
root.connection.onNewKeyVerificationSession.connect(() => {
|
root.connection.onNewKeyVerificationSession.connect(() => {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
@@ -11,7 +12,7 @@ import org.kde.kirigamiaddons.delegates as Delegates
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property NeoChatConnection connection
|
required property NeoChatConnection connection
|
||||||
@@ -23,7 +24,7 @@ Kirigami.Dialog {
|
|||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.NoButton
|
standardButtons: QQC2.Dialog.NoButton
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title: dialog to switch between logged in accounts", "Switch Account")
|
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
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
Kirigami.PromptDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var user
|
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")
|
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 {
|
onRejected: {
|
||||||
text: i18n("Do you want to start a chat with %1?", root.user.displayName)
|
root.close();
|
||||||
textFormat: Text.PlainText
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
verticalAlignment: Qt.AlignVCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
customFooterActions: [
|
footer: QQC2.DialogButtonBox {
|
||||||
Kirigami.Action {
|
standardButtons: QQC2.Dialog.Cancel
|
||||||
|
|
||||||
|
QQC2.Button {
|
||||||
text: i18nc("@action:button", "Start Chat")
|
text: i18nc("@action:button", "Start Chat")
|
||||||
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
icon.name: "im-user"
|
icon.name: "im-user"
|
||||||
onTriggered: {
|
onClicked: {
|
||||||
root.user.requestDirectChat();
|
root.user.requestDirectChat();
|
||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,32 +8,30 @@ import org.kde.kirigami as Kirigami
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
Kirigami.PromptDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property string url
|
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")
|
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 {
|
onRejected: {
|
||||||
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.")
|
root.close();
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
verticalAlignment: Qt.AlignVCenter
|
|
||||||
}
|
}
|
||||||
customFooterActions: [
|
|
||||||
Kirigami.Action {
|
footer: QQC2.DialogButtonBox {
|
||||||
|
standardButtons: QQC2.Dialog.Cancel
|
||||||
|
|
||||||
|
QQC2.Button {
|
||||||
text: i18nc("@action:button", "Open")
|
text: i18nc("@action:button", "Open")
|
||||||
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
icon.name: "internet-services"
|
icon.name: "internet-services"
|
||||||
onTriggered: {
|
onClicked: {
|
||||||
UrlHelper.openUrl(root.url);
|
UrlHelper.openUrl(root.url);
|
||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.kde.prison
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property string room
|
required property string room
|
||||||
@@ -23,7 +23,7 @@ Kirigami.Dialog {
|
|||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.NoButton
|
standardButtons: QQC2.Dialog.NoButton
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title:dialog", "Join Room")
|
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
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,35 +32,41 @@ Kirigami.Dialog {
|
|||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Cancel
|
footer: QQC2.DialogButtonBox {
|
||||||
customFooterActions: [
|
QQC2.Button {
|
||||||
Kirigami.Action {
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
enabled: roomIdAliasText.isValidText
|
enabled: roomIdAliasText.isValidText
|
||||||
text: i18n("OK")
|
text: i18n("OK")
|
||||||
icon.name: "dialog-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 {
|
contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,19 +31,6 @@ Kirigami.Dialog {
|
|||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 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 {
|
contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
FormCard.FormTextFieldDelegate {
|
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: {
|
onVisibleChanged: {
|
||||||
userIdText.forceActiveFocus();
|
userIdText.forceActiveFocus();
|
||||||
timer.restart();
|
timer.restart();
|
||||||
|
|||||||
@@ -15,27 +15,18 @@ import Quotient
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property NeoChatRoom room
|
required property NeoChatRoom room
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Cancel
|
title: i18nc("@title: create new poll in the room", "Create Poll")
|
||||||
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
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 {
|
contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -153,4 +144,19 @@ Kirigami.Dialog {
|
|||||||
onClicked: optionModel.append({optionText: ""})
|
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
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property var connection
|
property var connection
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
@@ -9,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property NeoChatRoom parentRoom
|
required property NeoChatRoom parentRoom
|
||||||
@@ -28,7 +29,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
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)
|
onAccepted: parentRoom.removeChild(root.roomId, removeOfficalCheck.checked)
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ QQC2.ComboBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: addServerSheet
|
id: addServerSheet
|
||||||
|
|
||||||
width: Math.min(Kirigami.Units.gridUnit * 15, QQC2.ApplicationWindow.window.width)
|
width: Math.min(Kirigami.Units.gridUnit * 15, QQC2.ApplicationWindow.window.width)
|
||||||
@@ -182,15 +182,19 @@ QQC2.ComboBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customFooterActions: Kirigami.Action {
|
footer: QQC2.DialogButtonBox {
|
||||||
text: i18nc("@action:button", "Ok")
|
QQC2.Button {
|
||||||
enabled: serverUrlField.acceptableInput && serverUrlField.isValidServer
|
enabled: serverUrlField.acceptableInput && serverUrlField.isValidServer
|
||||||
onTriggered: {
|
text: i18nc("@action:button", "Ok")
|
||||||
serverListModel.addServer(serverUrlField.text);
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
root.currentIndex = root.indexOfValue(serverUrlField.text);
|
icon.name: "dialog-ok"
|
||||||
root.server = root.currentValue;
|
onClicked: {
|
||||||
serverUrlField.text = "";
|
serverListModel.addServer(serverUrlField.text);
|
||||||
addServerSheet.close();
|
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
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
// This dialog is sometimes used outside the context of a room, e.g., when scanning a user's QR code.
|
// 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
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.NoButton
|
standardButtons: QQC2.Dialog.NoButton
|
||||||
|
|
||||||
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title:menu Account details dialog", "Account Details")
|
title: i18nc("@title:menu Account details dialog", "Account Details")
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ QQC2.Control {
|
|||||||
displayHint: QQC2.AbstractButton.IconOnly
|
displayHint: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
newPollDialog.createObject(QQC2.Overlay.overlay, {
|
newPollDialog.createObject(root.QQC2.Overlay.overlay, {
|
||||||
room: root.currentRoom
|
room: root.currentRoom
|
||||||
}).open();
|
}).open();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ FormCard.FormCardPage {
|
|||||||
visible: !root.connection
|
visible: !root.connection
|
||||||
}
|
}
|
||||||
|
|
||||||
property Kirigami.Dialog passwordSheet: Kirigami.Dialog {
|
property QQC2.Dialog passwordSheet: QQC2.Dialog {
|
||||||
id: passwordSheet
|
id: passwordSheet
|
||||||
|
|
||||||
property string deviceId
|
property string deviceId
|
||||||
@@ -74,7 +74,6 @@ FormCard.FormCardPage {
|
|||||||
|
|
||||||
title: i18n("Remove device")
|
title: i18n("Remove device")
|
||||||
|
|
||||||
standardButtons: QQC2.Dialog.Cancel
|
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
FormCard.FormTextFieldDelegate {
|
FormCard.FormTextFieldDelegate {
|
||||||
id: passwordField
|
id: passwordField
|
||||||
@@ -82,16 +81,19 @@ FormCard.FormCardPage {
|
|||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
customFooterActions: [
|
footer: QQC2.DialogButtonBox {
|
||||||
Kirigami.Action {
|
standardButtons: QQC2.Dialog.Cancel
|
||||||
|
|
||||||
|
QQC2.Button {
|
||||||
text: i18nc("As in 'Remove this device'", "Remove")
|
text: i18nc("As in 'Remove this device'", "Remove")
|
||||||
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
icon.name: "delete"
|
icon.name: "delete"
|
||||||
onTriggered: {
|
onClicked: {
|
||||||
devicesModel.logout(passwordSheet.deviceId, passwordField.text);
|
devicesModel.logout(passwordSheet.deviceId, passwordField.text);
|
||||||
passwordField.text = "";
|
passwordField.text = "";
|
||||||
passwordSheet.close();
|
passwordSheet.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import QtQuick.Layouts
|
|||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kirigamiaddons.formcard as FormCard
|
import org.kde.kirigamiaddons.formcard as FormCard
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
signal submitPassword(string password)
|
signal submitPassword(string password)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
title: i18nc("@title", "Edit User Power Level")
|
title: i18nc("@title", "Edit User Power Level")
|
||||||
|
|
||||||
@@ -19,8 +19,17 @@ Kirigami.Dialog {
|
|||||||
property int powerLevel
|
property int powerLevel
|
||||||
|
|
||||||
width: Kirigami.Units.gridUnit * 24
|
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: {
|
onOpened: {
|
||||||
if (root.opened) {
|
if (root.opened) {
|
||||||
@@ -38,15 +47,4 @@ Kirigami.Dialog {
|
|||||||
valueRole: "value"
|
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
|
id: roomUpgradeDialog
|
||||||
|
|
||||||
property var currentRoomVersion
|
property var currentRoomVersion
|
||||||
|
|
||||||
width: Kirigami.Units.gridUnit * 16
|
|
||||||
|
|
||||||
title: i18n("Upgrade the Room")
|
title: i18n("Upgrade the Room")
|
||||||
|
|
||||||
|
width: Kirigami.Units.gridUnit * 16
|
||||||
|
standardButtons: QQC2.Dialog.Ok
|
||||||
|
onAccepted: {
|
||||||
|
room.switchVersion(spinBox.value);
|
||||||
|
roomUpgradeDialog.close();
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
FormCard.FormSpinBoxDelegate {
|
FormCard.FormSpinBoxDelegate {
|
||||||
id: spinBox
|
id: spinBox
|
||||||
@@ -433,15 +439,5 @@ FormCard.FormCardPage {
|
|||||||
value: room.version
|
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
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
title: i18nc("@title:dialog", "Custom Room Sort Order")
|
title: i18nc("@title:dialog", "Custom Room Sort Order")
|
||||||
|
|
||||||
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
||||||
height: Math.min(parent.height, 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: {
|
Component.onCompleted: {
|
||||||
header.background.children[0].visible = true
|
header.background.children[0].visible = true
|
||||||
@@ -117,14 +118,15 @@ Kirigami.Dialog {
|
|||||||
Component {
|
Component {
|
||||||
id: addParameterDialogComponent
|
id: addParameterDialogComponent
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: addParameterDialog
|
id: addParameterDialog
|
||||||
title: i18nc("@title:dialog", "Select Parameter to Add")
|
title: i18nc("@title:dialog", "Select Parameter to Add")
|
||||||
|
|
||||||
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
||||||
height: Math.min(parent.height, 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: {
|
Component.onCompleted: {
|
||||||
header.background.children[0].visible = true
|
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.
|
* @brief A dialog to select a parent space to add to a given room.
|
||||||
*/
|
*/
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,24 +24,26 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
title: i18nc("@title", "Select new official parent")
|
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
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Cancel
|
footer: QQC2.DialogButtonBox {
|
||||||
customFooterActions: [
|
standardButtons: QQC2.Dialog.Cancel
|
||||||
Kirigami.Action {
|
|
||||||
|
QQC2.Button {
|
||||||
enabled: chosenRoomDelegate.visible && root.room.canModifyParent(chosenRoomDelegate.roomId)
|
enabled: chosenRoomDelegate.visible && root.room.canModifyParent(chosenRoomDelegate.roomId)
|
||||||
text: i18n("OK")
|
text: i18n("OK")
|
||||||
|
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||||
icon.name: "dialog-ok"
|
icon.name: "dialog-ok"
|
||||||
onTriggered: {
|
onClicked: {
|
||||||
root.room.addParent(chosenRoomDelegate.roomId, makeCanonicalCheck.checked, existingOfficialCheck.checked);
|
root.room.addParent(chosenRoomDelegate.roomId, makeCanonicalCheck.checked, existingOfficialCheck.checked);
|
||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import Quotient
|
|||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
|
||||||
Kirigami.Dialog {
|
QQC2.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,17 +26,15 @@ Kirigami.Dialog {
|
|||||||
*/
|
*/
|
||||||
property list<string> restrictedIds: room.restrictedIds
|
property list<string> restrictedIds: room.restrictedIds
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 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")
|
title: i18nc("@title", "Select Spaces")
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (var i in spaceGroup.buttons) {
|
for (var i in spaceGroup.buttons) {
|
||||||
|
|||||||
Reference in New Issue
Block a user