diff --git a/app.vue b/app.vue index d5a176a..b6f2e11 100644 --- a/app.vue +++ b/app.vue @@ -26,6 +26,8 @@ onMounted(() => { icon: 'i-tabler-alert-triangle', }) modal.open(ModalAuthentication) + } else if (!res && !loginState.token) { + router.replace('/user/authenticate') } }) }) diff --git a/composables/useVideoSubtitleEmbedding.ts b/composables/useVideoSubtitleEmbedding.ts index f38f4b4..4750925 100644 --- a/composables/useVideoSubtitleEmbedding.ts +++ b/composables/useVideoSubtitleEmbedding.ts @@ -39,6 +39,8 @@ export const useVideoSubtitleEmbedding = async ( }; } + console.log(`video clip: ${videoUrl}`) + const videoClip = new MP4Clip((await fetch(videoUrl)).body!) const videoSprite = new OffscreenSprite(videoClip) videoSprite.time = { duration: videoClip.meta.duration, offset: 0 } diff --git a/layouts/authenticate.vue b/layouts/authenticate.vue new file mode 100644 index 0000000..369acfc --- /dev/null +++ b/layouts/authenticate.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/layouts/default.vue b/layouts/default.vue index e87dde5..12d9bda 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -37,28 +37,40 @@ const links = [ label: 'AI 工具导航', icon: 'tabler:planet', to: '/aigc/navigation', - } + }, ] const items = [ - [{ - label: 'support@fenshenzhike.com', - slot: 'account', - disabled: true, - }], [{ - label: '账号管理', - icon: 'i-tabler-user-circle', - to: '/profile' - }], [{ - label: '注销登录', - icon: 'i-tabler-logout', - click: () => loginState.logout().then(() => toast.add({ - title: '退出登录', - description: `您已成功退出登录账号`, - color: 'indigo', - icon: 'i-tabler-logout-2', - })), - }], + [ + { + label: 'support@fenshenzhike.com', + slot: 'account', + disabled: true, + }, + ], + [ + { + label: '账号管理', + icon: 'i-tabler-user-circle', + to: '/profile', + }, + ], + [ + { + label: '注销登录', + icon: 'i-tabler-logout', + click: () => + loginState.logout().then(() => { + toast.add({ + title: '退出登录', + description: `您已成功退出登录账号`, + color: 'indigo', + icon: 'i-tabler-logout-2', + }) + router.push({ path: '/user/authenticate' }) + }), + }, + ], ] const open_login_modal = () => { @@ -70,23 +82,38 @@ const open_login_modal = () => {

- AIGC 微课视频研创平台 + + AIGC 微课视频研创平台 +

- + {

已登录为 - + OP

-

+

{{ loginState.user?.username }}

@@ -124,11 +161,13 @@ const open_login_modal = () => {
- +
@@ -136,25 +175,25 @@ const open_login_modal = () => { \ No newline at end of file + diff --git a/pages/user/authenticate.vue b/pages/user/authenticate.vue new file mode 100644 index 0000000..d8ff52e --- /dev/null +++ b/pages/user/authenticate.vue @@ -0,0 +1,571 @@ + + + + +