锁定 Outpost 主路径主题,并优化地图编辑属性面板浅色对比。

统一 outpost-light/purple/blue 壳层 token,修复扩展字段与操作按钮在浅色下的可读性。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zhaowei.huang
2026-07-26 11:31:53 +08:00
co-authored by Cursor
parent 6986370e9d
commit 95c1a74122
18 changed files with 3790 additions and 1651 deletions
@@ -53,7 +53,7 @@
<div class="aside-footer">
<span class="aside-footer-badge">v1.6</span>
<span v-if="!ui.sidebarCollapsed">{{ ui.activeTheme.name }} · {{ ui.activeTheme.preview }}</span>
<span v-if="!ui.sidebarCollapsed">{{ ui.activeTheme.name }}</span>
</div>
</el-aside>
@@ -82,6 +82,15 @@
<el-dropdown-menu>
<el-dropdown-item v-if="auth.scope === 'Platform'" command="wizard">配置向导</el-dropdown-item>
<el-dropdown-item command="status">服务状态</el-dropdown-item>
<el-dropdown-item divided disabled class="legacy-theme-label">高级 · 兼容主题</el-dropdown-item>
<el-dropdown-item
v-for="t in ui.legacyThemes"
:key="t.id"
:command="`theme:${t.id}`"
:class="{ 'is-legacy-active': t.id === ui.themeId }">
<span class="legacy-swatch" :style="{ background: t.preview }" />
{{ t.name }}
</el-dropdown-item>
<el-dropdown-item command="logout" divided>退出登录</el-dropdown-item>
</el-dropdown-menu>
</template>
@@ -97,10 +106,13 @@
</el-main>
<el-footer class="footer">
<span>{{ scopeLabel }} · webVRender :{{ vrPort }} · API {{ apiBase }}</span>
<span>{{ scopeLabel }} · Projection :{{ slPort }} · API {{ apiBase }}</span>
</el-footer>
</el-container>
</el-container>
<!-- 全局 AI 助手右侧抽屉 + 右下角悬浮唤起所有界面可呼出后端要求 Platform 权限故按 scope 显示 -->
<AiAssistantDrawer v-if="auth.scope === 'Platform'" />
</div>
</template>
@@ -113,13 +125,14 @@ import { useAuthStore } from '@/stores/auth'
import { useUiStore } from '@/stores/ui'
import ScopeSwitcher from '@/components/ScopeSwitcher.vue'
import ThemeSwitcher from '@/components/ThemeSwitcher.vue'
import AiAssistantDrawer from '@/components/assistant/AiAssistantDrawer.vue'
const route = useRoute()
const router = useRouter()
const auth = useAuthStore()
const ui = useUiStore()
const vrPort = computed(() => (import.meta.env.VITE_VRENDER_HOST as string | undefined)?.split(':')[1] ?? '8223')
const slPort = computed(() => (import.meta.env.VITE_SL_PORT as string | undefined) ?? '8222')
const apiBase = computed(() => (import.meta.env.VITE_API_BASE as string | undefined) ?? '/api')
const initial = computed(() => (auth.user?.displayName ?? auth.user?.username ?? '?').slice(0, 1).toUpperCase())
@@ -171,6 +184,10 @@ const activePath = computed(() => {
const currentTitle = computed(() => (route.meta.title as string | undefined) ?? '')
function onUserCommand(cmd: string) {
if (cmd.startsWith('theme:')) {
ui.setThemeId(cmd.slice('theme:'.length))
return
}
if (cmd === 'logout') {
auth.logout()
router.push('/login')
@@ -187,6 +204,7 @@ function onUserCommand(cmd: string) {
.app-shell {
position: relative;
height: 100vh;
height: 100dvh;
overflow: hidden;
}
@@ -236,6 +254,7 @@ function onUserCommand(cmd: string) {
position: relative;
z-index: 1;
height: 100vh;
height: 100dvh;
}
/* ─────────────── Sidebar ─────────────── */
@@ -549,3 +568,25 @@ function onUserCommand(cmd: string) {
flex-direction: column;
}
</style>
<style>
/* 用户菜单「兼容主题」项(teleport 到 body */
.legacy-theme-label {
font-size: 11px !important;
opacity: 0.65;
cursor: default !important;
}
.legacy-swatch {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
vertical-align: middle;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.el-dropdown-menu__item.is-legacy-active {
color: var(--mg-primary) !important;
font-weight: 600;
}
</style>