chore: clear lint and sync admin story views

This commit is contained in:
2026-04-18 12:35:37 +08:00
parent bb575a7fe9
commit 9e1a17fa67
16 changed files with 670 additions and 355 deletions

View File

@@ -21,6 +21,7 @@ interface StoryItem {
title: string
image_url: string | null
created_at: string
mode: string
}
const router = useRouter()
@@ -60,6 +61,10 @@ function goToCreate() {
showCreateModal.value = true
}
function getStoryPath(story: StoryItem) {
return story.mode === 'storybook' ? `/storybook/view/${story.id}` : `/story/${story.id}`
}
onMounted(() => {
fetchStories()
if (router.currentRoute.value.query.openCreate) {
@@ -140,7 +145,7 @@ onMounted(() => {
<router-link
v-for="story in stories"
:key="story.id"
:to="`/story/${story.id}`"
:to="getStoryPath(story)"
class="block group"
>
<BaseCard hover padding="none" class="h-full overflow-hidden flex flex-col">