Merge pull request #38432 from KerollesFathy/confirm-before-logout

fix(ux): add confirm before logout
This commit is contained in:
Kerolles Fathy 2026-04-06 17:55:03 +02:00 committed by GitHub
commit 2aa234f907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -380,15 +380,17 @@ frappe.Application = class Application {
logout() {
var me = this;
me.logged_out = true;
return frappe.call({
method: "logout",
callback: function (r) {
if (r.exc) {
return;
}
frappe.confirm(__("Are you sure you want to log out?"), function () {
return frappe.call({
method: "logout",
callback: function (r) {
if (r.exc) {
return;
}
me.redirect_to_login();
},
me.redirect_to_login();
},
});
});
}
handle_session_expired() {