mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-30 00:06:43 -06:00
64be363adc
* feat: 検索画面の UI を統一 * fix: エラーの修正 * add: changelog --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
61 lines
1.4 KiB
Vue
61 lines
1.4 KiB
Vue
<template>
|
|
<MkStickyContainer>
|
|
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
|
<div class="lznhrdub">
|
|
<div v-if="tab === 'featured'">
|
|
<XFeatured/>
|
|
</div>
|
|
<div v-else-if="tab === 'users'">
|
|
<XUsers/>
|
|
</div>
|
|
<div v-else-if="tab === 'roles'">
|
|
<XRoles/>
|
|
</div>
|
|
</div>
|
|
</MkStickyContainer>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, watch } from 'vue';
|
|
import XFeatured from './explore.featured.vue';
|
|
import XUsers from './explore.users.vue';
|
|
import XRoles from './explore.roles.vue';
|
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
|
import { i18n } from '@/i18n';
|
|
|
|
const props = withDefaults(defineProps<{
|
|
tag?: string;
|
|
initialTab?: string;
|
|
}>(), {
|
|
initialTab: 'featured',
|
|
});
|
|
|
|
let tab = $ref(props.initialTab);
|
|
let tagsEl = $shallowRef<InstanceType<typeof MkFoldableSection>>();
|
|
|
|
watch(() => props.tag, () => {
|
|
if (tagsEl) tagsEl.toggleContent(props.tag == null);
|
|
});
|
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
const headerTabs = $computed(() => [{
|
|
key: 'featured',
|
|
icon: 'ti ti-bolt',
|
|
title: i18n.ts.featured,
|
|
}, {
|
|
key: 'users',
|
|
icon: 'ti ti-users',
|
|
title: i18n.ts.users,
|
|
}, {
|
|
key: 'roles',
|
|
icon: 'ti ti-badges',
|
|
title: i18n.ts.roles,
|
|
}]);
|
|
|
|
definePageMetadata(computed(() => ({
|
|
title: i18n.ts.explore,
|
|
icon: 'ti ti-hash',
|
|
})));
|
|
</script>
|