Browse Source

feat: 修改主题

dev-zw-notification
zhaowei 5 months ago
parent
commit
9190020a88
5 changed files with 27 additions and 22 deletions
  1. +0
    -1
      react-ui/config/defaultSettings.ts
  2. +13
    -9
      react-ui/src/app.tsx
  3. +4
    -4
      react-ui/src/pages/Workspace/components/AssetsManagement/index.less
  4. +1
    -1
      react-ui/src/pages/Workspace/components/UserSpace/index.less
  5. +9
    -7
      react-ui/src/styles/theme.less

+ 0
- 1
react-ui/config/defaultSettings.ts View File

@@ -10,7 +10,6 @@ const Settings: ProLayoutProps & {
locale: 'zh-CN',
navTheme: 'light',
// 拂晓蓝
colorPrimary: '#1664ff',
// layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,


+ 13
- 9
react-ui/src/app.tsx View File

@@ -178,25 +178,29 @@ export const antd: RuntimeAntdConfig = (memo) => {
memo.theme ??= {};
memo.theme.token = {
colorPrimary: themes['primaryColor'],
colorPrimaryHover: themes['primaryHoverColor'],
colorPrimaryActive: themes['primaryActiveColor'],
colorPrimaryBg: 'rgba(81, 76, 249, 0.07)',
colorSuccess: themes['successColor'],
colorError: themes['errorColor'],
colorWarning: themes['warningColor'],
colorLink: themes['primaryColor'],
colorText: themes['textColor'],
fontSize: parseInt(themes['fontSize']),
controlHeightLG: 46,
};
memo.theme.components ??= {};
memo.theme.components.Tabs = {};
memo.theme.components.Button = {
defaultBg: 'rgba(22, 100, 255, 0.06)',
defaultBorderColor: 'rgba(22, 100, 255, 0.11)',
defaultColor: themes['textColor'],
defaultHoverBg: 'rgba(22, 100, 255, 0.06)',
defaultHoverBorderColor: 'rgba(22, 100, 255, 0.5)',
defaultHoverColor: '#3F7FFF',
defaultActiveBg: 'rgba(22, 100, 255, 0.12)',
defaultActiveBorderColor: 'rgba(22, 100, 255, 0.75)',
defaultActiveColor: themes['primaryColor'],
// defaultBg: 'rgba(22, 100, 255, 0.06)',
// defaultBorderColor: 'rgba(22, 100, 255, 0.11)',
// defaultColor: themes['textColor'],
// defaultHoverBg: 'rgba(22, 100, 255, 0.06)',
// defaultHoverBorderColor: 'rgba(22, 100, 255, 0.5)',
// defaultHoverColor: '#3F7FFF',
// defaultActiveBg: 'rgba(22, 100, 255, 0.12)',
// defaultActiveBorderColor: 'rgba(22, 100, 255, 0.75)',
// defaultActiveColor: themes['primaryColor'],
contentFontSize: parseInt(themes['fontSize']),
};
memo.theme.components.Input = {


+ 4
- 4
react-ui/src/pages/Workspace/components/AssetsManagement/index.less View File

@@ -28,7 +28,7 @@
margin-top: 12px;
margin-bottom: 30px;
padding: 2px 7px;
color: @primary-color-secondary;
color: @primary-color;
font-size: 13px;
background-color: rgba(187, 210, 255, 0.29);
border-radius: 2px;
@@ -40,14 +40,14 @@
width: 40%;
text-align: left;

&:nth-child(3n+2) {
&:nth-child(3n + 2) {
width: 30%;
text-align: center;
width: 30%;
}

&:nth-child(3n) {
width: 30%;
text-align: right;
width: 30%;
}

&__title {


+ 1
- 1
react-ui/src/pages/Workspace/components/UserSpace/index.less View File

@@ -33,7 +33,7 @@
&__role {
display: inline-block;
padding: 1px 7px;
color: @primary-color-secondary;
color: @primary-color;
font-size: 13px;
background-color: rgba(187, 210, 255, 0.29);
border-radius: 2px;


+ 9
- 7
react-ui/src/styles/theme.less View File

@@ -5,13 +5,13 @@
*/

// 颜色
@primary-color: #1664ff; // 主色调
@primary-color-secondary: #4e89ff;
@primary-color-hover: #69b1ff;
@primary-color: #514cf9; // 主色调
@primary-color-hover: #7c79ff;
@primary-color-active: #2735fe;
@sider-background-color: #f2f5f7; // 侧边栏背景颜色
@background-color: #f9fafb; // 页面背景颜色
@text-color: #1d1d20;
@text-color-secondary: #575757;
@text-color: #0c0d0e;
@text-color-secondary: #494a6f;
@text-color-tertiary: #8a8a8a;
@text-placeholder-color: rgba(0, 0, 0, 0.25);
@text-disabled-color: rgba(0, 0, 0, 0.25);
@@ -20,10 +20,10 @@
@warning-color: #f98e1b;
@abort-color: #8a8a8a;
@pending-color: #ecb934;
@underline-color: #5d93ff;
@underline-color: #514cf9;
@border-color: #eaeaea;

@link-hover-color: #69b1ff;
@link-hover-color: #514cf9;
@heading-color: rgba(0, 0, 0, 0.85);
@input-icon-hover-color: rgba(0, 0, 0, 0.85);

@@ -92,6 +92,8 @@
// 导出变量
:export {
primaryColor: @primary-color;
primaryHoverColor: @primary-color-hover;
primaryActiveColor: @primary-color-active;
successColor: @success-color;
errorColor: @error-color;
warningColor: @warning-color;


Loading…
Cancel
Save