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