Merge pull request '[PR]: Switch position of Social and Recommended timelines' (#10239) from naskya/calckey:social-recommended-position-switch into develop

Reviewed-on: https://codeberg.org/calckey/calckey/pulls/10239
This commit is contained in:
Kainoa Kanter 2023-06-03 06:40:16 +00:00
commit 89d5810e63
2 changed files with 21 additions and 21 deletions

View file

@ -140,26 +140,26 @@
</template> </template>
</I18n> </I18n>
</li> </li>
<li v-if="timelines.includes('recommended')"> <li v-if="timelines.includes('social')">
<I18n <I18n
:src="i18n.ts._tutorial.step5_5" :src="i18n.ts._tutorial.step5_5"
tag="div" tag="div"
> >
<template #icon> <template #icon>
<i <i
class="ph-thumbs-up ph-bold ph-lg" class="ph-handshake ph-bold ph-lg"
/> />
</template> </template>
</I18n> </I18n>
</li> </li>
<li v-if="timelines.includes('social')"> <li v-if="timelines.includes('recommended')">
<I18n <I18n
:src="i18n.ts._tutorial.step5_6" :src="i18n.ts._tutorial.step5_6"
tag="div" tag="div"
> >
<template #icon> <template #icon>
<i <i
class="ph-handshake ph-bold ph-lg" class="ph-thumbs-up ph-bold ph-lg"
/> />
</template> </template>
</I18n> </I18n>
@ -235,12 +235,12 @@ let timelines = ["home"];
if (isLocalTimelineAvailable) { if (isLocalTimelineAvailable) {
timelines.push("local"); timelines.push("local");
} }
if (isRecommendedTimelineAvailable) {
timelines.push("recommended");
}
if (isLocalTimelineAvailable) { if (isLocalTimelineAvailable) {
timelines.push("social"); timelines.push("social");
} }
if (isRecommendedTimelineAvailable) {
timelines.push("recommended");
}
if (isGlobalTimelineAvailable) { if (isGlobalTimelineAvailable) {
timelines.push("global"); timelines.push("global");
} }

View file

@ -109,12 +109,12 @@ let timelines = ["home"];
if (isLocalTimelineAvailable) { if (isLocalTimelineAvailable) {
timelines.push("local"); timelines.push("local");
} }
if (isRecommendedTimelineAvailable) {
timelines.push("recommended");
}
if (isLocalTimelineAvailable) { if (isLocalTimelineAvailable) {
timelines.push("social"); timelines.push("social");
} }
if (isRecommendedTimelineAvailable) {
timelines.push("recommended");
}
if (isGlobalTimelineAvailable) { if (isGlobalTimelineAvailable) {
timelines.push("global"); timelines.push("global");
} }
@ -195,7 +195,7 @@ async function chooseAntenna(ev: MouseEvent): Promise<void> {
} }
function saveSrc( function saveSrc(
newSrc: "home" | "local" | "recommended" | "social" | "global" newSrc: "home" | "local" | "social" | "recommended" | "global"
): void { ): void {
defaultStore.set("tl", { defaultStore.set("tl", {
...defaultStore.state.tl, ...defaultStore.state.tl,
@ -255,16 +255,6 @@ const headerTabs = $computed(() => [
}, },
] ]
: []), : []),
...(isRecommendedTimelineAvailable
? [
{
key: "recommended",
title: i18n.ts._timelines.recommended,
icon: "ph-thumbs-up ph-bold ph-lg",
iconOnly: true,
},
]
: []),
...(isLocalTimelineAvailable ...(isLocalTimelineAvailable
? [ ? [
{ {
@ -275,6 +265,16 @@ const headerTabs = $computed(() => [
}, },
] ]
: []), : []),
...(isRecommendedTimelineAvailable
? [
{
key: "recommended",
title: i18n.ts._timelines.recommended,
icon: "ph-thumbs-up ph-bold ph-lg",
iconOnly: true,
},
]
: []),
...(isGlobalTimelineAvailable ...(isGlobalTimelineAvailable
? [ ? [
{ {