forked from mystiq/hydrogen-web
confirm before logging out
This commit is contained in:
parent
f998041748
commit
af85fe3892
1 changed files with 6 additions and 2 deletions
|
@ -42,9 +42,13 @@ export class SettingsView extends TemplateView {
|
||||||
row(t, vm.i18n`Session ID`, vm.deviceId, "code"),
|
row(t, vm.i18n`Session ID`, vm.deviceId, "code"),
|
||||||
row(t, vm.i18n`Session key`, vm.fingerprintKey, "code"),
|
row(t, vm.i18n`Session key`, vm.fingerprintKey, "code"),
|
||||||
row(t, "", t.button({
|
row(t, "", t.button({
|
||||||
onClick: () => vm.logout(),
|
onClick: () => {
|
||||||
|
if (confirm(vm.i18n`Are you sure you want to log out?`)) {
|
||||||
|
vm.logout();
|
||||||
|
}
|
||||||
|
},
|
||||||
disabled: vm => vm.isLoggingOut
|
disabled: vm => vm.isLoggingOut
|
||||||
}, "Logout"))
|
}, vm.i18n`Log out`))
|
||||||
);
|
);
|
||||||
settingNodes.push(
|
settingNodes.push(
|
||||||
t.h3("Session Backup"),
|
t.h3("Session Backup"),
|
||||||
|
|
Loading…
Reference in a new issue