Sharkey/packages/client/src/pages/search.vue

40 lines
900 B
Vue
Raw Normal View History

<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800">
2021-12-25 06:38:53 +02:00
<XNotes ref="notes" :pagination="pagination"/>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
2021-11-11 19:02:25 +02:00
import XNotes from '@/components/notes.vue';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
const props = defineProps<{
query: string;
channel?: string;
}>();
const pagination = {
2022-01-12 19:26:10 +02:00
endpoint: 'notes/search' as const,
limit: 10,
params: computed(() => ({
query: props.query,
channelId: props.channel,
})),
};
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.t('searchWith', { q: props.query }),
icon: 'fas fa-search',
bg: 'var(--bg)',
})));
</script>