Port all confirm dialogs to Kirigami.PromptDialog
This commit is contained in:
committed by
Tobias Fella
parent
40d55805ff
commit
f45226a680
@@ -2,35 +2,34 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as QQC2
|
||||
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.neochat
|
||||
|
||||
FormCard.FormCardPage {
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
required property NeoChatConnection connection
|
||||
|
||||
title: i18nc("@title", "Deactivate Account")
|
||||
title: i18nc("@title:dialog", "Confirm Account Deactivation")
|
||||
subtitle: i18n("Your account will be permanently disabled.\nThis cannot be undone.\nYour Matrix ID will not be available for new accounts.\nYour messages will stay available.")
|
||||
|
||||
FormCard.FormHeader {
|
||||
title: i18nc("@title", "Deactivate Account")
|
||||
dialogType: Kirigami.PromptDialog.Warning
|
||||
|
||||
mainItem: FormCard.FormTextFieldDelegate {
|
||||
id: passwordField
|
||||
label: i18nc("@label:textbox", "Password")
|
||||
echoMode: TextInput.Password
|
||||
horizontalPadding: 0
|
||||
bottomPadding: 0
|
||||
}
|
||||
FormCard.FormCard {
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@title", "Warning")
|
||||
description: i18n("Your account will be permanently disabled.\nThis cannot be undone.\nYour Matrix ID will not be available for new accounts.\nYour messages will stay available.")
|
||||
}
|
||||
|
||||
FormCard.FormTextFieldDelegate {
|
||||
id: passwordField
|
||||
label: i18n("Password")
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
QQC2.Button {
|
||||
text: i18n("Deactivate account")
|
||||
icon.name: "emblem-warning"
|
||||
enabled: passwordField.text.length > 0
|
||||
|
||||
Reference in New Issue
Block a user