mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
update eventfetcher alert
This commit is contained in:
28
src/components/EventFetcherStatusCard.vue
Normal file
28
src/components/EventFetcherStatusCard.vue
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useAccount } from '@/api/account'
|
||||||
|
import { Info24Filled } from '@vicons/fluent'
|
||||||
|
import { NAlert, NButton, NDivider, NIcon, NTag, NTooltip } from 'naive-ui'
|
||||||
|
|
||||||
|
const accountInfo = useAccount()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<NAlert :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'info'">
|
||||||
|
<template #header>
|
||||||
|
EVENT-FETCHER 状态
|
||||||
|
<NTooltip>
|
||||||
|
<template #trigger>
|
||||||
|
<NIcon :component="Info24Filled" />
|
||||||
|
</template>
|
||||||
|
这是一个可以持续监听直播间内的 Superchat 和上舰事件并上传到本站进行记录的 Nodejs/.Net 程序
|
||||||
|
<br />
|
||||||
|
事件上传到本站后允许按照自定义范围进行查询, 并导出为 CSV 之类的表格
|
||||||
|
</NTooltip>
|
||||||
|
</template>
|
||||||
|
<NTag :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'error'">
|
||||||
|
{{ accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? '正常' : `异常: ${accountInfo.eventFetcherStatus}`) : '未连接' }}
|
||||||
|
</NTag>
|
||||||
|
<NDivider vertical />
|
||||||
|
<NButton v-if="accountInfo?.eventFetcherOnline != true" type="info" size="small" tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank"> 关于 EVENT-FETCHER </NButton>
|
||||||
|
</NAlert>
|
||||||
|
</template>
|
||||||
@@ -180,7 +180,7 @@ export default class DanmakuClient {
|
|||||||
console.log('[OPEN-LIVE] 正在停止弹幕客户端')
|
console.log('[OPEN-LIVE] 正在停止弹幕客户端')
|
||||||
this.client.stop()
|
this.client.stop()
|
||||||
} else {
|
} else {
|
||||||
console.warn('[OPEN-LIVE] 弹幕客户端未被启动')
|
console.warn('[OPEN-LIVE] 弹幕客户端未被启动, 忽略')
|
||||||
}
|
}
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
this.events = {
|
this.events = {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
|
|||||||
import { Question24Regular } from '@vicons/fluent'
|
import { Question24Regular } from '@vicons/fluent'
|
||||||
import VueTurnstile from 'vue-turnstile'
|
import VueTurnstile from 'vue-turnstile'
|
||||||
import { BiliAuthCodeStatusType } from '@/api/api-models'
|
import { BiliAuthCodeStatusType } from '@/api/api-models'
|
||||||
|
import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue'
|
||||||
|
|
||||||
const token = ref()
|
const token = ref()
|
||||||
const turnstile = ref()
|
const turnstile = ref()
|
||||||
@@ -227,6 +228,7 @@ async function ChangeBili() {
|
|||||||
<NButton size="small" @click="bindBiliCodeModalVisiable = true" type="info"> 进行绑定 </NButton>
|
<NButton size="small" @click="bindBiliCodeModalVisiable = true" type="info"> 进行绑定 </NButton>
|
||||||
</template>
|
</template>
|
||||||
</NCard>
|
</NCard>
|
||||||
|
<EventFetcherStatusCard />
|
||||||
<NAlert title="Token" type="info">
|
<NAlert title="Token" type="info">
|
||||||
请注意保管, 这个东西可以完全操作你的账号
|
请注意保管, 这个东西可以完全操作你的账号
|
||||||
<NInput type="password" :value="accountInfo?.token" show-password-on="click" status="error" />
|
<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 { saveAs } from 'file-saver'
|
||||||
import { List } from 'linqts'
|
import { List } from 'linqts'
|
||||||
import { isDarkMode } from '@/Utils'
|
import { isDarkMode } from '@/Utils'
|
||||||
|
import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue'
|
||||||
|
|
||||||
enum EventType {
|
enum EventType {
|
||||||
Guard,
|
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>
|
<NAlert v-if="!accountInfo?.isBiliVerified" type="warning"> 使用此功能前你需要先<NButton type="info" text @click="$router.push({ name: 'manage-biliVerify' })">认证Bilibili账号</NButton> </NAlert>
|
||||||
</NSpace>
|
</NSpace>
|
||||||
<NDivider />
|
<NDivider />
|
||||||
<NAlert title="EVENT-FETCHER 状态" :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'info'">
|
<EventFetcherStatusCard />
|
||||||
<NTag :type="accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? 'success' : 'warning') : 'error'">
|
|
||||||
{{ accountInfo?.eventFetcherOnline ? (accountInfo?.eventFetcherStatus == 'ok' ? '正常' : `异常: ${accountInfo.eventFetcherStatus}`) : '未连接' }}
|
|
||||||
</NTag>
|
|
||||||
</NAlert>
|
|
||||||
<NDivider />
|
<NDivider />
|
||||||
<NCard size="small" style="witdh: 100%">
|
<NCard size="small" style="witdh: 100%">
|
||||||
<template v-if="accountInfo?.eventFetcherOnline">
|
<template v-if="accountInfo?.eventFetcherOnline">
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ const accountInfo = useAccount()
|
|||||||
let client = new DanmakuClient(null)
|
let client = new DanmakuClient(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
client.Start()
|
if(accountInfo.value?.eventFetcherOnline != true){
|
||||||
|
client.Start()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
client.Stop()
|
client.Stop()
|
||||||
|
|||||||
@@ -825,8 +825,8 @@ onUnmounted(() => {
|
|||||||
<NAlert type="warning" v-else title="你尚未注册并登录 VTsuru.live, 大部分规则设置将不可用 (因为我懒得在前段重写一遍逻辑">
|
<NAlert type="warning" v-else title="你尚未注册并登录 VTsuru.live, 大部分规则设置将不可用 (因为我懒得在前段重写一遍逻辑">
|
||||||
<NButton @click="$router.push({ name: 'manage-index' })" type="primary"> 前往登录或注册 </NButton>
|
<NButton @click="$router.push({ name: 'manage-index' })" type="primary"> 前往登录或注册 </NButton>
|
||||||
</NAlert>
|
</NAlert>
|
||||||
|
<br />
|
||||||
<NAlert type="warning" closable>
|
<NAlert v-if="accountInfo?.eventFetcherOnline != true" type="warning" closable>
|
||||||
不要同时开多个页面, 会导致点歌重复! 可以考虑使用
|
不要同时开多个页面, 会导致点歌重复! 可以考虑使用
|
||||||
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank"> VtsuruEventFetcher </NButton>
|
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank"> VtsuruEventFetcher </NButton>
|
||||||
, 部署后还可以记录SC和上舰历史
|
, 部署后还可以记录SC和上舰历史
|
||||||
|
|||||||
Reference in New Issue
Block a user