Initial commit: clean project structure
- Backend: FastAPI + SQLAlchemy + Celery (Python 3.11+) - Frontend: Vue 3 + TypeScript + Pinia + Tailwind - Admin Frontend: separate Vue 3 app for management - Docker Compose: 9 services orchestration - Specs: design prototypes, memory system PRD, product roadmap Cleanup performed: - Removed temporary debug scripts from backend root - Removed deprecated admin_app.py (embedded UI) - Removed duplicate docs from admin-frontend - Updated .gitignore for Vite cache and egg-info
This commit is contained in:
38
admin-frontend/src/stores/storybook.ts
Normal file
38
admin-frontend/src/stores/storybook.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export interface StorybookPage {
|
||||
page_number: number
|
||||
text: string
|
||||
image_prompt: string
|
||||
image_url?: string
|
||||
}
|
||||
|
||||
export interface Storybook {
|
||||
id?: number // 新增
|
||||
title: string
|
||||
main_character: string
|
||||
art_style: string
|
||||
pages: StorybookPage[]
|
||||
cover_prompt: string
|
||||
cover_url?: string
|
||||
}
|
||||
|
||||
export const useStorybookStore = defineStore('storybook', () => {
|
||||
const currentStorybook = ref<Storybook | null>(null)
|
||||
|
||||
function setStorybook(storybook: Storybook) {
|
||||
currentStorybook.value = storybook
|
||||
}
|
||||
|
||||
function clearStorybook() {
|
||||
currentStorybook.value = null
|
||||
}
|
||||
|
||||
return {
|
||||
currentStorybook,
|
||||
setStorybook,
|
||||
clearStorybook,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user