mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
Kdots: get logout working
This commit is contained in:
parent
c06b1aafda
commit
86aba27035
@ -161,7 +161,7 @@ export class EgwFramework extends LitElement
|
|||||||
// These need egw fully loaded
|
// These need egw fully loaded
|
||||||
this.getEgwComplete().then(() =>
|
this.getEgwComplete().then(() =>
|
||||||
{
|
{
|
||||||
// Regisert the "message" plugin
|
// Register the "message" plugin
|
||||||
this.egw.registerJSONPlugin((type, res, req) =>
|
this.egw.registerJSONPlugin((type, res, req) =>
|
||||||
{
|
{
|
||||||
//Check whether all needed parameters have been passed and call the alertHandler function
|
//Check whether all needed parameters have been passed and call the alertHandler function
|
||||||
@ -176,6 +176,16 @@ export class EgwFramework extends LitElement
|
|||||||
// Quick add
|
// Quick add
|
||||||
this.egw.link_quick_add('topmenu_info_quick_add');
|
this.egw.link_quick_add('topmenu_info_quick_add');
|
||||||
|
|
||||||
|
// Ask about timer before logout
|
||||||
|
const logout = this.querySelector('#topmenu_logout');
|
||||||
|
logout.addEventListener('click', async(e) =>
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
await this.egw.onLogout_timer();
|
||||||
|
this.egw.open_link(e.target.value);
|
||||||
|
});
|
||||||
|
|
||||||
// Deal with bug where avatar menu does not position correctly
|
// Deal with bug where avatar menu does not position correctly
|
||||||
(<SlDropdown>this.querySelector("#topmenu_info_user_avatar"))?.popup?.dispatchEvent(new Event("slotchange"));
|
(<SlDropdown>this.querySelector("#topmenu_info_user_avatar"))?.popup?.dispatchEvent(new Event("slotchange"));
|
||||||
});
|
});
|
||||||
@ -376,19 +386,15 @@ export class EgwFramework extends LitElement
|
|||||||
}
|
}
|
||||||
this.loadApp(app.name, true, _link);
|
this.loadApp(app.name, true, _link);
|
||||||
}
|
}
|
||||||
else
|
else if(typeof _app == 'string')
|
||||||
{
|
{
|
||||||
//Display some error messages to have visible feedback
|
//Display some error messages to have visible feedback
|
||||||
if(typeof _app == 'string')
|
egw_alertHandler('Application "' + _app + '" not found.',
|
||||||
{
|
'The application "' + _app + '" the link "' + _link + '" points to is not registered.');
|
||||||
egw_alertHandler('Application "' + _app + '" not found.',
|
}
|
||||||
'The application "' + _app + '" the link "' + _link + '" points to is not registered.');
|
else
|
||||||
}
|
{
|
||||||
else
|
this.egw.window.location.replace(_link);
|
||||||
{
|
|
||||||
egw_alertHandler("No appropriate target application has been found.",
|
|
||||||
"Target link: " + _link);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user