mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
add alert
This commit is contained in:
@@ -791,8 +791,10 @@ onMounted(() => {
|
|||||||
if (accountInfo.value) {
|
if (accountInfo.value) {
|
||||||
settings.value = accountInfo.value.settings.songRequest
|
settings.value = accountInfo.value.settings.songRequest
|
||||||
}
|
}
|
||||||
|
if (accountInfo.value?.eventFetcherOnline != true) {
|
||||||
props.client.on('danmaku', onGetDanmaku)
|
props.client.on('danmaku', onGetDanmaku)
|
||||||
props.client.on('sc', onGetSC)
|
props.client.on('sc', onGetSC)
|
||||||
|
}
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
updateKey.value++
|
updateKey.value++
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@@ -809,18 +811,35 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NAlert type="info" v-if="accountInfo"> 启用点歌功能 <NSwitch :value="accountInfo?.settings.enableFunctions.includes(FunctionTypes.SongRequest)" @update:value="onUpdateFunctionEnable" /> </NAlert>
|
<NAlert type="info" v-if="accountInfo">
|
||||||
|
启用点歌功能
|
||||||
|
<NSwitch :value="accountInfo?.settings.enableFunctions.includes(FunctionTypes.SongRequest)" @update:value="onUpdateFunctionEnable" />
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<NText depth="3">
|
||||||
|
如果没有部署
|
||||||
|
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank"> VtsuruEventFetcher </NButton>
|
||||||
|
则其需要保持此页面开启才能点歌
|
||||||
|
</NText>
|
||||||
|
</NAlert>
|
||||||
<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 />
|
<br />
|
||||||
<NCard size="small">
|
<NCard size="small">
|
||||||
|
<NSpace align="center">
|
||||||
<NTooltip>
|
<NTooltip>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NButton @click="showOBSModal = true" type="primary" :disabled="!accountInfo"> OBS 组件 </NButton>
|
<NButton @click="showOBSModal = true" type="primary" :disabled="!accountInfo"> OBS 组件 </NButton>
|
||||||
</template>
|
</template>
|
||||||
{{ configCanEdit ? '' : '登陆后才可以使用此功能' }}
|
{{ configCanEdit ? '' : '登陆后才可以使用此功能' }}
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
|
<NAlert type="warning">
|
||||||
|
不要同时开多个页面, 会导致点歌重复! 可以考虑使用
|
||||||
|
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank"> VtsuruEventFetcher </NButton>
|
||||||
|
, 部署后还可以记录SC和上舰历史
|
||||||
|
</NAlert>
|
||||||
|
</NSpace>
|
||||||
</NCard>
|
</NCard>
|
||||||
<br />
|
<br />
|
||||||
<NCard>
|
<NCard>
|
||||||
@@ -918,9 +937,9 @@ onUnmounted(() => {
|
|||||||
</NTooltip>
|
</NTooltip>
|
||||||
</NSpace>
|
</NSpace>
|
||||||
<NSpace justify="end" align="center">
|
<NSpace justify="end" align="center">
|
||||||
<NTooltip>
|
<NTooltip v-if="song.song">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NButton circle type="success" style="height: 30px; width: 30px" :loading="isLrcLoading == song?.song?.key" :disabled="!song.song" @click="playMusic(song)">
|
<NButton circle type="success" style="height: 30px; width: 30px" :loading="isLrcLoading == song?.song?.key" @click="playMusic(song)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<NIcon :component="Play24Filled" />
|
<NIcon :component="Play24Filled" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user