Compare commits
1 Commits
timo/feat-
...
274478532e
| Author | SHA1 | Date | |
|---|---|---|---|
| 274478532e |
@@ -1 +0,0 @@
|
|||||||
v22.22.0
|
|
||||||
@@ -11,9 +11,6 @@
|
|||||||
"vueIndentScriptAndStyle": false,
|
"vueIndentScriptAndStyle": false,
|
||||||
"bracketSameLine": false,
|
"bracketSameLine": false,
|
||||||
"singleAttributePerLine": true,
|
"singleAttributePerLine": true,
|
||||||
"embeddedLanguageFormatting": "auto",
|
"experimentalSortPackageJson": false,
|
||||||
"experimentalSortPackageJson": true,
|
|
||||||
"experimentalSortImports": {},
|
|
||||||
"experimentalTailwindcss": {},
|
|
||||||
"ignorePatterns": []
|
"ignorePatterns": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,23 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||||
"plugins": [
|
"plugins": null,
|
||||||
"eslint",
|
|
||||||
"unicorn",
|
|
||||||
"vue",
|
|
||||||
"typescript",
|
|
||||||
"jsdoc",
|
|
||||||
"promise",
|
|
||||||
"vitest"
|
|
||||||
],
|
|
||||||
"categories": {},
|
"categories": {},
|
||||||
"rules": {},
|
"rules": {},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"jsx-a11y": {
|
||||||
|
"polymorphicPropName": null,
|
||||||
|
"components": {},
|
||||||
|
"attributes": {}
|
||||||
|
},
|
||||||
|
"next": {
|
||||||
|
"rootDir": []
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"formComponents": [],
|
||||||
|
"linkComponents": [],
|
||||||
|
"version": null,
|
||||||
|
"componentWrapperFunctions": []
|
||||||
|
},
|
||||||
"jsdoc": {
|
"jsdoc": {
|
||||||
"ignorePrivate": false,
|
"ignorePrivate": false,
|
||||||
"ignoreInternal": false,
|
"ignoreInternal": false,
|
||||||
@@ -31,4 +37,4 @@
|
|||||||
},
|
},
|
||||||
"globals": {},
|
"globals": {},
|
||||||
"ignorePatterns": []
|
"ignorePatterns": []
|
||||||
}
|
}
|
||||||
|
|||||||
10
.vscode/settings.json
vendored
@@ -1,14 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"oxc.fmt.configPath": ".oxfmtrc.json",
|
||||||
"editor.defaultFormatter": "oxc.oxc-vscode",
|
"editor.defaultFormatter": "oxc.oxc-vscode",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
// "editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
// "source.fixAll.oxc": "always"
|
"source.fixAll.oxc": "always"
|
||||||
// },
|
},
|
||||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "oxc.oxc-vscode"
|
"editor.defaultFormatter": "oxc.oxc-vscode"
|
||||||
},
|
|
||||||
"[json]": {
|
|
||||||
"editor.defaultFormatter": "oxc.oxc-vscode"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
74
Jenkinsfile
vendored
@@ -1,74 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
options {
|
|
||||||
timestamps()
|
|
||||||
}
|
|
||||||
|
|
||||||
parameters {
|
|
||||||
choice(
|
|
||||||
name: 'XSH_DEPLOY_TARGET',
|
|
||||||
choices: ['main'],
|
|
||||||
description: 'main:眩生花线上版本'
|
|
||||||
)
|
|
||||||
booleanParam(
|
|
||||||
name: 'XSH_DEPLOY_TO_PRODUCTION',
|
|
||||||
defaultValue: true,
|
|
||||||
description: '是否自动部署到线上环境(否则只构建产物)\n* 仅在 main 分支生效'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
tools {
|
|
||||||
nodejs 'NodeJS 22.22'
|
|
||||||
}
|
|
||||||
|
|
||||||
libraries {
|
|
||||||
lib('xsh-common@main')
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Checkout') {
|
|
||||||
steps {
|
|
||||||
checkout scm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Lint') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
corepack enable
|
|
||||||
pnpm install --registry=https://registry.npmmirror.com
|
|
||||||
pnpm run lint
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build') {
|
|
||||||
when {
|
|
||||||
allOf {
|
|
||||||
expression { currentBuild.currentResult == 'SUCCESS' }
|
|
||||||
expression { env.TAG_NAME != null }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
corepack enable
|
|
||||||
pnpm install --registry=https://registry.npmmirror.com
|
|
||||||
pnpm run generate
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
echo "Build finished: ${currentBuild.currentResult}"
|
|
||||||
}
|
|
||||||
success {
|
|
||||||
archiveArtifacts allowEmptyArchive: true, artifacts: 'dist/**', followSymlinks: true, onlyIfSuccessful: true
|
|
||||||
}
|
|
||||||
failure {
|
|
||||||
echo "Build failed"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 336 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 411 KiB |
@@ -96,7 +96,7 @@ const onCreateCourseGreenSubmit = async (
|
|||||||
BaseResponse<resp.gen.GBVideoCreate>
|
BaseResponse<resp.gen.GBVideoCreate>
|
||||||
>('App.Digital_VideoTask.Create', payload)
|
>('App.Digital_VideoTask.Create', payload)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.task_id) {
|
if (!!res.data.task_id) {
|
||||||
toast.add({
|
toast.add({
|
||||||
title: '创建成功',
|
title: '创建成功',
|
||||||
description: '视频已加入生成队列',
|
description: '视频已加入生成队列',
|
||||||
@@ -26,7 +26,7 @@ export const useHistory = defineStore(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
persist: {
|
persist: {
|
||||||
storage: piniaPluginPersistedstate.localStorage(),
|
storage: persistedState.localStorage,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -72,8 +72,8 @@ export const useLoginState = defineStore(
|
|||||||
{
|
{
|
||||||
persist: {
|
persist: {
|
||||||
key: 'xsh_assistant_persisted_state',
|
key: 'xsh_assistant_persisted_state',
|
||||||
storage: piniaPluginPersistedstate.localStorage(),
|
storage: persistedState.localStorage,
|
||||||
pick: ['is_logged_in', 'token', 'user'],
|
paths: ['is_logged_in', 'token', 'user'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -32,8 +32,8 @@ export const useTourState = defineStore(
|
|||||||
{
|
{
|
||||||
persist: {
|
persist: {
|
||||||
key: 'xsh_assistant_tour_state',
|
key: 'xsh_assistant_tour_state',
|
||||||
storage: piniaPluginPersistedstate.localStorage(),
|
storage: persistedState.localStorage,
|
||||||
pick: ['tourState'],
|
paths: ['tourState'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -135,10 +135,10 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative grid min-h-screen w-full">
|
<div class="relative grid w-full min-h-screen">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="inline-flex flex-col">
|
<h1 class="inline-flex flex-col">
|
||||||
<span class="text-lg font-bold text-neutral-600 dark:text-neutral-300">
|
<span class="text-lg text-neutral-600 dark:text-neutral-300 font-bold">
|
||||||
AIGC 微课视频研创平台
|
AIGC 微课视频研创平台
|
||||||
</span>
|
</span>
|
||||||
<!-- <span class="text-xs text-neutral-600 dark:text-neutral-300">眩生花科技</span> -->
|
<!-- <span class="text-xs text-neutral-600 dark:text-neutral-300">眩生花科技</span> -->
|
||||||
@@ -198,7 +198,7 @@ onMounted(async () => {
|
|||||||
</UBadge>
|
</UBadge>
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
class="max-w-40 truncate whitespace-nowrap font-medium text-gray-900 dark:text-white"
|
class="truncate whitespace-nowrap max-w-40 font-medium text-gray-900 dark:text-white"
|
||||||
>
|
>
|
||||||
{{ loginState.user?.username }}
|
{{ loginState.user?.username }}
|
||||||
</p>
|
</p>
|
||||||
@@ -208,7 +208,7 @@ onMounted(async () => {
|
|||||||
<span class="truncate">{{ item.label }}</span>
|
<span class="truncate">{{ item.label }}</span>
|
||||||
<UIcon
|
<UIcon
|
||||||
:name="item.icon"
|
:name="item.icon"
|
||||||
class="ms-auto size-4 flex-shrink-0 text-gray-400 dark:text-gray-500"
|
class="flex-shrink-0 h-4 w-4 text-gray-400 dark:text-gray-500 ms-auto"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</UDropdown>
|
</UDropdown>
|
||||||
@@ -230,7 +230,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
@apply bg-neutral-50 bg-fixed dark:bg-neutral-950;
|
@apply bg-neutral-50 dark:bg-neutral-950 bg-fixed;
|
||||||
/* @apply bg-[url('~/assets/background-pattern.svg')] dark:bg-[url('~/assets/background-pattern-dark.svg')]; */
|
/* @apply bg-[url('~/assets/background-pattern.svg')] dark:bg-[url('~/assets/background-pattern-dark.svg')]; */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,10 +271,10 @@ body {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
header {
|
header {
|
||||||
@apply fixed inset-x-0 z-30 h-16 border-b bg-white;
|
@apply fixed inset-x-0 h-16 bg-white border-b z-30;
|
||||||
@apply dark:border-neutral-800 dark:bg-neutral-900;
|
@apply dark:bg-neutral-900 dark:border-neutral-800;
|
||||||
@apply flex flex-row items-center justify-between px-4;
|
@apply flex flex-row items-center justify-between px-4;
|
||||||
@apply bg-opacity-50 backdrop-blur-3xl backdrop-saturate-150 dark:bg-opacity-50;
|
@apply bg-opacity-50 dark:bg-opacity-50 backdrop-blur-3xl backdrop-saturate-150;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
@@ -282,8 +282,8 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
@apply z-30 h-16 border-t bg-white;
|
@apply h-16 bg-white border-t z-30;
|
||||||
@apply dark:border-neutral-800 dark:bg-neutral-900;
|
@apply dark:bg-neutral-900 dark:border-neutral-800;
|
||||||
@apply flex flex-row items-center justify-between px-4;
|
@apply flex flex-row items-center justify-between px-4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
22
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xsh-assistant-next",
|
"name": "xsh-assistant",
|
||||||
"version": "2.0.0",
|
"version": "0.1.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
"lint:fix": "oxlint --fix",
|
"lint:fix": "oxlint --fix",
|
||||||
"postinstall": "nuxt prepare"
|
"postinstall": "nuxt prepare"
|
||||||
},
|
},
|
||||||
|
"packageManager": "pnpm@10.22.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ffmpeg/ffmpeg": "^0.12.15",
|
"@ffmpeg/ffmpeg": "^0.12.15",
|
||||||
"@ffmpeg/util": "^0.12.2",
|
"@ffmpeg/util": "^0.12.2",
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
"highlight.js": "^11.10.0",
|
"highlight.js": "^11.10.0",
|
||||||
"idb-keyval": "^6.2.1",
|
"idb-keyval": "^6.2.1",
|
||||||
"markdown-it": "^14.1.0",
|
"markdown-it": "^14.1.0",
|
||||||
"nuxt": "^4.3.1",
|
"nuxt": "^3.21.1",
|
||||||
"nuxt-driver.js": "^0.0.11",
|
"nuxt-driver.js": "^0.0.11",
|
||||||
"pinia-plugin-persistedstate": "^4.7.1",
|
"pinia-plugin-persistedstate": "^4.7.1",
|
||||||
"radix-vue": "^1.9.2",
|
"radix-vue": "^1.9.2",
|
||||||
@@ -42,22 +43,21 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/ui": "^2.20.0",
|
"@nuxt/ui": "^2.20.0",
|
||||||
"@nuxtjs/google-fonts": "^3.2.0",
|
"@nuxtjs/google-fonts": "^3.2.0",
|
||||||
"@pinia/nuxt": "^0.11.3",
|
"@pinia/nuxt": "^0.5.2",
|
||||||
"@tailwindcss/typography": "^0.5.13",
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
"@types/markdown-it": "^13.0.9",
|
"@types/markdown-it": "^13.0.9",
|
||||||
"@types/node": "^25.2.2",
|
"@types/node": "^25.2.2",
|
||||||
"@vite-pwa/nuxt": "^1.1.1",
|
"@vite-pwa/nuxt": "^0.5.0",
|
||||||
"@vueuse/core": "^14.2.0",
|
"@vueuse/core": "^10.11.1",
|
||||||
"@vueuse/nuxt": "^14.2.0",
|
"@vueuse/nuxt": "^10.11.1",
|
||||||
"dayjs-nuxt": "^2.1.11",
|
"dayjs-nuxt": "^2.1.9",
|
||||||
"oxfmt": "^0.28.0",
|
"oxfmt": "^0.28.0",
|
||||||
"oxlint": "^1.43.0",
|
"oxlint": "^1.43.0",
|
||||||
"sass": "^1.77.8",
|
"sass": "^1.77.8",
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"dayjs": "^1.11.19",
|
"dayjs": "^1.11.12",
|
||||||
"tailwindcss": "^3.4.7"
|
"tailwindcss": "^3.4.7"
|
||||||
},
|
}
|
||||||
"packageManager": "pnpm@10.22.0"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative flex w-full">
|
<div class="w-full flex relative">
|
||||||
<div
|
<div
|
||||||
class="absolute z-10 flex h-[calc(100vh-4rem)] w-full -translate-x-full flex-col border-r border-neutral-200 bg-neutral-100 p-4 transition-all duration-300 ease-out md:sticky md:w-[300px] md:translate-x-0 dark:border-neutral-700 dark:bg-neutral-900"
|
class="absolute -translate-x-full md:sticky md:translate-x-0 z-10 flex flex-col h-[calc(100vh-4rem)] bg-neutral-100 dark:bg-neutral-900 p-4 w-full md:w-[300px] border-r border-neutral-200 dark:border-neutral-700 transition-all duration-300 ease-out"
|
||||||
>
|
>
|
||||||
<div class="flex flex-1 flex-col overflow-auto overflow-x-hidden">
|
<div class="flex flex-col flex-1 overflow-auto overflow-x-hidden">
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<NavItem
|
<NavItem
|
||||||
@@ -107,7 +107,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
.subpage-enter-from,
|
.subpage-enter-from,
|
||||||
.subpage-leave-to {
|
.subpage-leave-to {
|
||||||
@apply translate-x-4 opacity-0;
|
@apply opacity-0 translate-x-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-screen-leave-active {
|
.loading-screen-leave-active {
|
||||||
516
pnpm-lock.yaml
generated
@@ -1,18 +1,13 @@
|
|||||||
{
|
{
|
||||||
// https://nuxt.com/docs/guide/concepts/typescript
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
"files": [],
|
"extends": "./.nuxt/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true
|
||||||
|
},
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "./.nuxt/tsconfig.app.json"
|
"path": "./tsconfig.node.json"
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./.nuxt/tsconfig.server.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./.nuxt/tsconfig.shared.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./.nuxt/tsconfig.node.json"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
11
tsconfig.node.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
}
|
||||||