Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/locales/en/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const en = {
nav: {
home: 'Home',
dashboard: 'Dashboard',
portfolio: 'My Portfolio',
portfolio: 'My Portfolio'
},
header: {
search: 'Menu search',
Expand All @@ -21,7 +21,7 @@ const en = {
userCenter: 'Profile',
userSettings: 'Settings',
contactMe: 'Contact',
logout: 'Log out',
logout: 'Log out'
},
settingDrawer: {
title: 'Preferences',
Expand All @@ -31,11 +31,11 @@ const en = {
navigationMode: 'Navigation mode',
contentWidth: 'Content width',
other: 'Other settings',
visualEffects: 'Visual effects',
visualEffects: 'Visual effects'
},
navTheme: {
light: 'Light menu style',
dark: 'Dark menu style',
dark: 'Dark menu style'
},
enableDarkMode: 'Enable dark mode',
colors: {
Expand All @@ -46,13 +46,13 @@ const en = {
cyan: 'Cyan',
auroraGreen: 'Aurora Green',
geekBlue: 'Geek Blue',
purple: 'Purple',
purple: 'Purple'
},
customColor: 'Custom color',
layout: {
side: 'Side menu layout',
top: 'Top menu layout',
mix: 'Mixed menu layout',
mix: 'Mixed menu layout'
},
contentWidth: 'Content width',
contentWidthFixed: 'Fixed',
Expand All @@ -62,12 +62,12 @@ const en = {
grayMode: 'Grayscale mode',
compactMode: 'Compact mode',
fixedHeader: 'Fixed header',
fixedSider: 'Fixed sidebar',
fixedSider: 'Fixed sidebar'
},
effects: {
pointerFollow: 'Pointer follow',
pointerTrail: 'Pointer trail',
},
pointerTrail: 'Pointer trail'
}
},
menu: {
motion: 'Motion',
Expand Down Expand Up @@ -111,7 +111,7 @@ const en = {
vite: 'Vite',

error: 'Error',
errorBoundary: 'ErrorBoundary',
errorBoundary: 'ErrorBoundary'
},
svp: {
ariaPlaybackSettings: 'Playback settings',
Expand Down Expand Up @@ -190,8 +190,8 @@ const en = {
videoNetworkError: 'Network error: failed to load video',
videoDecodeError: 'Decode error (unsupported format/codec)',
videoSourceNotSupported: 'Video source unavailable (404/CORS/type unsupported)',
videoLoadFailed: 'Failed to load video',
},
videoLoadFailed: 'Failed to load video'
}
}

export default en
24 changes: 12 additions & 12 deletions src/locales/zh/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const zh = {
nav: {
home: '首页',
dashboard: '多路由设置',
portfolio: '我的作品集',
portfolio: '我的作品集'
},
header: {
search: '菜单搜索',
Expand All @@ -21,7 +21,7 @@ const zh = {
userCenter: '个人中心',
userSettings: '个人设置',
contactMe: '联 系 我',
logout: '退出登录',
logout: '退出登录'
},
settingDrawer: {
title: '偏好设置',
Expand All @@ -31,11 +31,11 @@ const zh = {
navigationMode: '导航模式',
contentWidth: '内容区域宽度',
other: '其他设置',
visualEffects: '视觉特效',
visualEffects: '视觉特效'
},
navTheme: {
light: '亮色菜单风格',
dark: '暗色菜单风格',
dark: '暗色菜单风格'
},
enableDarkMode: '开启暗黑模式',
colors: {
Expand All @@ -46,13 +46,13 @@ const zh = {
cyan: '明青',
auroraGreen: '极光绿',
geekBlue: 'Geek Blue',
purple: '酱紫',
purple: '酱紫'
},
customColor: '自定义颜色',
layout: {
side: '侧边菜单布局',
top: '顶部菜单布局',
mix: '混合菜单布局',
mix: '混合菜单布局'
},
contentWidth: '内容区域宽度',
contentWidthFixed: '固定',
Expand All @@ -62,12 +62,12 @@ const zh = {
grayMode: '灰色模式',
compactMode: '紧凑模式',
fixedHeader: '固定 Header',
fixedSider: '固定侧边菜单',
fixedSider: '固定侧边菜单'
},
effects: {
pointerFollow: '指针跟随',
pointerTrail: '指针轨迹',
},
pointerTrail: '指针轨迹'
}
},
menu: {
motion: '动效',
Expand Down Expand Up @@ -111,7 +111,7 @@ const zh = {
vite: 'Vite',

error: '错误',
errorBoundary: '错误边界',
errorBoundary: '错误边界'
},
svp: {
ariaPlaybackSettings: '播放设置',
Expand Down Expand Up @@ -190,8 +190,8 @@ const zh = {
videoNetworkError: '网络错误导致视频加载失败',
videoDecodeError: '视频解码失败(格式/编码不兼容)',
videoSourceNotSupported: '视频源不可用(404/跨域/类型不支持)',
videoLoadFailed: '视频加载失败',
},
videoLoadFailed: '视频加载失败'
}
}

export default zh
36 changes: 20 additions & 16 deletions src/pages/layout/proSider/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,33 @@ const ProSider = ({ children, theme = 'light' }) => {
style={isMobile ? { height: '100%' } : undefined}
>
{children}
{!isMobile ? (
<button
type="button"
className={styles.proLink}
aria-label={isSidebarOpen ? '收起侧边栏' : '展开侧边栏'}
onClick={() => toggleSidebar()}
>
{isSidebarOpen ? (
<MenuFoldOutlined style={{ fontSize: '18px', color: '#08c', cursor: 'pointer' }} />
) : (
<MenuUnfoldOutlined style={{ fontSize: '16px', color: '#08c', cursor: 'pointer' }} />
{!isMobile
? (
<button
type='button'
className={styles.proLink}
aria-label={isSidebarOpen ? '收起侧边栏' : '展开侧边栏'}
onClick={() => toggleSidebar()}
>
{isSidebarOpen
? (
<MenuFoldOutlined style={{ fontSize: '18px', color: '#08c', cursor: 'pointer' }} />
)
: (
<MenuUnfoldOutlined style={{ fontSize: '16px', color: '#08c', cursor: 'pointer' }} />
)}
</button>
)
: (
<Button type='link'>Pro React Admin</Button>
)}
</button>
) : (
<Button type="link">Pro React Admin</Button>
)}
</Layout.Sider>
)
}

ProSider.propTypes = {
children: PropTypes.node,
theme: PropTypes.string,
theme: PropTypes.string
// `isMobile` 由全局 Zustand 管理,组件直接读取,不再通过 props 传入
// 侧边栏折叠状态由全局 Zustand `isSidebarOpen` 管理
}
Expand Down
24 changes: 12 additions & 12 deletions src/pages/svgViewer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const { Title, Paragraph, Text } = Typography

const SvgViewer = () => {
return (
<FixTabPanel fill={true}>
<FixTabPanel fill>
<div
style={{
padding: 24,
minHeight: '100%',
background: 'linear-gradient(180deg,#0f1724 0%, rgba(15,23,36,0.6) 60%)',
color: '#fff',
color: '#fff'
}}
>
<div style={{ maxWidth: 1200, margin: '0 auto' }}>
Expand All @@ -24,7 +24,7 @@ const SvgViewer = () => {
justifyContent: 'space-between',
alignItems: 'center',
gap: 16,
marginBottom: 18,
marginBottom: 18
}}
>
<div>
Expand All @@ -45,7 +45,7 @@ const SvgViewer = () => {
borderRadius: 12,
boxShadow: '0 8px 30px rgba(2,6,23,0.6)',
background: 'rgba(255,255,255,0.03)',
color: '#fff',
color: '#fff'
}}
>
<Title level={4} style={{ color: '#fff' }}>
Expand Down Expand Up @@ -111,36 +111,36 @@ const SvgViewer = () => {
<Col xs={24} lg={16}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
<Card
title="技术架构图"
title='技术架构图'
extra={
<Space>
<Text type="secondary">提示:可以使用鼠标拖拽和方向键移动视图</Text>
<Text type='secondary'>提示:可以使用鼠标拖拽和方向键移动视图</Text>
</Space>
}
styles={{
body: { padding: 0, flex: 1, overflow: 'hidden', display: 'flex', position: 'relative' },
body: { padding: 0, flex: 1, overflow: 'hidden', display: 'flex', position: 'relative' }
}}
>
<div style={{ flex: 1, position: 'relative', height: '300px' }}>
<SvgPreview SvgComponent={DiagramSvg} downloadName="architecture-diagram.svg" />
<SvgPreview SvgComponent={DiagramSvg} downloadName='architecture-diagram.svg' />
{/* <SvgPreview svgSource={SVG_SOURCE} downloadName="architecture-diagram.svg" /> */}
{/* 如果需要直接作为组件渲染,可改为 <DiagramSvg/> */}
</div>
</Card>

<Card
title="路由/权限架构图"
title='路由/权限架构图'
extra={
<Space>
<Text type="secondary">提示:可以使用鼠标拖拽和方向键移动视图</Text>
<Text type='secondary'>提示:可以使用鼠标拖拽和方向键移动视图</Text>
</Space>
}
styles={{
body: { padding: 0, flex: 1, overflow: 'hidden', display: 'flex', position: 'relative' },
body: { padding: 0, flex: 1, overflow: 'hidden', display: 'flex', position: 'relative' }
}}
>
<div style={{ flex: 1, position: 'relative', height: '300px' }}>
<SvgPreview SvgComponent={DiagramSvgRbac} downloadName="architecture-diagram-rbac.svg" />
<SvgPreview SvgComponent={DiagramSvgRbac} downloadName='architecture-diagram-rbac.svg' />
</div>
</Card>
</div>
Expand Down
Loading