Warning, /plasma/plasma-workspace/kcms/users/src/ui/ChangeWalletPassword.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2020 Nate Graham <nate@kde.org>
0003
0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006
0007 import QtQuick 2.6
0008 import QtQuick.Layouts 1.3
0009 import QtQuick.Controls 2.5 as QQC2
0010
0011 import org.kde.kirigami 2.8 as Kirigami
0012
0013 Kirigami.OverlaySheet {
0014 id: walletPasswordRoot
0015
0016 title: i18n("Change Wallet Password?")
0017
0018 ColumnLayout {
0019 id: baseLayout
0020 Layout.preferredWidth: Kirigami.Units.gridUnit * 27
0021 spacing: Kirigami.Units.largeSpacing
0022
0023 QQC2.Label {
0024 Layout.fillWidth: true
0025 text: xi18nc("@info", "Now that you have changed your login password, you may also want to change the password on your default KWallet to match it.")
0026 textFormat: Text.PlainText
0027 wrapMode: Text.Wrap
0028 }
0029
0030 Kirigami.LinkButton {
0031 text: i18n("What is KWallet?")
0032 onClicked: {
0033 whatIsKWalletExplanation.visible = !whatIsKWalletExplanation.visible
0034 }
0035 }
0036
0037 QQC2.Label {
0038 id: whatIsKWalletExplanation
0039 Layout.fillWidth: true
0040 visible: false
0041 text: i18n("KWallet is a password manager that stores your passwords for wireless networks and other encrypted resources. It is locked with its own password which differs from your login password. If the two passwords match, it can be unlocked at login automatically so you don't have to enter the KWallet password yourself.")
0042 textFormat: Text.PlainText
0043 wrapMode: Text.Wrap
0044 }
0045
0046 // Not using a QQC2.DialogButtonBox because it can only do horizontal layouts
0047 // and we want the buttons to be stacked when the view is really narrow.
0048 // TODO: go back to using a DialogButtonBox if this OverlaySheet is ever
0049 // parented to the KCM as a whole, not this view in particular
0050 GridLayout {
0051 readonly property bool narrow: baseLayout.width < Kirigami.Units.gridUnit * 20
0052 Layout.alignment: narrow ? Qt.AlignHCenter : Qt.AlignRight
0053 rows: narrow ? 2 : 1
0054 columns: narrow ? 1 : 2
0055
0056 QQC2.Button {
0057 Layout.alignment: Qt.AlignHCenter
0058 text: i18n("Change Wallet Password")
0059 icon.name: "lock"
0060 onClicked: {
0061 user.changeWalletPassword()
0062 walletPasswordRoot.close()
0063 }
0064 }
0065 QQC2.Button {
0066 Layout.alignment: Qt.AlignHCenter
0067 text: i18n("Leave Unchanged")
0068 icon.name: "dialog-cancel"
0069 onClicked: {
0070 walletPasswordRoot.close()
0071 }
0072 }
0073 }
0074 }
0075 }