2022-07-01 16:33:47 +02:00
|
|
|
<template>
|
|
|
|
<MkSpacer :content-max="800">
|
2022-07-01 16:42:03 +02:00
|
|
|
<MkTab v-model="tab">
|
|
|
|
<option value="notes">{{ i18n.ts.notes }}</option>
|
|
|
|
<option value="polls">{{ i18n.ts.poll }}</option>
|
|
|
|
</MkTab>
|
|
|
|
<XNotes v-if="tab === 'notes'" :pagination="paginationForNotes"/>
|
|
|
|
<XNotes v-else-if="tab === 'polls'" :pagination="paginationForPolls"/>
|
2022-07-01 16:33:47 +02:00
|
|
|
</MkSpacer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import XNotes from '@/components/notes.vue';
|
2022-07-01 16:42:03 +02:00
|
|
|
import MkTab from '@/components/tab.vue';
|
2022-07-01 16:33:47 +02:00
|
|
|
import { i18n } from '@/i18n';
|
|
|
|
|
2022-07-01 16:42:03 +02:00
|
|
|
const paginationForNotes = {
|
2022-07-01 16:33:47 +02:00
|
|
|
endpoint: 'notes/featured' as const,
|
|
|
|
limit: 10,
|
|
|
|
offsetMode: true,
|
|
|
|
};
|
2022-07-01 16:42:03 +02:00
|
|
|
|
|
|
|
const paginationForPolls = {
|
|
|
|
endpoint: 'notes/polls/recommendation' as const,
|
|
|
|
limit: 10,
|
|
|
|
offsetMode: true,
|
|
|
|
};
|
|
|
|
|
|
|
|
let tab = $ref('notes');
|
2022-07-01 16:33:47 +02:00
|
|
|
</script>
|