From 91d3e3ac3f7da8eb5ee6bcd9c4f96cfad0d8ae4b Mon Sep 17 00:00:00 2001
From: Sycun <165354365+Sycun@users.noreply.github.com>
Date: Sun, 15 Nov 2026 11:11:37 +0800
Subject: [PATCH] fix(ui): use square corners for detail drawers
---
docs/ui-design-system.md | 2 +-
scripts/check-ui-design-system.cjs | 9 ++++++++-
web/static/css/design-system.css | 5 +----
web/templates/index.html | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/docs/ui-design-system.md b/docs/ui-design-system.md
index 3c7e9bfd..01c61c0c 100644
--- a/docs/ui-design-system.md
+++ b/docs/ui-design-system.md
@@ -1,7 +1,7 @@
# 界面样式约定
主应用的公共样式位于 `web/static/css/design-system.css`,在模块与移动端 CSS 后加载。
-颜色沿用现有主题变量;卡片圆角 16px,控件圆角 10px,桌面正文内边距 24px,移动端 16px。
+颜色沿用现有主题变量;抽屉外框统一为直角,卡片圆角 16px,控件圆角 10px,桌面正文内边距 24px,移动端 16px。
状态色、选中态、图表、终端和工作流画布保留各自的业务语义。
## 容器选择
diff --git a/scripts/check-ui-design-system.cjs b/scripts/check-ui-design-system.cjs
index e2f81f8f..c23a6b0e 100644
--- a/scripts/check-ui-design-system.cjs
+++ b/scripts/check-ui-design-system.cjs
@@ -107,6 +107,12 @@ const server = http.createServer((req, res) => {
w: r.width,
h: r.height,
bg: s.backgroundColor,
+ corners: [
+ s.borderTopLeftRadius,
+ s.borderTopRightRadius,
+ s.borderBottomRightRadius,
+ s.borderBottomLeftRadius,
+ ],
overflow: b ? b.scrollWidth > b.clientWidth + 2 : false,
footer: p
.querySelector(
@@ -134,7 +140,8 @@ const server = http.createServer((req, res) => {
Math.abs(info.x + info.w - width) > 2 ||
Math.abs(info.h - height) > 2 ||
info.footer > height + 1 ||
- info.overflow
+ info.overflow ||
+ info.corners.some((radius) => radius !== "0px")
)
findings.push({ width, theme, ...info });
if (
diff --git a/web/static/css/design-system.css b/web/static/css/design-system.css
index 8138ef47..89deaa0e 100644
--- a/web/static/css/design-system.css
+++ b/web/static/css/design-system.css
@@ -93,7 +93,7 @@ html body [data-ui-surface="drawer"] > :is(.modal-content, .projects-modal-dialo
padding: 0 !important;
border: 0;
border-inline-start: 1px solid var(--ui-border);
- border-radius: var(--ui-radius-card) 0 0 var(--ui-radius-card) !important;
+ border-radius: 0 !important;
display: flex;
flex-direction: column;
overflow: hidden !important;
@@ -102,9 +102,6 @@ html body [data-ui-surface="drawer"] > :is(.modal-content, .projects-modal-dialo
box-shadow: var(--ui-panel-shadow);
animation: app-panel-in .18s ease-out !important;
}
-html[dir="rtl"] body [data-ui-surface="drawer"] > :is(.modal-content, .projects-modal-dialog, .c2-modal) {
- border-radius: 0 var(--ui-radius-card) var(--ui-radius-card) 0 !important;
-}
html body [data-ui-surface="drawer"] :is(.modal-header, .projects-modal-header, .c2-modal-header, .vulnerability-inspector-header) {
display: flex;
align-items: center;
diff --git a/web/templates/index.html b/web/templates/index.html
index 249a7570..ea1be695 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -49,7 +49,7 @@
-
+