From 2a773efda0199e2562fcab627dec1b1c11b4d01e Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Wed, 20 Dec 2023 19:39:08 +0900 Subject: [PATCH] =?UTF-8?q?(add)=20=E4=B8=8A=E3=81=AB=E6=88=BB=E3=82=8B?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=20fix=20#35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.vue | 48 +++++++++++++++++++++++++++++++++++++++++ components/g/Nav.vue | 18 +--------------- pages/mi-web.vue | 1 + pages/servers/index.vue | 5 +++++ pages/share.vue | 1 + types/misc.d.ts | 8 +++++++ types/router.d.ts | 8 +++++++ 7 files changed, 72 insertions(+), 17 deletions(-) diff --git a/app.vue b/app.vue index 83fa20e5..3724c037 100644 --- a/app.vue +++ b/app.vue @@ -1,4 +1,5 @@ + + diff --git a/components/g/Nav.vue b/components/g/Nav.vue index 981fbf1e..2e8140eb 100644 --- a/components/g/Nav.vue +++ b/components/g/Nav.vue @@ -138,21 +138,5 @@ function rotateColorMode() { colorMode.preference = values[next]; } -const scrollPos = ref(0); - -async function updatePos() { - scrollPos.value = document.body.getBoundingClientRect().y; -} - -if (process.client) { - window.addEventListener('scroll', updatePos); - window.addEventListener('resize', updatePos); -} - -onUnmounted(() => { - if (process.client) { - window.removeEventListener('scroll', updatePos); - window.removeEventListener('resize', updatePos); - } -}); +const scrollPos = useState('miHub_global_scrollPos'); diff --git a/pages/mi-web.vue b/pages/mi-web.vue index d911fc65..c6c407dd 100644 --- a/pages/mi-web.vue +++ b/pages/mi-web.vue @@ -35,4 +35,5 @@ const path = computed(() => { }) meta.title = t('_goToMisskey.title'); +meta.scrollButton = false; \ No newline at end of file diff --git a/pages/servers/index.vue b/pages/servers/index.vue index f3660c38..faac507f 100644 --- a/pages/servers/index.vue +++ b/pages/servers/index.vue @@ -62,6 +62,11 @@ function setServerStats(val: InstancesStatsObj) { route.meta.title = t('_servers.title'); route.meta.description = t('_servers.description'); +route.meta.scrollButton = { + customPosition: { + y: '4.5rem', + } +};