summaryrefslogtreecommitdiff
path: root/app/apps.js
blob: 56ba30769a5e56a863bde3de7f3f45eecd411117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
window.openApps = {
    bits: () => {
        document.body.style.pointerEvents = "none";
        document.getElementById("app-view").classList.add("open");
        document.getElementById("app-view").classList.remove("closed");
        document.getElementById("app-name").innerText = "Bits";
        document.getElementById("app-icon").src = "icons/bits.svg";
        document.getElementById("app-iframe").src = "bits/index.html";
        document.getElementById("app-header").classList.add("no-border");
        setTimeout(() => {
            document.body.style.pointerEvents = "initial";
        }, 500);
    },
    fronters: () => {
        document.body.style.pointerEvents = "none";
        document.getElementById("app-name").innerText = "Fronters";
        document.getElementById("app-icon").src = "icons/fronters.svg";
        document.getElementById("app-view").classList.add("open");
        document.getElementById("app-view").classList.remove("closed");
        document.getElementById("app-iframe").src = "fronters/index.html";
        document.getElementById("app-header").classList.remove("no-border");
        setTimeout(() => {
            document.body.style.pointerEvents = "initial";
        }, 500);
    },
    emergency: () => {
        document.body.style.pointerEvents = "none";
        document.getElementById("app-name").innerText = "Emergency";
        document.getElementById("app-icon").src = "icons/emergency.svg";
        document.getElementById("app-view").classList.add("open");
        document.getElementById("app-view").classList.remove("closed");
        document.getElementById("app-iframe").src = "emergency/index.php";
        document.getElementById("app-header").classList.remove("no-border");
        setTimeout(() => {
            document.body.style.pointerEvents = "initial";
        }, 500);
    },
    planner: () => {
        document.body.style.pointerEvents = "none";
        document.getElementById("app-name").innerText = "Planner";
        document.getElementById("app-icon").src = "icons/planner.svg";
        document.getElementById("app-view").classList.add("open");
        document.getElementById("app-view").classList.remove("closed");
        document.getElementById("app-iframe").src = "planner/index.php";
        document.getElementById("app-header").classList.remove("no-border");
        setTimeout(() => {
            document.body.style.pointerEvents = "initial";
        }, 500);
    },
}

function closeApp() {
    document.body.style.pointerEvents = "none";
    document.getElementById("app-view").classList.remove("open");
    document.getElementById("app-view").classList.add("closed");
    setTimeout(() => {
        document.body.style.pointerEvents = "initial";
        document.getElementById("app-header").classList.remove("no-border");
        document.getElementById("app-iframe").src = "about:blank";
    }, 500);
}