mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
horrible bad code
This commit is contained in:
parent
4c549326b4
commit
3cddb96a32
2 changed files with 11 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.119.0-calc.9.16",
|
||||
"version": "12.119.0-calc.9.17",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -65,10 +65,7 @@
|
|||
<div
|
||||
v-if="widgetsShowing"
|
||||
class="widgetsDrawer-back _modalBg"
|
||||
@click="widgetsShowing = false"
|
||||
@touchstart.passive="widgetsShowing = false"
|
||||
></div>
|
||||
</transition>
|
||||
@click="widgetsShowing = false"let
|
||||
|
||||
<transition :name="$store.state.animation ? 'widgetsDrawer' : ''">
|
||||
<XWidgets v-if="widgetsShowing" class="widgetsDrawer"/>
|
||||
|
@ -107,7 +104,8 @@ window.addEventListener('resize', () => {
|
|||
isMobile.value = deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD;
|
||||
});
|
||||
|
||||
let buttonAnimIndex = ref(0);
|
||||
const buttonAnimIndex = ref(0);
|
||||
const drawerMenuShowing = ref(false);
|
||||
|
||||
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
||||
const widgetsEl = $ref<HTMLElement>();
|
||||
|
@ -131,27 +129,24 @@ const menuIndicated = computed(() => {
|
|||
});
|
||||
|
||||
function updateButtonState(): void {
|
||||
let routerState = window.location.href;
|
||||
let secondaryRouterState = mainRouter.currentRoute.value.name;
|
||||
if (secondaryRouterState != null && secondaryRouterState === 'index') {
|
||||
let routerState = window.location.pathname;
|
||||
if (routerState === '/') {
|
||||
buttonAnimIndex.value = 0;
|
||||
return;
|
||||
}
|
||||
if (routerState.includes('notifications')) {
|
||||
if (routerState.includes('/my/notifications')) {
|
||||
buttonAnimIndex.value = 1;
|
||||
return;
|
||||
}
|
||||
else if (routerState.includes('messaging')) {
|
||||
if (routerState.includes('/my/messaging')) {
|
||||
buttonAnimIndex.value = 2;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
buttonAnimIndex.value = 3;
|
||||
}
|
||||
buttonAnimIndex.value = 3;
|
||||
}
|
||||
|
||||
updateButtonState();
|
||||
|
||||
const drawerMenuShowing = ref(false);
|
||||
|
||||
mainRouter.on('change', () => {
|
||||
drawerMenuShowing.value = false;
|
||||
updateButtonState();
|
||||
|
|
Loading…
Reference in a new issue