From af85fe38922f16f25e4af9aa93cc7fa37d6dff42 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 26 Oct 2021 14:48:37 +0200 Subject: [PATCH] confirm before logging out --- src/platform/web/ui/session/settings/SettingsView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ui/session/settings/SettingsView.js b/src/platform/web/ui/session/settings/SettingsView.js index afb4499d..482abeb7 100644 --- a/src/platform/web/ui/session/settings/SettingsView.js +++ b/src/platform/web/ui/session/settings/SettingsView.js @@ -42,9 +42,13 @@ export class SettingsView extends TemplateView { row(t, vm.i18n`Session ID`, vm.deviceId, "code"), row(t, vm.i18n`Session key`, vm.fingerprintKey, "code"), 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 - }, "Logout")) + }, vm.i18n`Log out`)) ); settingNodes.push( t.h3("Session Backup"),