From 3582cbcf646731180b33131c4ab7898e0d714ca0 Mon Sep 17 00:00:00 2001 From: Megghy Date: Fri, 17 Oct 2025 20:30:04 +0800 Subject: [PATCH] feat: add vote countdown timer and improve initialization UI --- src/api/api-models.ts | 1 + src/client/ClientLayout.vue | 60 ++++++++++++++++--- src/client/data/initialize.ts | 67 ++++++++++++++++----- src/components.d.ts | 12 ++-- src/views/manage/HistoryView.vue | 4 ++ src/views/obs/DanmakuVoteOBS.vue | 36 ++++++++++-- src/views/open_live/DanmakuVote.vue | 91 +++++++++++++++++++++++------ 7 files changed, 220 insertions(+), 51 deletions(-) diff --git a/src/api/api-models.ts b/src/api/api-models.ts index 2049c2a..cb0bb2f 100644 --- a/src/api/api-models.ts +++ b/src/api/api-models.ts @@ -1018,4 +1018,5 @@ export interface VoteOBSData { optionColor: string roundedCorners: boolean displayPosition: string + endTime?: number } diff --git a/src/client/ClientLayout.vue b/src/client/ClientLayout.vue index 52e815b..4141618 100644 --- a/src/client/ClientLayout.vue +++ b/src/client/ClientLayout.vue @@ -15,7 +15,7 @@ import { RouterLink, RouterView } from 'vue-router' // 引入 Vue Router 组件 import { ACCOUNT, GetSelfAccount, isLoadingAccount, isLoggedIn } from '@/api/account' import { useWebFetcher } from '@/store/useWebFetcher' -import { initAll, OnClientUnmounted } from './data/initialize' +import { initAll, OnClientUnmounted, clientInited, clientInitStage } from './data/initialize' import { useDanmakuWindow } from './store/useDanmakuWindow' // 引入子组件 import WindowBar from './WindowBar.vue' @@ -141,6 +141,18 @@ onMounted(() => {