From ced7145c75bfeb963f818918e4ec7e3df93f42ee Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 7 Nov 2022 11:57:27 -0800 Subject: [PATCH] fix --- package.json | 2 +- packages/client/src/ui/universal.vue | 32 ++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dd7ed57c8e..ec88a94efd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.119.0-calc.9.14", + "version": "12.119.0-calc.9.15", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/ui/universal.vue b/packages/client/src/ui/universal.vue index d029326739..94d1030e3c 100644 --- a/packages/client/src/ui/universal.vue +++ b/packages/client/src/ui/universal.vue @@ -134,20 +134,29 @@ const drawerMenuShowing = ref(false); mainRouter.on('change', () => { drawerMenuShowing.value = false; - const routerState = mainRouter.currentRoute.value.name; - if (routerState === 'index') { +}); + +function updateButtonState(): void { + let routerState = window.location.href; + let secondaryRouterState = mainRouter.currentRoute.value.name; + if (secondaryRouterState != null && secondaryRouterState === 'index') { buttonAnimIndex.value = 0; + return; } - else if (window.location.href.includes('notifications')) { + if (routerState.includes('notifications')) { buttonAnimIndex.value = 1; } - else if (window.location.href.includes('messaging')) { + else if (routerState.includes('messaging')) { buttonAnimIndex.value = 2; } else { - buttonAnimIndex.value = 0; + buttonAnimIndex.value = 3; } -}); +} + +updateButtonState(); + +watch($$(window.location.href), () => (updateButtonState())); document.documentElement.style.overflowY = 'scroll'; @@ -385,6 +394,17 @@ const wallpaper = localStorage.getItem('wallpaper') != null; transition: background 0.1s; } + > .button-wrapper { + > .indicator { + position: absolute; + top: 0; + left: 0; + color: var(--indicator); + font-size: 16px; + animation: blink 1s infinite; + } + } + > .button-wrapper.on { background-color: var(--accentedBg); width: 100%;