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