diff options
author | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
commit | a2df9a69dcc14cb70118cda2ded499055e7ee358 (patch) | |
tree | 6dd283e4e9452d38bce81ddaaae49b5335755842 /app/apps.js | |
parent | 84dd0735820b16b60f600284d35183d76547a71f (diff) | |
download | pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.gz pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.bz2 pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.zip |
m. update
Diffstat (limited to 'app/apps.js')
-rw-r--r-- | app/apps.js | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/app/apps.js b/app/apps.js new file mode 100644 index 0000000..56ba307 --- /dev/null +++ b/app/apps.js @@ -0,0 +1,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); +}
\ No newline at end of file |