修复桌面端界面显示与稳定性问题
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
<aside class="desktop-sidebar">
|
||||
<header class="sidebar-head">
|
||||
<div class="sidebar-title-row">
|
||||
<h1>{{ TEXT.common.appName }}</h1>
|
||||
<div class="sidebar-app-brand">
|
||||
<img class="sidebar-app-icon" src="/icons/ctms-icon-192.png" alt="" aria-hidden="true" />
|
||||
<h1>{{ TEXT.common.appName }}</h1>
|
||||
</div>
|
||||
|
||||
<button v-if="showSidebarProjectChooser" class="study-switcher-trigger empty" type="button" @click="openDesktopProjectEntry">
|
||||
选择项目
|
||||
@@ -1383,6 +1386,23 @@ useDesktopShortcuts(
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sidebar-app-brand {
|
||||
display: inline-grid;
|
||||
min-width: 0;
|
||||
grid-template-columns: 30px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
.sidebar-app-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
@@ -2357,13 +2377,6 @@ useDesktopShortcuts(
|
||||
:global(.desktop-preferences-dialog .el-dialog__body) {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
:global(.desktop-preferences-dialog .el-dialog__body > *) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
:global([data-ctms-theme="dark"] .desktop-workbench) {
|
||||
|
||||
@@ -109,6 +109,8 @@ describe("desktop layout shell", () => {
|
||||
expect(tauriConfig).toContain('"decorations": true');
|
||||
expect(tauriConfig).toContain('"titleBarStyle": "Overlay"');
|
||||
expect(tauriConfig).toContain('"hiddenTitle": true');
|
||||
expect(tauriConfig).toContain('"backgroundColor": "#f9fafb"');
|
||||
expect(tauriConfig).toContain('"backgroundThrottling": "disabled"');
|
||||
expect(tauriConfig).toContain('"trafficLightPosition": { "x": 16, "y": 18 }');
|
||||
expect(layout).toContain("padding: 44px 10px 10px;");
|
||||
expect(layout).toContain("-webkit-app-region: drag;");
|
||||
@@ -159,7 +161,8 @@ describe("desktop layout shell", () => {
|
||||
expect(preferences).toContain('class="preferences-pane"');
|
||||
expect(preferences).toContain("const activeSectionId = ref<PreferenceSectionId>");
|
||||
expect(preferences).toContain('grid-template-columns: 232px minmax(0, 1fr);');
|
||||
expect(preferences).toContain("height: min(700px, calc(100vh - 96px));");
|
||||
expect(preferences).toContain("height: 700px;");
|
||||
expect(preferences).toContain("max-height: calc(100vh - 96px);");
|
||||
expect(preferences).toContain("scrollbar-gutter: stable;");
|
||||
expect(preferences).toContain('{ id: "connection", label: "连接"');
|
||||
expect(preferences).toContain('{ id: "appearance", label: "外观"');
|
||||
@@ -193,6 +196,7 @@ describe("desktop layout shell", () => {
|
||||
expect(desktopLayout).not.toContain(':global([data-ctms-theme="dark"]) .desktop-workbench');
|
||||
expect(desktopLayout).toContain('width="940px"');
|
||||
expect(webLayout).toContain('width="940px"');
|
||||
expect(desktopLayout).not.toContain(":global(.desktop-preferences-dialog .el-dialog__body > *)");
|
||||
expect(desktopLayout).toContain('title: "连接设置"');
|
||||
expect(webLayout).toContain('title: "连接设置"');
|
||||
expect(desktopLayout).not.toContain('router.push("/desktop/server-settings")');
|
||||
@@ -484,7 +488,9 @@ describe("desktop layout shell", () => {
|
||||
expect(styles).toContain("body.is-desktop-runtime .el-message-box__header");
|
||||
expect(styles).toContain("body.is-desktop-runtime .desktop-preferences-dialog");
|
||||
expect(styles).toContain("body.is-desktop-runtime .desktop-preferences-dialog .el-dialog__body");
|
||||
expect(styles).toContain("body.is-desktop-runtime .desktop-preferences-dialog .el-dialog__body {\n padding: 0;");
|
||||
expect(styles).toContain("body.is-desktop-runtime .desktop-preferences-dialog .el-dialog__body {\n height: 700px;");
|
||||
expect(styles).toContain("max-height: calc(100vh - 96px);");
|
||||
expect(styles).toContain("padding: 0;");
|
||||
expect(styles).toContain("body.is-desktop-runtime .el-message-box__btns");
|
||||
expect(styles).toContain("body.is-desktop-runtime .dialog-fade-enter-from .el-dialog");
|
||||
expect(styles).toContain("body.is-desktop-runtime .msgbox-fade-enter-from .el-message-box");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-container class="layout-container web-layout-container">
|
||||
<el-aside :width="isCollapsed ? '68px' : '200px'" class="layout-aside" :class="{ collapsed: isCollapsed }">
|
||||
<div class="aside-logo">
|
||||
<div class="logo-icon"></div>
|
||||
<img class="logo-icon" src="/icons/ctms-icon-192.png" alt="" aria-hidden="true" />
|
||||
<span class="logo-text">{{ TEXT.common.appName }}</span>
|
||||
</div>
|
||||
<el-menu
|
||||
@@ -1309,6 +1309,7 @@ useDesktopShortcuts(
|
||||
border-radius: 8px;
|
||||
margin-right: 12px;
|
||||
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26);
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
|
||||
Reference in New Issue
Block a user