mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
@@ -29,9 +29,8 @@ import {
|
||||
useMessage,
|
||||
NDivider,
|
||||
NTag,
|
||||
NAlert,
|
||||
} from 'naive-ui'
|
||||
import { ref, onMounted, h, onUnmounted } from 'vue'
|
||||
import { ref, onMounted, h } from 'vue'
|
||||
import { RouterLink, useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -90,9 +89,6 @@ onMounted(async () => {
|
||||
message.error('你不是从幻星平台访问此页面, 或未提供对应参数, 无法使用此功能')
|
||||
}
|
||||
})
|
||||
onUnmounted(() => {
|
||||
client.value?.Stop()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -112,7 +108,7 @@ onUnmounted(() => {
|
||||
<NPageHeader :subtitle="($route.meta.title as string) ?? ''">
|
||||
<template #extra>
|
||||
<NSpace align="center">
|
||||
<NTag :type="client?.roomAuthInfo.value ? 'success' : 'warning'"> {{ client?.roomAuthInfo.value ? `已连接 | ${client.roomAuthInfo.value?.anchor_info.uname}` : '未连接' }} </NTag>
|
||||
<NTag :type="client ? 'success' : 'warning'"> {{ client ? `已连接 | ${client.roomAuthInfo.value?.anchor_info.uname}` : '未连接' }} </NTag>
|
||||
<NSwitch :default-value="!isDarkMode()" @update:value="(value: string & number & boolean) => themeType = value ? ThemeType.Light : ThemeType.Dark">
|
||||
<template #checked>
|
||||
<NIcon :component="Sunny" />
|
||||
@@ -124,9 +120,7 @@ onUnmounted(() => {
|
||||
</NSpace>
|
||||
</template>
|
||||
<template #title>
|
||||
<NButton text tag="a" @click="$router.push({ name: 'open-live-index', query: $route.query })">
|
||||
<NText strong style="font-size: 1.4rem; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); text-justify: auto"> VTSURU | 开放平台 </NText>
|
||||
</NButton>
|
||||
<NText strong style="font-size: 1.4rem; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); text-justify: auto"> VTSURU | 开放平台 </NText>
|
||||
</template>
|
||||
</NPageHeader>
|
||||
</NLayoutHeader>
|
||||
@@ -158,23 +152,21 @@ onUnmounted(() => {
|
||||
</NText>
|
||||
</NSpace>
|
||||
</NLayoutSider>
|
||||
<NLayoutContent style="height: 100%; padding: 10px" :native-scrollbar="false">
|
||||
<RouterView v-if="client?.roomAuthInfo.value" v-slot="{ Component }">
|
||||
<NLayoutContent yle="height: 100%" :native-scrollbar="false">
|
||||
<RouterView v-if="client?.roomAuthInfo" v-slot="{ Component }">
|
||||
<KeepAlive>
|
||||
<component :is="Component" :room-info="client?.roomAuthInfo" :client="client" :code="authInfo.Code" />
|
||||
</KeepAlive>
|
||||
</RouterView>
|
||||
<template v-else>
|
||||
<NAlert type="info" title="正在请求弹幕客户端认证信息...">
|
||||
<NSpin show />
|
||||
</NAlert>
|
||||
<NSpin show />
|
||||
</template>
|
||||
<NBackTop />
|
||||
</NLayoutContent>
|
||||
</NLayout>
|
||||
<NLayoutFooter style="height: 30px" bordered>
|
||||
<NSpace justify="center" align="center" style="height: 100%">
|
||||
<NButton text tag="a" href="/" target="_blank" type="info"> vtsuru.live </NButton>
|
||||
<NButton text tag="a" href="/" target="_blank" type="info" secondary> vtsuru.live </NButton>
|
||||
</NSpace>
|
||||
</NLayoutFooter>
|
||||
</NLayout>
|
||||
|
||||
Reference in New Issue
Block a user