🗑️ 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">
|
<div v-if="pageMetadata.avatar" :class="$style.titleAvatarContainer">
|
||||||
<MkAvatar :class="$style.titleAvatar" :user="pageMetadata.avatar" indicator/>
|
<MkAvatar :class="$style.titleAvatar" :user="pageMetadata.avatar" indicator/>
|
||||||
</div>
|
</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">
|
<div :class="$style.title">
|
||||||
<MkUserName v-if="pageMetadata.userName" :user="pageMetadata.userName" :nowrap="true"/>
|
<MkUserName v-if="pageMetadata.userName" :user="pageMetadata.userName" :nowrap="true"/>
|
||||||
|
|
|
@ -318,7 +318,7 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
}))), ...availableBasicTimelines().map(tl => ({
|
}))), ...availableBasicTimelines().map(tl => ({
|
||||||
key: tl,
|
key: tl,
|
||||||
title: i18n.ts._timelines[tl],
|
title: tl === 'social' ? i18n.ts._timelines["home"] : i18n.ts._timelines[tl],
|
||||||
icon: basicTimelineIconClass(tl),
|
icon: basicTimelineIconClass(tl),
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
})), {
|
})), {
|
||||||
|
@ -331,17 +331,7 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
||||||
title: i18n.ts.lists,
|
title: i18n.ts.lists,
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
onClick: chooseList,
|
onClick: chooseList,
|
||||||
}, {
|
}, ] as Tab[]);
|
||||||
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[]);
|
|
||||||
|
|
||||||
const headerTabsWhenNotLogin = computed(() => [...availableBasicTimelines().map(tl => ({
|
const headerTabsWhenNotLogin = computed(() => [...availableBasicTimelines().map(tl => ({
|
||||||
key: tl,
|
key: tl,
|
||||||
|
|
|
@ -7,10 +7,10 @@ import { $i } from "@/account.js";
|
||||||
import { instance } from "@/instance.js";
|
import { instance } from "@/instance.js";
|
||||||
|
|
||||||
export const basicTimelineTypes = [
|
export const basicTimelineTypes = [
|
||||||
"home",
|
|
||||||
"local",
|
|
||||||
"social",
|
"social",
|
||||||
"bubble",
|
// "home",
|
||||||
|
"local",
|
||||||
|
// "bubble",
|
||||||
"global",
|
"global",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
@ -28,10 +28,10 @@ export function basicTimelineIconClass(timeline: BasicTimelineType): string {
|
||||||
return "ti ti-home";
|
return "ti ti-home";
|
||||||
case "local":
|
case "local":
|
||||||
return "ti ti-planet";
|
return "ti ti-planet";
|
||||||
case "social":
|
// case "social":
|
||||||
return "ti ti-universe";
|
// return "ti ti-universe";
|
||||||
case "bubble":
|
// case "bubble":
|
||||||
return "ph-drop ph-bold ph-lg";
|
// return "ph-drop ph-bold ph-lg";
|
||||||
case "global":
|
case "global":
|
||||||
return "ti ti-whirl";
|
return "ti ti-whirl";
|
||||||
}
|
}
|
||||||
|
@ -41,20 +41,20 @@ export function isAvailableBasicTimeline(
|
||||||
timeline: BasicTimelineType | undefined | null,
|
timeline: BasicTimelineType | undefined | null,
|
||||||
): boolean {
|
): boolean {
|
||||||
switch (timeline) {
|
switch (timeline) {
|
||||||
case "home":
|
// case "home":
|
||||||
return $i != null;
|
// return $i != null;
|
||||||
|
case "social":
|
||||||
|
return $i != null && $i.policies.ltlAvailable;
|
||||||
case "local":
|
case "local":
|
||||||
return (
|
return (
|
||||||
($i == null && instance.policies.ltlAvailable) ||
|
($i == null && instance.policies.ltlAvailable) ||
|
||||||
($i != null && $i.policies.ltlAvailable)
|
($i != null && $i.policies.ltlAvailable)
|
||||||
);
|
);
|
||||||
case "social":
|
// case "bubble":
|
||||||
return $i != null && $i.policies.ltlAvailable;
|
// return (
|
||||||
case "bubble":
|
// ($i == null && instance.policies.btlAvailable) ||
|
||||||
return (
|
// ($i != null && $i.policies.btlAvailable)
|
||||||
($i == null && instance.policies.btlAvailable) ||
|
// );
|
||||||
($i != null && $i.policies.btlAvailable)
|
|
||||||
);
|
|
||||||
case "global":
|
case "global":
|
||||||
return (
|
return (
|
||||||
($i == null && instance.policies.gtlAvailable) ||
|
($i == null && instance.policies.gtlAvailable) ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue