aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/menu.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-06-25 10:01:06 +0200
committermetamuffin <metamuffin@disroot.org>2023-06-25 10:01:06 +0200
commit3108716934dfc26c4f93eb60001f37065fef3186 (patch)
tree08f243497cf6f6632ce2ac9b105c936bf2833ac1 /client-web/source/menu.ts
parent018adcfbf7b8662a187b4c287434521fe43f4f9e (diff)
downloadkeks-meet-3108716934dfc26c4f93eb60001f37065fef3186.tar
keks-meet-3108716934dfc26c4f93eb60001f37065fef3186.tar.bz2
keks-meet-3108716934dfc26c4f93eb60001f37065fef3186.tar.zst
flexbox is not flexible enough
Diffstat (limited to 'client-web/source/menu.ts')
-rw-r--r--client-web/source/menu.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/client-web/source/menu.ts b/client-web/source/menu.ts
index 3d023e2..5ecb2b2 100644
--- a/client-web/source/menu.ts
+++ b/client-web/source/menu.ts
@@ -49,17 +49,18 @@ export function control_bar(room: Room, side_ui_container: HTMLElement): HTMLEle
export interface SideUI { el: HTMLElement, set_state: (s: boolean) => void }
export function side_ui(container: HTMLElement, content: HTMLElement, label: string): SideUI {
// TODO: close other side uis
+ const tray = ediv({ class: "side-tray" }, content)
const checkbox = einput("checkbox", {
onchange: () => {
if (checkbox.checked) {
- content.classList.add("animate-in")
- container.appendChild(content)
+ tray.classList.add("animate-in")
+ container.appendChild(tray)
} else {
- content.classList.remove("animate-in")
- content.classList.add("animate-out")
+ tray.classList.remove("animate-in")
+ tray.classList.add("animate-out")
setTimeout(() => { // TODO breaks if ui is being enabled while timeout is active
- content.classList.remove("animate-out")
- container.removeChild(content)
+ tray.classList.remove("animate-out")
+ container.removeChild(tray)
}, 400)
}
}