🗑️ remove something timeline from UI (packages/frontend/src/components/global/MkPageHead...)
This commit is contained in:
parent
ddce96972c
commit
76110a7be7
3 changed files with 22 additions and 32 deletions
|
@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div v-if="pageMetadata.avatar" :class="$style.titleAvatarContainer">
|
||||
<MkAvatar :class="$style.titleAvatar" :user="pageMetadata.avatar" indicator/>
|
||||
</div>
|
||||
<i v-else-if="pageMetadata.icon" :class="[$style.titleIcon, pageMetadata.icon]"></i>
|
||||
<i v-else-if="pageMetadata.icon" class="icon ph-house ph-lg ph-lg ph-bold"></i>
|
||||
|
||||
<div :class="$style.title">
|
||||
<MkUserName v-if="pageMetadata.userName" :user="pageMetadata.userName" :nowrap="true"/>
|
||||
|
|
|
@ -317,10 +317,10 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
|||
icon: 'ti ti-star',
|
||||
iconOnly: true,
|
||||
}))), ...availableBasicTimelines().map(tl => ({
|
||||
key: tl,
|
||||
title: i18n.ts._timelines[tl],
|
||||
icon: basicTimelineIconClass(tl),
|
||||
iconOnly: true,
|
||||
key: tl,
|
||||
title: tl === 'social' ? i18n.ts._timelines["home"] : i18n.ts._timelines[tl],
|
||||
icon: basicTimelineIconClass(tl),
|
||||
iconOnly: true,
|
||||
})), {
|
||||
icon: 'ph-user-check ph-bold ph-lg',
|
||||
title: i18n.ts.following,
|
||||
|
@ -331,17 +331,7 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
|||
title: i18n.ts.lists,
|
||||
iconOnly: true,
|
||||
onClick: chooseList,
|
||||
}, {
|
||||
icon: 'ti ti-antenna',
|
||||
title: i18n.ts.antennas,
|
||||
iconOnly: true,
|
||||
onClick: chooseAntenna,
|
||||
}, {
|
||||
icon: 'ti ti-device-tv',
|
||||
title: i18n.ts.channel,
|
||||
iconOnly: true,
|
||||
onClick: chooseChannel,
|
||||
}] as Tab[]);
|
||||
}, ] as Tab[]);
|
||||
|
||||
const headerTabsWhenNotLogin = computed(() => [...availableBasicTimelines().map(tl => ({
|
||||
key: tl,
|
||||
|
|
|
@ -7,10 +7,10 @@ import { $i } from "@/account.js";
|
|||
import { instance } from "@/instance.js";
|
||||
|
||||
export const basicTimelineTypes = [
|
||||
"home",
|
||||
"local",
|
||||
"social",
|
||||
"bubble",
|
||||
// "home",
|
||||
"local",
|
||||
// "bubble",
|
||||
"global",
|
||||
] as const;
|
||||
|
||||
|
@ -28,10 +28,10 @@ export function basicTimelineIconClass(timeline: BasicTimelineType): string {
|
|||
return "ti ti-home";
|
||||
case "local":
|
||||
return "ti ti-planet";
|
||||
case "social":
|
||||
return "ti ti-universe";
|
||||
case "bubble":
|
||||
return "ph-drop ph-bold ph-lg";
|
||||
// case "social":
|
||||
// return "ti ti-universe";
|
||||
// case "bubble":
|
||||
// return "ph-drop ph-bold ph-lg";
|
||||
case "global":
|
||||
return "ti ti-whirl";
|
||||
}
|
||||
|
@ -41,20 +41,20 @@ export function isAvailableBasicTimeline(
|
|||
timeline: BasicTimelineType | undefined | null,
|
||||
): boolean {
|
||||
switch (timeline) {
|
||||
case "home":
|
||||
return $i != null;
|
||||
// case "home":
|
||||
// return $i != null;
|
||||
case "social":
|
||||
return $i != null && $i.policies.ltlAvailable;
|
||||
case "local":
|
||||
return (
|
||||
($i == null && instance.policies.ltlAvailable) ||
|
||||
($i != null && $i.policies.ltlAvailable)
|
||||
);
|
||||
case "social":
|
||||
return $i != null && $i.policies.ltlAvailable;
|
||||
case "bubble":
|
||||
return (
|
||||
($i == null && instance.policies.btlAvailable) ||
|
||||
($i != null && $i.policies.btlAvailable)
|
||||
);
|
||||
// case "bubble":
|
||||
// return (
|
||||
// ($i == null && instance.policies.btlAvailable) ||
|
||||
// ($i != null && $i.policies.btlAvailable)
|
||||
// );
|
||||
case "global":
|
||||
return (
|
||||
($i == null && instance.policies.gtlAvailable) ||
|
||||
|
|
Loading…
Add table
Reference in a new issue