🔧 reduce the types of timelines and treat the social timeline as the home timeline (packages/client/src/components/global/MkPageHeader.vue, packages/client/src/pages/timeline.vue)

This commit is contained in:
ひでまる 2024-08-24 12:28:33 +09:00
parent 1bc62664d9
commit 6a28c4b8d7
2 changed files with 6 additions and 24 deletions

View file

@ -42,8 +42,7 @@
/> />
<i <i
v-else-if="metadata.icon && !narrow" v-else-if="metadata.icon && !narrow"
class="icon" class="icon ph-house ph-lg ph-lg ph-bold"
:class="icon(metadata.icon)"
></i> ></i>
<div class="title"> <div class="title">
@ -268,6 +267,9 @@ onMounted(() => {
await document.fonts.ready; await document.fonts.ready;
if (props.tab == null) return; if (props.tab == null) return;
if (!isTabs(props.tabs)) return; if (!isTabs(props.tabs)) return;
if (props.tab === "home") {
emit("update:tab", "social");
}
const tabEl = tabRefs[props.tab]; const tabEl = tabRefs[props.tab];
if (tabEl && tabHighlightEl.value) { if (tabEl && tabHighlightEl.value) {
const isVertical = getComputedStyle(tabHighlightEl.value)[ const isVertical = getComputedStyle(tabHighlightEl.value)[

View file

@ -236,32 +236,12 @@ const headerActions = computed(() =>
); );
const headerTabs = computed(() => [ const headerTabs = computed(() => [
...(isHomeTimelineAvailable
? [
{
key: "home",
title: i18n.ts._timelines.home,
icon: `${icon("ph-house")}`,
iconOnly: true,
},
]
: []),
...(isSocialTimelineAvailable ...(isSocialTimelineAvailable
? [ ? [
{ {
key: "social", key: "social",
title: i18n.ts._timelines.social, title: i18n.ts._timelines.home,
icon: `${icon("ph-handshake")}`, icon: `${icon("ph-house")}`,
iconOnly: true,
},
]
: []),
...(isRecommendedTimelineAvailable
? [
{
key: "recommended",
title: i18n.ts._timelines.recommended,
icon: `${icon("ph-thumbs-up")}`,
iconOnly: true, iconOnly: true,
}, },
] ]