mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
update warn
This commit is contained in:
@@ -4,7 +4,7 @@ import { BiliAuthCodeStatusType } from '@/api/api-models'
|
||||
import { QueryGetAPI } from '@/api/query'
|
||||
import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue'
|
||||
import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
|
||||
import { Question24Regular } from '@vicons/fluent'
|
||||
import { Mic24Filled, Question24Regular } from '@vicons/fluent'
|
||||
import { useLocalStorage } from '@vueuse/core'
|
||||
import { NAlert, NButton, NCard, NCountdown, NDivider, NEllipsis, NIcon, NInput, NInputGroup, NModal, NPopconfirm, NSpace, NTag, NText, NTime, NTooltip, useLoadingBar, useMessage } from 'naive-ui'
|
||||
import { onUnmounted, ref } from 'vue'
|
||||
@@ -242,7 +242,15 @@ onUnmounted(() => {
|
||||
已认证 | {{ accountInfo?.biliId }}
|
||||
<NTag v-if="accountInfo.biliAuthCodeStatus == BiliAuthCodeStatusType.Active" type="success" size="small" :bordered="false"> 身份码: 有效 </NTag>
|
||||
<NTag v-else-if="accountInfo.biliAuthCodeStatus == BiliAuthCodeStatusType.Inactive" type="error" size="small" :bordered="false"> 身份码: 需更新 </NTag>
|
||||
<NTag v-else-if="accountInfo.biliAuthCodeStatus == BiliAuthCodeStatusType.Notfound" type="warning" size="small" :bordered="false"> 身份码: 需绑定 </NTag>
|
||||
<NTag v-else-if="accountInfo.biliAuthCodeStatus == BiliAuthCodeStatusType.Notfound" type="warning" size="small" :bordered="false">
|
||||
身份码: 需绑定
|
||||
<NTooltip>
|
||||
<template #trigger>
|
||||
<NIcon :component="Mic24Filled" />
|
||||
</template>
|
||||
如果你不是主播的话则不需要在意这个提示
|
||||
</NTooltip>
|
||||
</NTag>
|
||||
<NButton size="tiny" type="info" @click="bindBiliCodeModalVisiable = true"> 更新身份码 </NButton>
|
||||
<NPopconfirm @positive-click="resetBili">
|
||||
<template #trigger>
|
||||
|
||||
@@ -41,6 +41,7 @@ import {
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||
import { clearInterval, setInterval } from 'worker-timers'
|
||||
import MusicRequestOBS from '../obs/MusicRequestOBS.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
type Music = {
|
||||
id: number
|
||||
@@ -55,6 +56,8 @@ type WaitMusicInfo = {
|
||||
music: SongsInfo
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const settings = computed(() => {
|
||||
return musicRquestStore.settings
|
||||
})
|
||||
@@ -262,7 +265,11 @@ function stopListen() {
|
||||
message.success('已停止监听')
|
||||
}
|
||||
async function onGetEvent(data: EventModel) {
|
||||
if (!listening.value || !checkMessage(data.msg)) return
|
||||
if (!checkMessage(data.msg)) return
|
||||
if (!listening.value) {
|
||||
if (route.name == 'manage-musicRequest') message.warning('(有人点歌, 不过你还没有开启监听)')
|
||||
return
|
||||
}
|
||||
if (settings.value.orderCooldown && cooldown.value[data.uid] && data.uid != (accountInfo.value?.biliId ?? -1)) {
|
||||
const lastRequest = cooldown.value[data.uid]
|
||||
if (Date.now() - lastRequest < settings.value.orderCooldown * 1000) {
|
||||
@@ -317,7 +324,7 @@ async function getOutputDevice() {
|
||||
deviceList.value = list.filter((device) => device.kind === 'audiooutput').map((d) => ({ label: d.label, value: d.deviceId }))
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
message.error('获取音频输出设备失败: ' + err)
|
||||
message.error('获取音频输出设备失败, 获取你需要授予网页读取麦克风权限: ' + err)
|
||||
}
|
||||
}
|
||||
function blockMusic(song: SongsInfo) {
|
||||
|
||||
Reference in New Issue
Block a user