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

44 lines
910 B
Vue
Raw Normal View History

2023-07-20 04:17:05 +09:00
<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>
2023-08-25 07:19:12 +09:00
import { ref } from "vue";
2023-07-20 04:17:05 +09:00
import XNotes from "@/components/MkNotes.vue";
import MkTab from "@/components/MkTab.vue";
import { i18n } from "@/i18n";
const paginationForLocal = {
endpoint: "notes/featured" as const,
2023-08-02 23:59:31 +09:00
limit: 15,
2023-07-20 04:17:05 +09:00
origin: "local",
offsetMode: true,
params: {
2023-08-02 23:59:31 +09:00
days: 5,
2023-07-20 04:17:05 +09:00
},
};
const paginationForRemote = {
endpoint: "notes/featured" as const,
2023-08-02 23:59:31 +09:00
limit: 15,
2023-07-20 04:17:05 +09:00
offsetMode: true,
params: {
origin: "remote",
2023-08-02 23:59:31 +09:00
days: 5,
2023-07-20 04:17:05 +09:00
},
};
2023-09-04 17:47:24 +09:00
const tab = ref("local");
2023-07-20 04:17:05 +09:00
</script>