diff --git a/package.json b/package.json index b5cbda9d2..1500ce882 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.119.0-calc.1-rc.2", + "version": "12.119.0-calc.1-rc.3", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index d506cd327..c373534d6 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -120,8 +120,13 @@ const props = withDefaults(defineProps<{ }); let stats = $ref(null); -let tab = $ref(props.initialTab); let tabs = ['overview', 'emojis','charts']; +let tab = $computed({ + get: () => props.initialTab, + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); if (iAmModerator) tabs.push('federation'); const initStats = () => os.api('stats', { diff --git a/packages/client/src/pages/admin-file.vue b/packages/client/src/pages/admin-file.vue index 26aa62e35..ff3b52de7 100644 --- a/packages/client/src/pages/admin-file.vue +++ b/packages/client/src/pages/admin-file.vue @@ -99,10 +99,15 @@ import { defaultStore } from '@/store'; import 'swiper/scss'; import 'swiper/scss/virtual'; -let tab = $ref('overview'); let tabs = ['overview']; if (iAmModerator) tabs.push('ip'); tabs.push('raw'); +let tab = $computed({ + get: () => tabs[0], + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); let file: any = $ref(null); let info: any = $ref(null); let isSensitive: boolean = $ref(false); diff --git a/packages/client/src/pages/gallery/index.vue b/packages/client/src/pages/gallery/index.vue index a1e275e7a..3a01f3db4 100644 --- a/packages/client/src/pages/gallery/index.vue +++ b/packages/client/src/pages/gallery/index.vue @@ -69,8 +69,13 @@ const props = defineProps<{ tag?: string; }>(); -let tab = $ref('explore'); const tabs = ['explore', 'liked', 'my']; +let tab = $computed({ + get: () => tabs[0], + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); let tagsRef = $ref(); const recentPostsPagination = { diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 5c33d7793..52497172f 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -162,9 +162,14 @@ const props = defineProps<{ host: string; }>(); -let tab = $ref('overview'); let tabs = ['overview']; if (iAmModerator) tabs.push('chart', 'users', 'raw'); +let tab = $computed({ + get: () => tabs[0], + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); let chartSrc = $ref('instance-requests'); let meta = $ref(null); let instance = $ref(null); diff --git a/packages/client/src/pages/notifications.vue b/packages/client/src/pages/notifications.vue index e1b25533d..4319a7a8e 100644 --- a/packages/client/src/pages/notifications.vue +++ b/packages/client/src/pages/notifications.vue @@ -49,8 +49,13 @@ import { defaultStore } from '@/store'; import 'swiper/scss'; import 'swiper/scss/virtual'; -let tab = $ref('all'); const tabs = ['all', 'unread', 'mentions', 'directNotes']; +let tab = $computed({ + get: () => tabs[0], + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); let includeTypes = $ref(null); let unreadOnly = $computed(() => tab === 'unread'); os.api('notifications/mark-all-as-read'); diff --git a/packages/client/src/pages/user/index.vue b/packages/client/src/pages/user/index.vue index a59ace0ed..dd932b8c0 100644 --- a/packages/client/src/pages/user/index.vue +++ b/packages/client/src/pages/user/index.vue @@ -67,7 +67,6 @@ const props = withDefaults(defineProps<{ const router = useRouter(); -let tab = $ref(props.page); let tabs = ['home']; let user = $ref(null); if (($i && ($i.id === user?.id)) || user?.publicReactions) { @@ -76,6 +75,12 @@ if (($i && ($i.id === user?.id)) || user?.publicReactions) { if ((user?.instance != null)) { tabs.push('clips', 'pages', 'gallery'); } +let tab = $computed({ + get: () => tabs[0], + set: (x) => { + syncSlide(tabs.indexOf(x)); + }, +}); let error = $ref(null); function fetchUser(): void {