From 75b08df03df6bb9c96663e9352792336ef3ac275 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Thu, 9 Sep 2021 11:20:16 +0200 Subject: [PATCH] fix(@desktop/profile): add missing logout confirmation dialog Closes #3423 --- ui/app/AppLayouts/Profile/LeftTab/Menu.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Profile/LeftTab/Menu.qml b/ui/app/AppLayouts/Profile/LeftTab/Menu.qml index 478b1a728d..1adf1238c4 100644 --- a/ui/app/AppLayouts/Profile/LeftTab/Menu.qml +++ b/ui/app/AppLayouts/Profile/LeftTab/Menu.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13 import StatusQ.Components 0.1 +import "../../../../shared" import "../../../../imports" import "./constants.js" as ProfileConstants @@ -65,11 +66,21 @@ ScrollView { visible: modelData.ifEnabled !== "browser" || appSettings.isBrowserEnabled onClicked: function () { if (modelData.function === "exit") { - return Qt.quit() + return confirmDialog.open() } Config.currentMenuTab = modelData.id } } } } + + ConfirmationDialog { + id: confirmDialog + header.title: qsTr("Sign out") + confirmationText: qsTr("Make sure you have your account password and seed phrase stored. Without them you can lock yourself out of your account and lose funds.") + confirmButtonLabel: qsTr("Sign out & Quit") + onConfirmButtonClicked: { + Qt.quit() + } + } }