From fd67cca2d43c82f2c1d8c3b34bbda09267f28fc2 Mon Sep 17 00:00:00 2001 From: smail Date: Sat, 5 Sep 2026 22:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E9=85=8D=E7=BD=AE=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E7=8A=B6=E6=80=81=E5=B9=B6=E5=9C=A8=E5=8F=AF=E8=A7=86?= =?UTF-8?q?=E5=8C=96=E8=A1=A8=E5=8D=95=E6=94=B9=E9=80=A0=E5=89=8D=E5=BB=BA?= =?UTF-8?q?=E7=AB=8B=E6=A3=80=E6=9F=A5=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConfigEditor/ConfigEditor.css | 139 ++++++++++++++++++ .../ConfigEditor/ConfigEditor.vue | 110 +++++++------- .../ConfigSettings/ConfigSettings.css | 59 +------- test/frontend/config-settings.test.mjs | 29 ++++ 4 files changed, 229 insertions(+), 108 deletions(-) create mode 100644 frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.css diff --git a/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.css b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.css new file mode 100644 index 0000000..60c0364 --- /dev/null +++ b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.css @@ -0,0 +1,139 @@ +.config-overview { + min-width: 0; + padding-bottom: 18px; + border-bottom: 1px solid var(--pm-border-color); +} + +.overview-heading { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 16px; +} + +.overview-copy { + flex: 1; + min-width: 0; +} + +.overview-title { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px 10px; +} + +.overview-title h3 { + margin: 0; + color: var(--pm-text-primary); + font-size: 20px; + line-height: 1.4; +} + +.overview-copy .settings-desc { + margin: 6px 0 0; +} + +.overview-actions { + display: flex; + align-items: center; + flex-wrap: wrap; + justify-content: flex-end; + gap: 8px; + padding-top: 2px; +} + +.overview-meta { + display: flex; + flex-wrap: wrap; + gap: 10px 0; + margin: 16px 0 0; +} + +.overview-meta-item { + display: flex; + align-items: baseline; + flex-wrap: wrap; + gap: 4px 8px; + min-width: 0; + padding: 0 16px; + border-left: 1px solid var(--pm-border-color); + font-size: 12px; + line-height: 1.7; +} + +.overview-meta-item:first-child { + padding-left: 0; + border-left: 0; +} + +.overview-meta-item dt { + color: var(--pm-text-secondary); +} + +.overview-meta-item dd { + margin: 0; + color: var(--pm-text-primary); + font-weight: 600; + font-variant-numeric: tabular-nums; + overflow-wrap: anywhere; +} + +.overview-meta-item .tag-list { + flex: 1; + min-width: 0; + gap: 6px; +} + +.overview-meta-warning { + flex: 1; +} + +.overview-meta-warning dt { + color: var(--el-color-warning-dark-2); +} + +.overview-meta :deep(.el-tag) { + max-width: 100%; + height: auto; + min-height: 20px; + white-space: normal; + overflow-wrap: anywhere; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + border: 0; +} + +@container config-main (max-width: 620px) { + .overview-heading { + flex-wrap: wrap; + gap: 12px; + } + + .overview-copy { + flex-basis: 100%; + } + + .overview-actions { + justify-content: flex-start; + padding-top: 0; + } + + .overview-meta { + gap: 8px 16px; + } + + .overview-meta-item { + padding: 0; + border-left: 0; + } +} diff --git a/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue index d395e57..295143e 100644 --- a/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue +++ b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue @@ -1,14 +1,63 @@