From 4af2190e6d61ff65e977143aed5970f234aecf62 Mon Sep 17 00:00:00 2001 From: Megghy Date: Thu, 23 Nov 2023 18:49:37 +0800 Subject: [PATCH] update eventfetcher alert --- src/components/EventFetcherStatusCard.vue | 28 +++++++++++++++++++++++ src/data/DanmakuClient.ts | 2 +- src/views/manage/DashboardView.vue | 2 ++ src/views/manage/EventView.vue | 7 ++---- src/views/manage/SongRequestManage.vue | 4 +++- src/views/open_live/MusicRequest.vue | 4 ++-- 6 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 src/components/EventFetcherStatusCard.vue diff --git a/src/components/EventFetcherStatusCard.vue b/src/components/EventFetcherStatusCard.vue new file mode 100644 index 0000000..ec18259 --- /dev/null +++ b/src/components/EventFetcherStatusCard.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/data/DanmakuClient.ts b/src/data/DanmakuClient.ts index 412118e..d3aa9b3 100644 --- a/src/data/DanmakuClient.ts +++ b/src/data/DanmakuClient.ts @@ -180,7 +180,7 @@ export default class DanmakuClient { console.log('[OPEN-LIVE] 正在停止弹幕客户端') this.client.stop() } else { - console.warn('[OPEN-LIVE] 弹幕客户端未被启动') + console.warn('[OPEN-LIVE] 弹幕客户端未被启动, 忽略') } clearInterval(this.timer) this.events = { diff --git a/src/views/manage/DashboardView.vue b/src/views/manage/DashboardView.vue index 817233e..136054f 100644 --- a/src/views/manage/DashboardView.vue +++ b/src/views/manage/DashboardView.vue @@ -9,6 +9,7 @@ import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants' import { Question24Regular } from '@vicons/fluent' import VueTurnstile from 'vue-turnstile' import { BiliAuthCodeStatusType } from '@/api/api-models' +import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue' const token = ref() const turnstile = ref() @@ -227,6 +228,7 @@ async function ChangeBili() { 进行绑定 + 请注意保管, 这个东西可以完全操作你的账号 diff --git a/src/views/manage/EventView.vue b/src/views/manage/EventView.vue index 9ed200f..cbb6a28 100644 --- a/src/views/manage/EventView.vue +++ b/src/views/manage/EventView.vue @@ -37,6 +37,7 @@ import { computed, onMounted, ref } from 'vue' import { saveAs } from 'file-saver' import { List } from 'linqts' import { isDarkMode } from '@/Utils' +import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue' enum EventType { Guard, @@ -174,11 +175,7 @@ onMounted(() => { 使用此功能前你需要先认证Bilibili账号 - - - {{ accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? '正常' : `异常: ${accountInfo.eventFetcherStatus}`) : '未连接' }} - - +