diff --git a/packages/client/src/components/MkNotification.vue b/packages/client/src/components/MkNotification.vue
index 553a41722..a66f935c8 100644
--- a/packages/client/src/components/MkNotification.vue
+++ b/packages/client/src/components/MkNotification.vue
@@ -225,7 +225,7 @@
+ :to="'/my/space/achievements'">
{{ i18n.ts._achievements._types['_' + notification.achievement].title }}
();
definePageMetadata({
title: i18n.ts.space,
@@ -84,6 +88,7 @@
const tabs = ["achievements", "reels", "journal"];
let tab = $ref(tabs[0]);
+
watch($$(tab), () => syncSlide(tabs.indexOf(tab)));
const MOBILE_THRESHOLD = 500;
@@ -124,6 +129,7 @@
function onSlideChange() {
tab = tabs[swiperRef.activeIndex];
+ window.history.pushState(null, null, '/my/space/' + tab);
}
function syncSlide(index) {
@@ -131,7 +137,7 @@
}
onMounted(() => {
- syncSlide(tabs.indexOf(swiperRef.activeIndex));
+ syncSlide(tabs.indexOf(props.tab ?? swiperRef.activeIndex));
});
onActivated(() => {
diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts
index 8f3f004f9..c8bd527f2 100644
--- a/packages/client/src/router.ts
+++ b/packages/client/src/router.ts
@@ -341,7 +341,7 @@ export const routes = [
component: page(() => import("./pages/discover.vue")),
},
{
- path: "/discover",
+ path: "/discover/:tab?",
component: page(() => import("./pages/discover.vue")),
},
{
@@ -582,7 +582,7 @@ export const routes = [
loginRequired: true,
},
{
- path: "/my/snippets",
+ path: "/my/snippets/:tab?",
component: page(() => import("./pages/my-snippets/index.vue")),
loginRequired: true,
},
@@ -643,12 +643,12 @@ export const routes = [
loginRequired: true,
},
{
- path: "/my/space",
+ path: "/my/space/:tab?",
component: page(() => import("./pages/my-space/index.vue")),
loginRequired: true,
},
{
- path: "/news",
+ path: "/news/:tab?",
component: page(() => import("./pages/news.vue")),
loginRequired: true,
},
diff --git a/packages/client/src/ui/visitor/b.vue b/packages/client/src/ui/visitor/b.vue
index 7392cc261..5b4cbbac1 100644
--- a/packages/client/src/ui/visitor/b.vue
+++ b/packages/client/src/ui/visitor/b.vue
@@ -45,14 +45,6 @@
>{{ i18n.ts.discover }}
- {{ i18n.ts.pages }}
- {{ i18n.ts.gallery }}
{{ i18n.ts.settings }}
diff --git a/packages/client/src/ui/visitor/header.vue b/packages/client/src/ui/visitor/header.vue
index c9ced4e8f..09f22651f 100644
--- a/packages/client/src/ui/visitor/header.vue
+++ b/packages/client/src/ui/visitor/header.vue
@@ -18,14 +18,6 @@
>{{ i18n.ts.discover }}
- {{ i18n.ts.pages }}
- {{ i18n.ts.gallery }}