mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 04:45:15 +00:00
hide instance following / followers tabs from logged-out users
This commit is contained in:
parent
37fd454f70
commit
872f987845
1 changed files with 18 additions and 9 deletions
|
@ -194,6 +194,7 @@ import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
|
||||||
import { dateString } from '@/filters/date.js';
|
import { dateString } from '@/filters/date.js';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
|
import { $i } from '@/account.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
host: string;
|
host: string;
|
||||||
|
@ -422,20 +423,28 @@ const headerTabs = computed(() => [{
|
||||||
key: 'users',
|
key: 'users',
|
||||||
title: i18n.ts.users,
|
title: i18n.ts.users,
|
||||||
icon: 'ti ti-users',
|
icon: 'ti ti-users',
|
||||||
}, {
|
}, ...getFollowingTabs(), {
|
||||||
key: 'following',
|
|
||||||
title: i18n.ts.following,
|
|
||||||
icon: 'ti ti-arrow-right',
|
|
||||||
}, {
|
|
||||||
key: 'followers',
|
|
||||||
title: i18n.ts.followers,
|
|
||||||
icon: 'ti ti-arrow-left',
|
|
||||||
}, {
|
|
||||||
key: 'raw',
|
key: 'raw',
|
||||||
title: 'Raw',
|
title: 'Raw',
|
||||||
icon: 'ti ti-code',
|
icon: 'ti ti-code',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
function getFollowingTabs() {
|
||||||
|
if (!$i) return [];
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
key: 'following',
|
||||||
|
title: i18n.ts.following,
|
||||||
|
icon: 'ti ti-arrow-right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'followers',
|
||||||
|
title: i18n.ts.followers,
|
||||||
|
icon: 'ti ti-arrow-left',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePageMetadata(() => ({
|
||||||
title: props.host,
|
title: props.host,
|
||||||
icon: 'ti ti-server',
|
icon: 'ti ti-server',
|
||||||
|
|
Loading…
Reference in a new issue