Warning, /network/neochat/src/qml/ConfirmLogoutDialog.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Controls as QQC2 0006 import QtQuick.Layouts 0007 import org.kde.kirigami as Kirigami 0008 0009 import org.kde.neochat 0010 0011 QQC2.Dialog { 0012 id: root 0013 0014 required property NeoChatConnection connection 0015 0016 ColumnLayout { 0017 Kirigami.Heading { 0018 text: i18n("Sign out") 0019 } 0020 QQC2.Label { 0021 text: i18n("Are you sure you want to sign out?") 0022 } 0023 } 0024 0025 x: parent ? Math.round((parent.width - width) / 2) : 0 0026 y: parent ? Math.round((parent.height - height) / 2) : 0 0027 modal: true 0028 0029 footer: QQC2.DialogButtonBox { 0030 QQC2.Button { 0031 text: i18n("Cancel") 0032 QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole 0033 onClicked: root.close() 0034 } 0035 0036 QQC2.Button { 0037 text: i18n("Sign out") 0038 QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole 0039 onClicked: { 0040 root.connection.logout(true); 0041 root.close(); 0042 root.accepted(); 0043 } 0044 } 0045 } 0046 }