mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
update eventfetcher alert
This commit is contained in:
@@ -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() {
|
||||
<NButton size="small" @click="bindBiliCodeModalVisiable = true" type="info"> 进行绑定 </NButton>
|
||||
</template>
|
||||
</NCard>
|
||||
<EventFetcherStatusCard />
|
||||
<NAlert title="Token" type="info">
|
||||
请注意保管, 这个东西可以完全操作你的账号
|
||||
<NInput type="password" :value="accountInfo?.token" show-password-on="click" status="error" />
|
||||
|
||||
@@ -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(() => {
|
||||
<NAlert v-if="!accountInfo?.isBiliVerified" type="warning"> 使用此功能前你需要先<NButton type="info" text @click="$router.push({ name: 'manage-biliVerify' })">认证Bilibili账号</NButton> </NAlert>
|
||||
</NSpace>
|
||||
<NDivider />
|
||||
<NAlert title="EVENT-FETCHER 状态" :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'info'">
|
||||
<NTag :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'error'">
|
||||
{{ accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? '正常' : `异常: ${accountInfo.eventFetcherStatus}`) : '未连接' }}
|
||||
</NTag>
|
||||
</NAlert>
|
||||
<EventFetcherStatusCard />
|
||||
<NDivider />
|
||||
<NCard size="small" style="witdh: 100%">
|
||||
<template v-if="accountInfo?.eventFetcherOnline">
|
||||
|
||||
@@ -9,7 +9,9 @@ const accountInfo = useAccount()
|
||||
let client = new DanmakuClient(null)
|
||||
|
||||
onMounted(() => {
|
||||
client.Start()
|
||||
if(accountInfo.value?.eventFetcherOnline != true){
|
||||
client.Start()
|
||||
}
|
||||
})
|
||||
onUnmounted(() => {
|
||||
client.Stop()
|
||||
|
||||
Reference in New Issue
Block a user