Sharkey/packages/frontend/src/pages/explore.featured.vue

36 lines
896 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2023-05-19 10:20:53 +03:00
<MkSpacer :contentMax="800">
2022-07-03 08:43:28 +03:00
<MkTab v-model="tab" style="margin-bottom: var(--margin);">
<option value="notes">{{ i18n.ts.notes }}</option>
<option value="polls">{{ i18n.ts.poll }}</option>
</MkTab>
<MkNotes v-if="tab === 'notes'" :pagination="paginationForNotes"/>
<MkNotes v-else-if="tab === 'polls'" :pagination="paginationForPolls"/>
</MkSpacer>
</template>
<script lang="ts" setup>
import MkNotes from '@/components/MkNotes.vue';
import MkTab from '@/components/MkTab.vue';
2023-09-19 10:37:43 +03:00
import { i18n } from '@/i18n.js';
const paginationForNotes = {
endpoint: 'notes/featured' as const,
limit: 10,
offsetMode: true,
};
const paginationForPolls = {
endpoint: 'notes/polls/recommendation' as const,
limit: 10,
offsetMode: true,
};
let tab = $ref('notes');
</script>