Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
risk_case_library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Yang
risk_case_library
Commits
753f8f99
Commit
753f8f99
authored
Sep 29, 2026
by
drigle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: align shell theme with problem rectification
parent
ebd95398
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
32 deletions
+43
-32
ui-architecture.md
docs/ui-architecture.md
+7
-0
xinyuan-design-system.md
docs/xinyuan-design-system.md
+8
-0
shell.css
src/design-system/shell.css
+14
-6
theme.css
src/design-system/theme.css
+12
-12
tokens.css
src/design-system/tokens.css
+1
-1
Layout.jsx
src/pages/project_manager_xy/Layout.jsx
+1
-13
No files found.
docs/ui-architecture.md
View file @
753f8f99
# UI 架构
# UI 架构
## 2026-09-28 Shell 配色
-
AppShell 采用中性灰白内容画布与低饱和深藏蓝 Sidebar。页面画布由
`theme.css`
的
`--background: oklch(97.4% 0.002 255)`
提供;侧栏背景为
`oklch(32% 0.037 255)`
。桌面和移动侧栏共用
`--xinyuan-sidebar-*`
,选中导航为提亮的蓝色底与白字,侧栏红色 Logo 直接显示、不加底色;页面仍固定浅色,不提供主题切换。
-
内容画布在 AppShell 顶部使用 4% 侧栏蓝色与
`--background`
混合的轻微渐变,至 18rem 淡出到灰白底色;Navbar 和滚动区共用这一层,页面 Card 与 HeroUI 组件保持原有表面 Token。
-
当前导航使用较亮的同色系底色提高与侧栏的区分度,普通导航悬停保持侧栏同色系;当前项悬停保留选中底色和白色文字。
-
此调整仅涉及 Shell 视觉层,不改变 Sidebar 路由、通知入口、页面状态或业务数据协议。
## 运行结构
## 运行结构
应用为 Umi 4 / React 19,
`base`
与
`publicPath`
均为
`/risk_case_library/`
。
`Layout.jsx`
只负责根主题、HeroUI Pro Shell、路由标题、应用切换与真实退出;页面业务请求继续由现有 service/controller 管理。
应用为 Umi 4 / React 19,
`base`
与
`publicPath`
均为
`/risk_case_library/`
。
`Layout.jsx`
只负责根主题、HeroUI Pro Shell、路由标题、应用切换与真实退出;页面业务请求继续由现有 service/controller 管理。
...
...
docs/xinyuan-design-system.md
View file @
753f8f99
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
本项目直接采用 HeroUI/HeroUI Pro 与鑫元权威主题。“审计项目管理”应用是当前 Shell、列表、弹窗与应用切换的结构、尺寸、间距、组件层级与交互基准。本项目的鑫元基金品牌主色固定为
`#DA241A`
。HeroUI v3 的真实主按钮入口为
`--accent`
,同时维护
`--primary`
、
`--primary-50`
至
`--primary-950`
及对应
`--color-primary-*`
Tailwind 映射;
`--focus`
与品牌 Hover 固定使用品牌红体系,不允许默认蓝紫主题覆盖。
本项目直接采用 HeroUI/HeroUI Pro 与鑫元权威主题。“审计项目管理”应用是当前 Shell、列表、弹窗与应用切换的结构、尺寸、间距、组件层级与交互基准。本项目的鑫元基金品牌主色固定为
`#DA241A`
。HeroUI v3 的真实主按钮入口为
`--accent`
,同时维护
`--primary`
、
`--primary-50`
至
`--primary-950`
及对应
`--color-primary-*`
Tailwind 映射;
`--focus`
与品牌 Hover 固定使用品牌红体系,不允许默认蓝紫主题覆盖。
## 2026-09-28 Shell 配色调整
当前 AppShell 使用低饱和深藏蓝侧栏与中性灰白内容画布。
`theme.css`
的
`--background`
和
`--xinyuan-sidebar-*`
是这组配色的唯一来源:侧栏背景
`oklch(32% 0.037 255)`
,页面画布为
`oklch(97.4% 0.002 255)`
;侧栏文字为近白色,普通项悬停使用稍亮蓝色,选中项使用提亮蓝色底与白字。品牌主红
`#DA241A`
不变。侧栏红色 Logo 直接显示,不加底色。桌面与移动侧栏共用这些 Token,导航结构、交互及数据状态不变。
当前选中项底色为
`oklch(46% 0.055 255)`
,与深藏蓝侧栏明确区分。普通项悬停使用侧栏同色系;当前项悬停时保留选中底色和白色文字,不被普通悬停色覆盖。
内容画布顶部使用仅限 AppShell 的轻微渐变:
`--xinyuan-canvas-top`
从深藏蓝侧栏色与
`--background`
混合 4% 得到,在顶部至 18rem 处过渡回
`--background`
。Navbar 与页面滚动区透出同一层背景;Card、Surface、字段和浮层仍按 HeroUI 原有 Token 渲染。
## 依赖与样式
## 依赖与样式
-
基础控件直接从
`@heroui/react`
导入。
-
基础控件直接从
`@heroui/react`
导入。
...
...
src/design-system/shell.css
View file @
753f8f99
...
@@ -417,7 +417,7 @@
...
@@ -417,7 +417,7 @@
.app-shell-content-scroll
{
.app-shell-content-scroll
{
min-width
:
0
;
min-width
:
0
;
background
:
var
(
--rc-bg-canvas
)
;
background
:
transparent
;
overscroll-behavior
:
contain
;
overscroll-behavior
:
contain
;
}
}
...
@@ -1081,7 +1081,11 @@
...
@@ -1081,7 +1081,11 @@
overflow
:
hidden
;
overflow
:
hidden
;
border
:
0
;
border
:
0
;
border-radius
:
0
;
border-radius
:
0
;
background
:
var
(
--rc-bg-canvas
);
background
:
linear-gradient
(
180deg
,
var
(
--xinyuan-canvas-top
)
0
,
var
(
--rc-bg-canvas
)
18rem
);
}
}
.dark
.rc-app-main.sidebar__main
,
.dark
.rc-app-main.sidebar__main
,
...
@@ -1552,13 +1556,17 @@
...
@@ -1552,13 +1556,17 @@
color
:
var
(
--rc-sidebar-item-selected-foreground
)
!important
;
color
:
var
(
--rc-sidebar-item-selected-foreground
)
!important
;
}
}
.template-dashboard-shell
.sidebar__menu-item
:hover
.sidebar__menu-item-content
,
.template-dashboard-shell
.template-dashboard-shell
.sidebar__menu-item
[
data-hovered
=
'true'
]
.sidebar__menu-item
:not
([
data-current
=
'true'
])
:hover
.sidebar__menu-item-content
,
.template-dashboard-shell
.sidebar__menu-item
:not
([
data-current
=
'true'
])[
data-hovered
=
'true'
]
.sidebar__menu-item-content
,
.sidebar__menu-item-content
,
.rc-mobile-sidebar
.sidebar__menu-item
:hover
.sidebar__menu-item-content
,
.rc-mobile-sidebar
.rc-mobile-sidebar
.sidebar__menu-item
[
data-hovered
=
'true'
]
.sidebar__menu-item
:not
([
data-current
=
'true'
])
:hover
.sidebar__menu-item-content
,
.rc-mobile-sidebar
.sidebar__menu-item
:not
([
data-current
=
'true'
])[
data-hovered
=
'true'
]
.sidebar__menu-item-content
,
.sidebar__menu-item-content
,
.app-sidebar-user-trigger.dropdown__trigger
:hover
,
.app-sidebar-user-trigger.dropdown__trigger
:hover
,
.app-sidebar-user-trigger.dropdown__trigger
[
data-hovered
=
'true'
]
{
.app-sidebar-user-trigger.dropdown__trigger
[
data-hovered
=
'true'
]
{
...
...
src/design-system/theme.css
View file @
753f8f99
...
@@ -43,7 +43,8 @@
...
@@ -43,7 +43,8 @@
--accent
:
#DA241A
;
--accent
:
#DA241A
;
--accent-foreground
:
#FFFFFF
;
--accent-foreground
:
#FFFFFF
;
--accent-hover
:
#C91F17
;
--accent-hover
:
#C91F17
;
--background
:
oklch
(
97.02%
0.0000
29.20
);
--background
:
oklch
(
97.4%
0.002
255
);
--xinyuan-canvas-top
:
color-mix
(
in
oklab
,
var
(
--xinyuan-sidebar-background
)
4%
,
var
(
--background
));
--border
:
oklch
(
90.00%
0.0000
29.20
);
--border
:
oklch
(
90.00%
0.0000
29.20
);
--danger
:
oklch
(
45.32%
0.1661
27.03
);
--danger
:
oklch
(
45.32%
0.1661
27.03
);
--danger-foreground
:
oklch
(
99.11%
0
0
);
--danger-foreground
:
oklch
(
99.11%
0
0
);
...
@@ -82,18 +83,17 @@
...
@@ -82,18 +83,17 @@
--font-sans
:
var
(
--font-inter
);
--font-sans
:
var
(
--font-inter
);
/*
/*
* Xinyuan fixed split-shell contract.
* Xinyuan fixed light canvas with a muted navy Sidebar.
* The application canvas always uses this light theme. The Sidebar is the
* Navigation colors are kept separate from HeroUI surfaces.
* only persistent dark plane and must consume these semantic tokens.
*/
*/
--xinyuan-sidebar-background
:
oklch
(
16%
0.020
255
);
--xinyuan-sidebar-background
:
oklch
(
32%
0.037
255
);
--xinyuan-sidebar-border
:
oklch
(
26%
0.022
255
);
--xinyuan-sidebar-border
:
oklch
(
41%
0.036
255
);
--xinyuan-sidebar-foreground
:
oklch
(
97%
0.00
4
255
);
--xinyuan-sidebar-foreground
:
oklch
(
97%
0.00
5
255
);
--xinyuan-sidebar-muted
:
oklch
(
76
%
0.018
255
);
--xinyuan-sidebar-muted
:
oklch
(
82
%
0.018
255
);
--xinyuan-sidebar-item-hover
:
oklch
(
22%
0.026
255
);
--xinyuan-sidebar-item-hover
:
oklch
(
39%
0.042
255
);
--xinyuan-sidebar-item-selected
:
oklch
(
28%
0.016
255
);
--xinyuan-sidebar-item-selected
:
oklch
(
46%
0.055
255
);
--xinyuan-sidebar-item-selected-foreground
:
oklch
(
99%
0.002
255
);
--xinyuan-sidebar-item-selected-foreground
:
oklch
(
99%
0.002
255
);
--xinyuan-sidebar-focus
:
#DA241A
;
--xinyuan-sidebar-focus
:
oklch
(
85%
0.070
255
)
;
/*
/*
* ECharts is the required chart renderer for Xinyuan applications.
* ECharts is the required chart renderer for Xinyuan applications.
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
[
data-theme
=
"dark"
]
{
[
data-theme
=
"dark"
]
{
color-scheme
:
dark
;
color-scheme
:
dark
;
/* Theme Colors (Dark Mode) */
/* Theme Colors (Dark Mode) */
/* Keep brand
identity stable across the fixed light canvas and dark mode
. */
/* Keep brand
and focus stable across HeroUI theme contexts
. */
--primary-50
:
#FEF2F1
;
--primary-50
:
#FEF2F1
;
--primary-100
:
#FDE3E1
;
--primary-100
:
#FDE3E1
;
--primary-200
:
#FBC8C5
;
--primary-200
:
#FBC8C5
;
...
...
src/design-system/tokens.css
View file @
753f8f99
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
--rc-text-muted
:
var
(
--muted
);
--rc-text-muted
:
var
(
--muted
);
--rc-text-empty
:
color-mix
(
in
oklab
,
var
(
--muted
)
72%
,
var
(
--background
));
--rc-text-empty
:
color-mix
(
in
oklab
,
var
(
--muted
)
72%
,
var
(
--background
));
/*
Fixed dark
Sidebar aliases. The content canvas remains light. */
/*
Muted navy
Sidebar aliases. The content canvas remains light. */
--rc-sidebar-background
:
var
(
--xinyuan-sidebar-background
);
--rc-sidebar-background
:
var
(
--xinyuan-sidebar-background
);
--rc-sidebar-border
:
var
(
--xinyuan-sidebar-border
);
--rc-sidebar-border
:
var
(
--xinyuan-sidebar-border
);
--rc-sidebar-foreground
:
var
(
--xinyuan-sidebar-foreground
);
--rc-sidebar-foreground
:
var
(
--xinyuan-sidebar-foreground
);
...
...
src/pages/project_manager_xy/Layout.jsx
View file @
753f8f99
import
xyLogoRed
from
'@/assets/identity/xy-logo-red.png'
;
import
xyLogoRed
from
'@/assets/identity/xy-logo-red.png'
;
import
xyLogoWhite
from
'@/assets/identity/xy-logo-white.png'
;
import
{
APP_DISPLAY_NAME
}
from
'@/constants/app'
;
import
{
APP_DISPLAY_NAME
}
from
'@/constants/app'
;
import
ApplicationSwitcherDialog
from
'@/pages/project_manager_xy/ApplicationSwitcherDialog'
;
import
ApplicationSwitcherDialog
from
'@/pages/project_manager_xy/ApplicationSwitcherDialog'
;
import
{
import
{
...
@@ -51,18 +50,7 @@ function getUserDisplay(userInfo) {
...
@@ -51,18 +50,7 @@ function getUserDisplay(userInfo) {
function
SidebarLogo
()
{
function
SidebarLogo
()
{
return
(
return
(
<>
<
img
alt=
"鑫元"
className=
"rc-sidebar-logo"
src=
{
xyLogoRed
}
/>
<
img
alt=
"鑫元"
className=
"rc-sidebar-logo rc-sidebar-logo--light"
src=
{
xyLogoRed
}
/>
<
img
alt=
"鑫元"
className=
"rc-sidebar-logo rc-sidebar-logo--dark"
src=
{
xyLogoWhite
}
/>
</>
);
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment