From 8a67e65ff953ecb7231fbbdee5821086516b5499 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 7 Nov 2022 00:36:53 -0800 Subject: [PATCH] gaaah --- package.json | 2 +- packages/client/src/ui/universal.vue | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index a915565d91..de78d387b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.119.0-calc.10", + "version": "12.119.0-calc.10.1", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/ui/universal.vue b/packages/client/src/ui/universal.vue index 8f618c6431..9329848136 100644 --- a/packages/client/src/ui/universal.vue +++ b/packages/client/src/ui/universal.vue @@ -134,14 +134,19 @@ const drawerMenuShowing = ref(false); mainRouter.on('change', () => { drawerMenuShowing.value = false; - let routerState = mainRouter.currentRoute.value.name; - console.log(routerState); - const bottomButtons = ['index', 'notifications', 'messaging']; - bottomButtons.forEach(i => { - if (routerState?.includes(i) || window.location.href.includes(i)) { - buttonAnimIndex.value = bottomButtons.findIndex(j => j.includes(i)); - } - }); + const routerState = mainRouter.currentRoute.value.name; + if (routerState === 'index') { + buttonAnimIndex.value = 0; + } + else if (window.location.href.includes('my/notifications')) { + buttonAnimIndex.value = 1; + } + else if (window.location.href.includes('my/messaging')) { + buttonAnimIndex.value = 2; + } + else { + buttonAnimIndex.value = 3; + } }); document.documentElement.style.overflowY = 'scroll';