diff --git a/packages/client/src/pages/admin-file.vue b/packages/client/src/pages/admin-file.vue index ff3b52de73..30a89d3e97 100644 --- a/packages/client/src/pages/admin-file.vue +++ b/packages/client/src/pages/admin-file.vue @@ -102,12 +102,9 @@ import 'swiper/scss/virtual'; let tabs = ['overview']; if (iAmModerator) tabs.push('ip'); tabs.push('raw'); -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +let tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + let file: any = $ref(null); let info: any = $ref(null); let isSensitive: boolean = $ref(false); diff --git a/packages/client/src/pages/channels.vue b/packages/client/src/pages/channels.vue index cbc23a90a9..c4a4032076 100644 --- a/packages/client/src/pages/channels.vue +++ b/packages/client/src/pages/channels.vue @@ -55,12 +55,9 @@ import 'swiper/scss/virtual'; const router = useRouter(); const tabs = ['featured', 'following', 'owned']; -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +let tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + const featuredPagination = { endpoint: 'channels/featured' as const, diff --git a/packages/client/src/pages/gallery/index.vue b/packages/client/src/pages/gallery/index.vue index 3a01f3db49..e6f56c8dcf 100644 --- a/packages/client/src/pages/gallery/index.vue +++ b/packages/client/src/pages/gallery/index.vue @@ -70,12 +70,9 @@ const props = defineProps<{ }>(); const tabs = ['explore', 'liked', 'my']; -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +let tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + let tagsRef = $ref(); const recentPostsPagination = { diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 52497172f0..3b3410351c 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -164,12 +164,9 @@ const props = defineProps<{ let tabs = ['overview']; if (iAmModerator) tabs.push('chart', 'users', 'raw'); -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +let tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + 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 4319a7a8ea..964fffe3b3 100644 --- a/packages/client/src/pages/notifications.vue +++ b/packages/client/src/pages/notifications.vue @@ -50,12 +50,9 @@ import 'swiper/scss'; import 'swiper/scss/virtual'; const tabs = ['all', 'unread', 'mentions', 'directNotes']; -let tab = $computed({ - get: () => tabs[0], - set: (x) => { - syncSlide(tabs.indexOf(x)); - }, -}); +let tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + 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 dd932b8c0c..bed0d655d0 100644 --- a/packages/client/src/pages/user/index.vue +++ b/packages/client/src/pages/user/index.vue @@ -75,12 +75,9 @@ 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 tab = $ref(tabs[0]); +watch($$(tab), () => (syncSlide(tabs.indexOf(tab)))); + let error = $ref(null); function fetchUser(): void {