From 6a28c4b8d7c485cb0933eed2c6effd42c72a31ab Mon Sep 17 00:00:00 2001 From: HidemaruOwO Date: Sat, 24 Aug 2024 12:28:33 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20reduce=20the=20types=20of=20time?= =?UTF-8?q?lines=20and=20treat=20the=20social=20timeline=20as=20the=20home?= =?UTF-8?q?=20timeline=20(packages/client/src/components/global/MkPageHead?= =?UTF-8?q?er.vue,=20packages/client/src/pages/timeline.vue)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/global/MkPageHeader.vue | 6 +++-- packages/client/src/pages/timeline.vue | 24 ++----------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/packages/client/src/components/global/MkPageHeader.vue b/packages/client/src/components/global/MkPageHeader.vue index 3a013a8..7b26fcb 100644 --- a/packages/client/src/components/global/MkPageHeader.vue +++ b/packages/client/src/components/global/MkPageHeader.vue @@ -42,8 +42,7 @@ />
@@ -268,6 +267,9 @@ onMounted(() => { await document.fonts.ready; if (props.tab == null) return; if (!isTabs(props.tabs)) return; + if (props.tab === "home") { + emit("update:tab", "social"); + } const tabEl = tabRefs[props.tab]; if (tabEl && tabHighlightEl.value) { const isVertical = getComputedStyle(tabHighlightEl.value)[ diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index c701255..54c2631 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -236,32 +236,12 @@ const headerActions = computed(() => ); const headerTabs = computed(() => [ - ...(isHomeTimelineAvailable - ? [ - { - key: "home", - title: i18n.ts._timelines.home, - icon: `${icon("ph-house")}`, - iconOnly: true, - }, - ] - : []), ...(isSocialTimelineAvailable ? [ { key: "social", - title: i18n.ts._timelines.social, - icon: `${icon("ph-handshake")}`, - iconOnly: true, - }, - ] - : []), - ...(isRecommendedTimelineAvailable - ? [ - { - key: "recommended", - title: i18n.ts._timelines.recommended, - icon: `${icon("ph-thumbs-up")}`, + title: i18n.ts._timelines.home, + icon: `${icon("ph-house")}`, iconOnly: true, }, ]