fix(@desktop/profile): add missing logout confirmation dialog

Closes #3423
This commit is contained in:
Pascal Precht 2021-09-09 11:20:16 +02:00 committed by Iuri Matias
parent 33d800fcda
commit 75b08df03d
1 changed files with 12 additions and 1 deletions

View File

@ -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()
}
}
}