2022-07-01 23:33:47 +09:00
|
|
|
<template>
|
|
|
|
<MkSpacer :content-max="800">
|
2022-07-03 14:43:28 +09:00
|
|
|
<MkTab v-model="tab" style="margin-bottom: var(--margin);">
|
2023-02-13 05:07:07 +09:00
|
|
|
<option value="local">{{ i18n.ts.local }}</option>
|
|
|
|
<option value="remote">{{ i18n.ts.remote }}</option>
|
2022-07-01 23:42:03 +09:00
|
|
|
</MkTab>
|
2023-02-13 05:07:07 +09:00
|
|
|
<XNotes v-if="tab === 'local'" :pagination="paginationForLocal"/>
|
|
|
|
<XNotes v-else-if="tab === 'remote'" :pagination="paginationForRemote"/>
|
2022-07-01 23:33:47 +09:00
|
|
|
</MkSpacer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2022-08-31 00:24:33 +09:00
|
|
|
import XNotes from '@/components/MkNotes.vue';
|
|
|
|
import MkTab from '@/components/MkTab.vue';
|
2022-07-01 23:33:47 +09:00
|
|
|
import { i18n } from '@/i18n';
|
|
|
|
|
2023-02-13 05:07:07 +09:00
|
|
|
const paginationForLocal = {
|
2022-07-01 23:33:47 +09:00
|
|
|
endpoint: 'notes/featured' as const,
|
|
|
|
limit: 10,
|
|
|
|
offsetMode: true,
|
|
|
|
};
|
2022-07-01 23:42:03 +09:00
|
|
|
|
2023-02-13 05:07:07 +09:00
|
|
|
const paginationForRemote = {
|
|
|
|
endpoint: 'notes/featured' as const,
|
2022-07-01 23:42:03 +09:00
|
|
|
limit: 10,
|
2023-02-13 05:07:07 +09:00
|
|
|
origin: 'remote',
|
2022-07-01 23:42:03 +09:00
|
|
|
offsetMode: true,
|
2023-02-13 05:07:07 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
// const paginationForRemote = {
|
|
|
|
// endpoint: 'notes/polls/recommendation' as const,
|
|
|
|
// limit: 10,
|
|
|
|
// offsetMode: true,
|
|
|
|
// };
|
2022-07-01 23:42:03 +09:00
|
|
|
|
|
|
|
let tab = $ref('notes');
|
2022-07-01 23:33:47 +09:00
|
|
|
</script>
|