hippofish/packages/client/src/pages/explore.featured.vue

39 lines
940 B
Vue
Raw Normal View History

<template>
<MkSpacer :content-max="800">
2022-07-03 07:43:28 +02:00
<MkTab v-model="tab" style="margin-bottom: var(--margin);">
2023-02-12 21:07:07 +01:00
<option value="local">{{ i18n.ts.local }}</option>
<option value="remote">{{ i18n.ts.remote }}</option>
</MkTab>
2023-02-12 21:07:07 +01:00
<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';
2023-02-12 21:07:07 +01:00
const paginationForLocal = {
endpoint: 'notes/featured' as const,
limit: 10,
2023-02-12 21:15:21 +01:00
origin: 'local',
offsetMode: true,
};
2023-02-12 21:07:07 +01:00
const paginationForRemote = {
endpoint: 'notes/featured' as const,
limit: 10,
2023-02-12 21:07:07 +01:00
origin: 'remote',
offsetMode: true,
2023-02-12 21:07:07 +01:00
}
// const paginationForRemote = {
// endpoint: 'notes/polls/recommendation' as const,
// limit: 10,
// offsetMode: true,
// };
2023-02-12 21:15:21 +01:00
let tab = $ref('local');
</script>