aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/wwwroot/scripts/components/profile-modal.js
blob: 91d4ed36856d670d2b3ce56ba8cb5d5e18615a2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class ProfileModal extends HTMLElement {
    constructor() {
        super();
        const sessionData = session.get();
        const root = create_element("div", {
            style: {
                padding: "5px",
                display: ""
            }
        }, [
            create_element("h4", {innerText: sessionData.username, style: {margin:0}}),
            create_element("p", {innerText: sessionData.role})
        ]);
        this.innerHTML = root.innerHTML;
    }
}

customElements.define('profile-modal', ProfileModal);