add switch

This commit is contained in:
2024-02-21 12:04:41 +08:00
parent 76d1838768
commit aa7fbd47a0
65 changed files with 2220 additions and 806 deletions

View File

@@ -130,7 +130,15 @@ onUnmounted(() => {
<NResult status="error" title="无效访问">
<template #footer>
请前往
<NButton text type="primary" tag="a" href="https://play-live.bilibili.com/details/1698742711771" target="_blank"> 幻星平台 | VTsuru </NButton>
<NButton
text
type="primary"
tag="a"
href="https://play-live.bilibili.com/details/1698742711771"
target="_blank"
>
幻星平台 | VTsuru
</NButton>
并点击 获取 , 再点击 获取 H5 插件链接来获取可用链接
<br />
或者直接在那个页面用也可以, 虽然并不推荐
@@ -142,8 +150,15 @@ 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>
<NSwitch :default-value="!isDarkMode()" @update:value="(value: string & number & boolean) => (themeType = value ? ThemeType.Light : ThemeType.Dark)">
<NTag :type="client?.roomAuthInfo.value ? 'success' : 'warning'">
{{ client?.roomAuthInfo.value ? `已连接 | ${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" />
</template>
@@ -155,13 +170,25 @@ onUnmounted(() => {
</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>
<NText strong style="font-size: 1.4rem; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); text-justify: auto">
VTSURU | 开放平台
</NText>
</NButton>
</template>
</NPageHeader>
</NLayoutHeader>
<NLayout has-sider style="height: calc(100vh - 45px - 30px)">
<NLayoutSider bordered ref="sider" show-trigger default-collapsed collapse-mode="width" :collapsed-width="64" :width="180" :native-scrollbar="false" style="height: 100%">
<NLayoutSider
bordered
ref="sider"
show-trigger
default-collapsed
collapse-mode="width"
:collapsed-width="64"
:width="180"
:native-scrollbar="false"
style="height: 100%"
>
<Transition>
<div v-if="client?.roomAuthInfo" style="margin-top: 8px">
<NSpace vertical justify="center" align="center">
@@ -170,7 +197,9 @@ onUnmounted(() => {
:img-props="{ referrerpolicy: 'no-referrer' }"
round
bordered
:style="{ boxShadow: isDarkMode() ? 'rgb(195 192 192 / 35%) 0px 0px 8px' : '0 2px 3px rgba(0, 0, 0, 0.1)' }"
:style="{
boxShadow: isDarkMode() ? 'rgb(195 192 192 / 35%) 0px 0px 8px' : '0 2px 3px rgba(0, 0, 0, 0.1)',
}"
/>
<NEllipsis v-if="width > 100" style="max-width: 100%">
<NText strong>
@@ -180,7 +209,12 @@ onUnmounted(() => {
</NSpace>
</div>
</Transition>
<NMenu :default-value="$route.name?.toString()" :collapsed-width="64" :collapsed-icon-size="22" :options="menuOptions" />
<NMenu
:default-value="$route.name?.toString()"
:collapsed-width="64"
:collapsed-icon-size="22"
:options="menuOptions"
/>
<NSpace justify="center">
<NText depth="3" v-if="width > 150">
有更多功能建议请