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

44 lines
910 B
Vue
Raw Normal View History

<template>
2023-04-08 02:01:42 +02:00
<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 { ref } from "vue";
2023-04-08 02:01:42 +02:00
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 = {
2023-04-08 02:01:42 +02:00
endpoint: "notes/featured" as const,
2023-07-30 07:17:14 +02:00
limit: 15,
2023-04-08 02:01:42 +02:00
origin: "local",
offsetMode: true,
2023-04-07 07:48:07 +02:00
params: {
2023-07-30 07:17:14 +02:00
days: 5,
2023-04-08 02:01:42 +02:00
},
};
2023-02-12 21:07:07 +01:00
const paginationForRemote = {
2023-04-08 02:01:42 +02:00
endpoint: "notes/featured" as const,
2023-07-30 07:17:14 +02:00
limit: 15,
offsetMode: true,
2023-02-12 21:40:47 +01:00
params: {
2023-04-08 02:01:42 +02:00
origin: "remote",
2023-07-30 07:17:14 +02:00
days: 5,
2023-04-08 02:01:42 +02:00
},
};
2023-02-12 21:07:07 +01:00
const tab = ref("local");
</script>