diff --git a/src/client/components/ui/a.vue b/src/client/components/ui/a.vue index 384ee0259..f6c66257b 100644 --- a/src/client/components/ui/a.vue +++ b/src/client/components/ui/a.vue @@ -121,7 +121,11 @@ export default defineComponent({ return this.window(); } - this.$router.push(this.to); + if (this.$router.currentRoute.value.path === this.to) { + window.scroll({ top: 0, behavior: 'smooth' }); + } else { + this.$router.push(this.to); + } } } } diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index 13f6420aa..af7f1c2b6 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -1,12 +1,12 @@ diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 0073a0c8c..7065b345f 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -3,7 +3,7 @@
-
+
@@ -211,6 +211,10 @@ export default defineComponent({ if (window._scroll) window._scroll(); }, + onHeaderClick() { + window.scroll({ top: 0, behavior: 'smooth' }); + }, + onContextmenu(e) { const path = this.$route.path; os.contextMenu([{ @@ -292,6 +296,7 @@ export default defineComponent({ backdrop-filter: blur(32px); background-color: var(--header); border-bottom: solid 1px var(--divider); + user-select: none; } > main {