Skip to content

🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"

TypeScript

feat: add vue-sonner toast and vee-validate for Shadcn Vue forms

Connor115059ab165d
diff --git a/web/package.json b/web/package.json
index 26ff06c..8dd26e0 100644
--- a/web/package.json
+++ b/web/package.json
@@ -20,6 +20,7 @@
"@element-plus/icons-vue": "^2.3.0",
"@ffmpeg/ffmpeg": "^0.12.15",
"@ffmpeg/util": "^0.12.2",
+ "@vee-validate/zod": "^4.15.1",
"@vueuse/core": "^14.2.1",
"axios": "^1.6.0",
"class-variance-authority": "^0.7.1",
@@ -32,9 +33,12 @@
"radix-vue": "^1.9.17",
"reka-ui": "^2.9.2",
"tailwind-merge": "^3.5.0",
+ "vee-validate": "^4.15.1",
"vue": "^3.4.0",
"vue-i18n": "^9.14.5",
- "vue-router": "^4.2.0"
+ "vue-router": "^4.2.0",
+ "vue-sonner": "^2.0.9",
+ "zod": "^3.25.76"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 5c3636c..8908135 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -17,6 +17,9 @@ importers:
'@ffmpeg/util':
specifier: ^0.12.2
version: 0.12.2
+ '@vee-validate/zod':
+ specifier: ^4.15.1
'@vueuse/core':
specifier: ^14.2.1
@@ -53,6 +56,9 @@ importers:
tailwind-merge:
specifier: ^3.5.0
version: 3.5.0
+ vee-validate:
+ specifier: ^4.15.1
vue:
specifier: ^3.4.0
version: 3.5.26([email protected])
@@ -62,6 +68,12 @@ importers:
vue-router:
specifier: ^4.2.0
+ vue-sonner:
+ specifier: ^2.0.9
+ version: 2.0.9
+ zod:
+ specifier: ^3.25.76
+ version: 3.25.76
devDependencies:
'@eslint/js':
specifier: ^10.0.1
@@ -1033,6 +1045,11 @@ packages:
resolution: {integrity: sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@vee-validate/[email protected]':
+ resolution: {integrity: sha512-329Z4TDBE5Vx0FdbA8S4eR9iGCFFUNGbxjpQ20ff5b5wGueScjocUIx9JHPa79LTG06RnlUR4XogQsjN4tecKA==}
+ peerDependencies:
+ zod: ^3.24.0
+
'@vitejs/[email protected]':
resolution: {integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -1096,6 +1113,15 @@ packages:
resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==}
+ resolution: {integrity: sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g==}
+
+ resolution: {integrity: sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==}
+
+ resolution: {integrity: sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==}
+
resolution: {integrity: sha512-IsGljWbKGU1MZpBPN+BvPAdr55YPkj2nB/TBNGNC32Vy2qLG25DYu/NBN2vNtZqdRbTRjaoYrahLrToim2NanA==}
peerDependencies:
@@ -1220,6 +1246,9 @@ packages:
resolution: {integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==}
hasBin: true
+ resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==}
+
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
@@ -1281,6 +1310,10 @@ packages:
resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==}
+ resolution: {integrity: sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-SsSDqdVRl+mjbIBkGWlk1gCGcc+HzBqCbH5EQ+1tkAFUdxq2KUGukXF1RqhmvXrrdrX7PDwSUkWgXS7E36KvGQ==}
@@ -1598,6 +1631,9 @@ packages:
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
hasBin: true
+ resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}
+
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
@@ -1628,6 +1664,10 @@ packages:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
@@ -1792,6 +1832,9 @@ packages:
resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==}
engines: {node: '>=16 || 14 >=14.17'}
+ resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
+
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@@ -1867,6 +1910,9 @@ packages:
resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
+ resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
+
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -1931,6 +1977,9 @@ packages:
peerDependencies:
vue: '>= 3.4.0'
+ resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
+
resolution: {integrity: sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -2077,6 +2126,10 @@ packages:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
@@ -2099,6 +2152,10 @@ packages:
resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==}
+ engines: {node: '>=16'}
+
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
engines: {node: '>=10'}
@@ -2153,6 +2210,10 @@ packages:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
+ resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
+ engines: {node: '>=16'}
+
resolution: {integrity: sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2183,6 +2244,11 @@ packages:
resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==}
+ resolution: {integrity: sha512-DkFsiTwEKau8VIxyZBGdO6tOudD+QoUBPuHj3e6QFqmbfCRj1ArmYWue9lEp6jLSWBIw4XPlDLjFIZNLdRAMSg==}
+ peerDependencies:
+ vue: ^3.4.26
+
resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -2323,6 +2389,20 @@ packages:
peerDependencies:
vue: ^3.5.0
+ resolution: {integrity: sha512-i6BokNlNDL93fpzNxN/LZSn6D6MzlO+i3qXt6iVZne3x1k7R46d5HlFB4P8tYydhgqOrRbIZEsnRd3kG7qGXyw==}
+ peerDependencies:
+ '@nuxt/kit': ^4.0.3
+ '@nuxt/schema': ^4.0.3
+ nuxt: ^4.0.3
+ peerDependenciesMeta:
+ '@nuxt/kit':
+ optional: true
+ '@nuxt/schema':
+ optional: true
+ nuxt:
+ optional: true
+
resolution: {integrity: sha512-P7OP77b2h/Pmk+lZdJ0YWs+5tJ6J2+uOQPo7tlBnY44QqQSPYvS0qVT4wqDJgwrZaLe47etJLLQRFia71GYITw==}
hasBin: true
@@ -2383,6 +2463,9 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
+
snapshots:
'@alloc/[email protected]': {}
@@ -3104,6 +3187,14 @@ snapshots:
'@typescript-eslint/types': 8.56.1
eslint-visitor-keys: 5.0.1
+ dependencies:
+ type-fest: 4.41.0
+ vee-validate: 4.15.1([email protected]([email protected]))
+ zod: 3.25.76
+ transitivePeerDependencies:
+ - vue
+
dependencies:
@@ -3197,6 +3288,24 @@ snapshots:
'@vue/[email protected]': {}
+ dependencies:
+ '@vue/devtools-kit': 7.7.9
+
+ dependencies:
+ '@vue/devtools-shared': 7.7.9
+ birpc: 2.9.0
+ hookable: 5.5.3
+ mitt: 3.0.1
+ perfect-debounce: 1.0.0
+ speakingurl: 14.0.1
+ superjson: 2.2.6
+
+ dependencies:
+ rfdc: 1.4.1
+
dependencies:
'@volar/language-core': 2.4.15
@@ -3333,6 +3442,8 @@ snapshots:
+
@@ -3392,6 +3503,10 @@ snapshots:
ini: 1.3.8
proto-list: 1.2.4
+ dependencies:
+ is-what: 5.5.0
+
dependencies:
'@cropper/elements': 2.1.0
@@ -3760,6 +3875,8 @@ snapshots:
+
@@ -3778,6 +3895,8 @@ snapshots:
dependencies:
is-extglob: 2.1.1
+
@@ -3910,6 +4029,8 @@ snapshots:
+
@@ -3971,6 +4092,8 @@ snapshots:
+
@@ -4048,6 +4171,8 @@ snapshots:
transitivePeerDependencies:
- '@vue/composition-api'
+
dependencies:
'@types/estree': 1.0.8
@@ -4194,6 +4319,8 @@ snapshots:
+
@@ -4218,6 +4345,10 @@ snapshots:
dependencies:
ansi-regex: 6.2.2
+ dependencies:
+ copy-anything: 4.0.5
+
dependencies:
has-flag: 4.0.0
@@ -4259,6 +4390,8 @@ snapshots:
dependencies:
prelude-ls: 1.2.1
+
dependencies:
@@ -4288,6 +4421,12 @@ snapshots:
+ dependencies:
+ '@vue/devtools-api': 7.7.9
+ type-fest: 4.41.0
+ vue: 3.5.26([email protected])
+
dependencies:
esbuild: 0.21.5
@@ -4386,6 +4525,8 @@ snapshots:
'@vue/devtools-api': 6.6.4
vue: 3.5.26([email protected])
+
dependencies:
'@volar/typescript': 2.4.15
@@ -4432,3 +4573,5 @@ snapshots:
+
diff --git a/web/src/App.vue b/web/src/App.vue
index 53da57f..ce4ce9e 100644
--- a/web/src/App.vue
+++ b/web/src/App.vue
@@ -4,15 +4,20 @@
<router-view />
</component>
</ErrorBoundary>
+ <Toaster position="top-right" :theme="isDark ? 'dark' : 'light'" />
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'
+import { Toaster } from 'vue-sonner'
import ErrorBoundary from '@/components/common/ErrorBoundary.vue'
import AppLayout from '@/components/layout/AppLayout.vue'
+import { useUIStore } from '@/stores/ui'
const route = useRoute()
+const uiStore = useUIStore()
+const isDark = computed(() => uiStore.isDark)
// Fullscreen pages (EpisodeWorkflow, ProfessionalEditor) use their own layout
const layout = computed(() => {