Compare commits

...

2 Commits

Author SHA1 Message Date
c922f8358a feat: 更新用户UID和权限设置显示
- 修改用户UID显示逻辑,优先显示UID,若无则显示OpenID
- 更新权限设置中的标签,改为“需要舰长”、“需要提督”和“需要总督”
2025-05-01 19:20:15 +08:00
a8d43fae13 feat: 优化OBS布局和样式
- 在 App.vue 中移除 NGlobalStyle 组件
- 在 OBSLayout.vue 中更新容器样式,确保高度为100vh并添加overflow隐藏
- 在 FreshRequestOBS.vue 中增加最大高度限制,确保不超出视口高度,并强制隐藏溢出
2025-05-01 16:52:40 +08:00
4 changed files with 22 additions and 8 deletions

View File

@@ -95,7 +95,6 @@
<Suspense> <Suspense>
<TempComponent> <TempComponent>
<NLayoutContent> <NLayoutContent>
<NGlobalStyle />
<NElement style="height: 100vh;"> <NElement style="height: 100vh;">
<ViewerLayout v-if="layout == 'viewer'" /> <ViewerLayout v-if="layout == 'viewer'" />
<ManageLayout v-else-if="layout == 'manage'" /> <ManageLayout v-else-if="layout == 'manage'" />

View File

@@ -43,7 +43,7 @@ onUnmounted(() => {
</script> </script>
<template> <template>
<div style="height: 100vh;"> <div class="obs-container">
<RouterView v-slot="{ Component }"> <RouterView v-slot="{ Component }">
<KeepAlive> <KeepAlive>
<Suspense> <Suspense>
@@ -60,3 +60,18 @@ onUnmounted(() => {
</RouterView> </RouterView>
</div> </div>
</template> </template>
<style>
.obs-container {
height: 100vh;
overflow: hidden;
position: relative;
}
/* 确保OBS中不出现滚动条 */
body {
overflow: hidden;
margin: 0;
padding: 0;
}
</style>

View File

@@ -259,6 +259,7 @@ onUnmounted(() => {
width: 100%; width: 100%;
min-height: 150px; /* 增加最小高度 */ min-height: 150px; /* 增加最小高度 */
min-width: 250px; /* 增加最小宽度 */ min-width: 250px; /* 增加最小宽度 */
max-height: 100vh; /* 确保在OBS中不超出视口高度 */
background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 245, 250, 0.85) 100%); background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 245, 250, 0.85) 100%);
border-radius: 16px; /* 更大的圆角 */ border-radius: 16px; /* 更大的圆角 */
color: #333; color: #333;
@@ -406,7 +407,7 @@ onUnmounted(() => {
/* 歌曲列表 */ /* 歌曲列表 */
.fresh-request-list-container { .fresh-request-list-container {
flex: 1; /* 占据剩余空间 */ flex: 1; /* 占据剩余空间 */
overflow: hidden; overflow: hidden !important; /* 强制隐藏溢出 */
padding: 0 12px; /* 调整左右内边距 */ padding: 0 12px; /* 调整左右内边距 */
margin-bottom: 8px; margin-bottom: 8px;
position: relative; /* 为空状态居中 */ position: relative; /* 为空状态居中 */

View File

@@ -1255,7 +1255,7 @@ function getIndexStyle(status: QueueStatus): CSSProperties {
<template #trigger> <template #trigger>
{{ queueData.user?.name }} {{ queueData.user?.name }}
</template> </template>
UID: {{ queueData.user?.uid ?? 'N/A' }} {{ queueData.user?.uid ? `UID: ${queueData.user?.uid}` : `OpenID: ${queueData.user?.oid}` }}
</NTooltip> </NTooltip>
</NText> </NText>
<!-- 粉丝牌 --> <!-- 粉丝牌 -->
@@ -1264,7 +1264,6 @@ function getIndexStyle(status: QueueStatus): CSSProperties {
size="tiny" size="tiny"
round round
:bordered="false" :bordered="false"
:color="{ color: '#f0f0f0', textColor: '#555' }"
style="padding: 0 5px 0 0;" style="padding: 0 5px 0 0;"
> >
<NTag <NTag
@@ -1597,19 +1596,19 @@ function getIndexStyle(status: QueueStatus): CSSProperties {
v-model:checked="settings.needJianzhang" v-model:checked="settings.needJianzhang"
@update:checked="updateSettings" @update:checked="updateSettings"
> >
允许舰长 需要舰长
</NCheckbox> </NCheckbox>
<NCheckbox <NCheckbox
v-model:checked="settings.needTidu" v-model:checked="settings.needTidu"
@update:checked="updateSettings" @update:checked="updateSettings"
> >
允许提督 需要提督
</NCheckbox> </NCheckbox>
<NCheckbox <NCheckbox
v-model:checked="settings.needZongdu" v-model:checked="settings.needZongdu"
@update:checked="updateSettings" @update:checked="updateSettings"
> >
允许总督 需要总督
</NCheckbox> </NCheckbox>
</NSpace> </NSpace>
</NSpace> </NSpace>