fix(ux): add confirm before logout

Note:
This not a new fix it's already merged before in #37880
But removed by mistake in this #38192 so this for make it come back :)
This commit is contained in:
KerollesFathy 2026-04-06 15:18:15 +00:00
parent 2f0319d3b5
commit 842921c587

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() {