chore(client): tweak explore page

This commit is contained in:
syuilo 2022-07-13 18:09:41 +09:00
parent 170b1b89ba
commit 0bcfa2d04f
2 changed files with 9 additions and 11 deletions

View File

@ -1,5 +1,9 @@
<template>
<MkSpacer :content-max="1200">
<MkTab v-model="origin" style="margin-bottom: var(--margin);">
<option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $ts.remote }}</option>
</MkTab>
<div v-if="origin === 'local'">
<template v-if="tag == null">
<MkFolder class="_gap" persist-key="explore-pinned-users">
@ -57,16 +61,17 @@
import { computed, watch } from 'vue';
import XUserList from '@/components/user-list.vue';
import MkFolder from '@/components/ui/folder.vue';
import MkTab from '@/components/tab.vue';
import number from '@/filters/number';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
const props = defineProps<{
origin: 'local' | 'remote';
tag?: string;
}>();
let origin = $ref('local');
let tagsEl = $ref<InstanceType<typeof MkFolder>>();
let tagsLocal = $ref([]);
let tagsRemote = $ref([]);

View File

@ -5,11 +5,8 @@
<div v-if="tab === 'featured'">
<XFeatured/>
</div>
<div v-else-if="tab === 'localUsers'">
<XUsers origin="local"/>
</div>
<div v-else-if="tab === 'remoteUsers'">
<XUsers origin="remote"/>
<div v-else-if="tab === 'users'">
<XUsers/>
</div>
<div v-else-if="tab === 'search'">
<MkSpacer :content-max="1200">
@ -75,13 +72,9 @@ const headerTabs = $computed(() => [{
icon: 'fas fa-bolt',
title: i18n.ts.featured,
}, {
key: 'localUsers',
key: 'users',
icon: 'fas fa-users',
title: i18n.ts.users,
}, {
key: 'remoteUsers',
icon: 'fas fa-users',
title: i18n.ts.remote,
}, {
key: 'search',
title: i18n.ts.search,