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

48 lines
1012 B
Vue
Raw Normal View History

<template>
2023-04-08 09:01:42 +09: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>
2023-04-08 09:01:42 +09:00
import XNotes from "@/components/MkNotes.vue";
import MkTab from "@/components/MkTab.vue";
import { i18n } from "@/i18n";
2023-02-13 05:07:07 +09:00
const paginationForLocal = {
2023-04-08 09:01:42 +09:00
endpoint: "notes/featured" as const,
limit: 10,
2023-04-08 09:01:42 +09:00
origin: "local",
offsetMode: true,
2023-04-07 14:48:07 +09:00
params: {
days: 14,
2023-04-08 09:01:42 +09:00
},
};
2023-02-13 05:07:07 +09:00
const paginationForRemote = {
2023-04-08 09:01:42 +09:00
endpoint: "notes/featured" as const,
limit: 20,
offsetMode: true,
2023-02-13 05:40:47 +09:00
params: {
2023-04-08 09:01:42 +09:00
origin: "remote",
2023-04-07 14:48:07 +09:00
days: 7,
2023-04-08 09:01:42 +09:00
},
};
2023-02-13 05:07:07 +09:00
// const paginationForRemote = {
// endpoint: 'notes/polls/recommendation' as const,
// limit: 10,
// offsetMode: true,
// };
2023-04-08 09:01:42 +09:00
let tab = $ref("local");
</script>