egroupware_official/kdots/js/app.ts
nathan 6bb19980e6 Framework WIP
- App menu progress
- Fix loading into iframe
2024-05-31 10:22:13 -06:00

29 lines
696 B
TypeScript

/**
* app.ts is auto-built
*/
import {EgwFramework} from "./EgwFramework";
import {EgwFrameworkApp} from "./EgwFrameworkApp";
document.addEventListener('DOMContentLoaded', () =>
{
// 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);
}
/* Set up listener on avatar menu */
const avatarMenu = document.querySelector("#topmenu_info_user_avatar");
if(avatarMenu)
{
avatarMenu.addEventListener("sl-select", (e : CustomEvent) =>
{
window.egw.open_link(e.detail.item.value);
});
}
});