fix(frontend): fix broken styles

This commit is contained in:
syuilo 2025-03-23 21:23:52 +09:00
parent 260d35e2f0
commit 0471e457fe
5 changed files with 9 additions and 18 deletions

View file

@ -97,7 +97,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { defineAsyncComponent, provide, onMounted, computed, ref, watch, useTemplateRef } from 'vue';
import { instanceName } from '@@/js/config.js';
import { CURRENT_STICKY_BOTTOM } from '@@/js/const.js';
import { isLink } from '@@/js/is-link.js';
import XCommon from './_common_/common.vue';
import type { Ref } from 'vue';
@ -200,16 +199,13 @@ const onContextmenu = (ev) => {
};
const navFooterHeight = ref(0);
provide<Ref<number>>(CURRENT_STICKY_BOTTOM, navFooterHeight);
watch(navFooter, () => {
if (navFooter.value) {
navFooterHeight.value = navFooter.value.offsetHeight;
window.document.body.style.setProperty('--MI-stickyBottom', `${navFooterHeight.value}px`);
window.document.body.style.setProperty('--MI-minBottomSpacing', 'var(--MI-minBottomSpacingMobile)');
} else {
navFooterHeight.value = 0;
window.document.body.style.setProperty('--MI-stickyBottom', '0px');
window.document.body.style.setProperty('--MI-minBottomSpacing', '0px');
}
}, {