forked from FoundKeyGang/FoundKey
client: show own pages as first tab
This commit is contained in:
parent
e4a7e9f9b0
commit
145a949480
1 changed files with 10 additions and 10 deletions
|
@ -2,15 +2,15 @@
|
||||||
<MkStickyContainer>
|
<MkStickyContainer>
|
||||||
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
||||||
<MkSpacer :content-max="700">
|
<MkSpacer :content-max="700">
|
||||||
<div v-if="tab === 'featured'" class="rknalgpo">
|
<div v-if="tab === 'my'" class="rknalgpo my">
|
||||||
<MkPagination v-slot="{items}" :pagination="featuredPagesPagination">
|
<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton>
|
||||||
|
<MkPagination v-slot="{items}" :pagination="myPagesPagination">
|
||||||
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="tab === 'my'" class="rknalgpo my">
|
<div v-else-if="tab === 'featured'" class="rknalgpo">
|
||||||
<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton>
|
<MkPagination v-slot="{items}" :pagination="featuredPagesPagination">
|
||||||
<MkPagination v-slot="{items}" :pagination="myPagesPagination">
|
|
||||||
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
<MkPagePreview v-for="page in items" :key="page.id" class="ckltabjg" :page="page"/>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
let tab = $ref('featured');
|
let tab = $ref('my');
|
||||||
|
|
||||||
const featuredPagesPagination = {
|
const featuredPagesPagination = {
|
||||||
endpoint: 'pages/featured' as const,
|
endpoint: 'pages/featured' as const,
|
||||||
|
@ -61,13 +61,13 @@ const headerActions = $computed(() => [{
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
const headerTabs = $computed(() => [{
|
const headerTabs = $computed(() => [{
|
||||||
key: 'featured',
|
|
||||||
title: i18n.ts._pages.featured,
|
|
||||||
icon: 'fas fa-fire-alt',
|
|
||||||
}, {
|
|
||||||
key: 'my',
|
key: 'my',
|
||||||
title: i18n.ts._pages.my,
|
title: i18n.ts._pages.my,
|
||||||
icon: 'fas fa-edit',
|
icon: 'fas fa-edit',
|
||||||
|
}, {
|
||||||
|
key: 'featured',
|
||||||
|
title: i18n.ts._pages.featured,
|
||||||
|
icon: 'fas fa-fire-alt',
|
||||||
}, {
|
}, {
|
||||||
key: 'liked',
|
key: 'liked',
|
||||||
title: i18n.ts._pages.liked,
|
title: i18n.ts._pages.liked,
|
||||||
|
|
Loading…
Reference in a new issue