rudeshark.net/packages/client/src/pages/explore.featured.vue
2023-02-12 12:07:07 -08:00

38 lines
922 B
Vue

<template>
<MkSpacer :content-max="800">
<MkTab v-model="tab" style="margin-bottom: var(--margin);">
<option value="local">{{ i18n.ts.local }}</option>
<option value="remote">{{ i18n.ts.remote }}</option>
</MkTab>
<XNotes v-if="tab === 'local'" :pagination="paginationForLocal"/>
<XNotes v-else-if="tab === 'remote'" :pagination="paginationForRemote"/>
</MkSpacer>
</template>
<script lang="ts" setup>
import XNotes from '@/components/MkNotes.vue';
import MkTab from '@/components/MkTab.vue';
import { i18n } from '@/i18n';
const paginationForLocal = {
endpoint: 'notes/featured' as const,
limit: 10,
offsetMode: true,
};
const paginationForRemote = {
endpoint: 'notes/featured' as const,
limit: 10,
origin: 'remote',
offsetMode: true,
}
// const paginationForRemote = {
// endpoint: 'notes/polls/recommendation' as const,
// limit: 10,
// offsetMode: true,
// };
let tab = $ref('notes');
</script>