1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 12:15:44 +02:00
Files
misskey/packages/frontend/src/pages/explore.vue
2025-08-26 13:34:41 +09:00

57 lines
1.2 KiB
Vue

<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<PageWithHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs" :swipable="true">
<div v-if="tab === 'featured'">
<XFeatured/>
</div>
<div v-else-if="tab === 'users'">
<XUsers/>
</div>
<div v-else-if="tab === 'roles'">
<XRoles/>
</div>
</PageWithHeader>
</template>
<script lang="ts" setup>
import { computed, watch, ref, useTemplateRef } from 'vue';
import XFeatured from './explore.featured.vue';
import XUsers from './explore.users.vue';
import XRoles from './explore.roles.vue';
import { definePage } from '@/page.js';
import { i18n } from '@/i18n.js';
const props = withDefaults(defineProps<{
initialTab?: string;
}>(), {
initialTab: 'featured',
});
const tab = ref(props.initialTab);
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,
}]);
definePage(() => ({
title: i18n.ts.explore,
icon: 'ti ti-hash',
}));
</script>