2024-04-25 19:35:34 +02:00
|
|
|
/**
|
|
|
|
* app.ts is auto-built
|
|
|
|
*/
|
|
|
|
|
2024-05-08 16:32:23 +02:00
|
|
|
import {EgwFramework} from "./EgwFramework";
|
|
|
|
import {EgwFrameworkApp} from "./EgwFrameworkApp";
|
2024-04-25 19:35:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () =>
|
|
|
|
{
|
2024-05-08 16:32:23 +02:00
|
|
|
// Not sure what's up here
|
|
|
|
if(!window.customElements.get("egw-framework"))
|
|
|
|
{
|
|
|
|
window.customElements.define("egw-framework", EgwFramework);
|
|
|
|
}
|
|
|
|
if(!window.customElements.get("egw-app"))
|
|
|
|
{
|
|
|
|
window.customElements.define("egw-app", EgwFrameworkApp);
|
|
|
|
}
|
2024-04-25 19:35:34 +02:00
|
|
|
/* Set up listener on avatar menu */
|
|
|
|
const avatarMenu = document.querySelector("#topmenu_info_user_avatar");
|
2024-05-31 18:22:13 +02:00
|
|
|
if(avatarMenu)
|
2024-04-25 19:35:34 +02:00
|
|
|
{
|
2024-05-31 18:22:13 +02:00
|
|
|
avatarMenu.addEventListener("sl-select", (e : CustomEvent) =>
|
|
|
|
{
|
|
|
|
window.egw.open_link(e.detail.item.value);
|
|
|
|
});
|
|
|
|
}
|
2024-04-25 19:35:34 +02:00
|
|
|
});
|