From 04c89920754329dfcc3b71dd12e236da18c245c7 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期五, 10 一月 2025 09:15:58 +0800 Subject: [PATCH] 语言更新 --- src/design/theme.less | 125 +++++++++++++++++++++++++++++++++++------ 1 files changed, 106 insertions(+), 19 deletions(-) diff --git a/src/design/theme.less b/src/design/theme.less index aa05033..d17d868 100644 --- a/src/design/theme.less +++ b/src/design/theme.less @@ -1,5 +1,5 @@ .bg-white { - background-color: @component-background !important; + background-color: var(--component-background-color) !important; } html[data-theme='light'] { @@ -8,18 +8,18 @@ } .ant-alert-success { - background-color: #f6ffed; border: 1px solid #b7eb8f; + background-color: #f6ffed; } .ant-alert-error { - background-color: #fff2f0; border: 1px solid #ffccc7; + background-color: #fff2f0; } .ant-alert-warning { - background-color: #fffbe6; border: 1px solid #ffe58f; + background-color: #fffbe6; } :not(:root):fullscreen::backdrop { @@ -28,25 +28,112 @@ } [data-theme='dark'] { - .text-secondary { - color: #8b949e; + body { + background-color: #000; + color: @text-color-base; } - .ant-card-grid-hoverable:hover { - box-shadow: 0 3px 6px -4px rgb(0 0 0 / 48%), 0 6px 16px 0 rgb(0 0 0 / 32%), - 0 9px 28px 8px rgb(0 0 0 / 20%); - } + .ant-btn { + &[disabled], + &[disabled]:hover, + &[disabled]:focus, + &[disabled]:active { + border-color: #303030; + background: rgb(255 255 255 / 8%); + color: rgb(255 255 255 / 30%); + } - .ant-card-grid { - box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, - 0 1px 0 0 #434343 inset; - } + &-success.ant-btn-link.ant-btn-loading, + &-warning.ant-btn-link.ant-btn-loading, + &-error.ant-btn-link.ant-btn-loading, + &-background-ghost.ant-btn-link.ant-btn-loading, + &.ant-btn-link.ant-btn-loading { + &::before { + background: transparent; + } + } - .ant-calendar-selected-day .ant-calendar-date { - color: rgb(0 0 0 / 80%); - } + &:not( + .ant-btn-link, + .is-disabled, + .ant-btn-primary, + .ant-btn-success, + .ant-btn-warning, + .ant-btn-error, + .ant-btn-dangerous + ) { + background: transparent; + color: @text-color-base; - .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected { - color: rgb(0 0 0 / 90%); + &:hover { + color: @button-primary-hover-color; + } + } + + &-dangerous.ant-btn-primary { + &:focus { + background: @error-color !important; + } + } + + &-default.ant-btn-dangerous { + border-color: @error-color; + background: transparent !important; + color: @error-color; + + &:hover, + &:focus { + border-color: @button-error-hover-color !important; + color: @button-error-hover-color !important; + } + } + + &-default:not(.ant-btn-background-ghost) { + border-color: #303030; + + &:hover, + &:focus { + border-color: @button-cancel-hover-color; + color: @button-cancel-hover-color; + } + } + + &-default.is-disabled { + &:hover, + &:focus { + border-color: #303030; + color: rgb(255 255 255 / 30%); + } + } + + &-success:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) { + &:hover, + &:focus, + &:active { + border-color: @button-success-active-color !important; + background-color: @button-success-active-color !important; + color: @white !important; + } + } + + &-warning:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) { + &:hover, + &:focus, + &:active { + border-color: @button-warn-active-color !important; + background-color: @button-warn-active-color !important; + color: @white !important; + } + } + + &-error:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) { + &:hover, + &:focus, + &:active { + border-color: @button-error-active-color !important; + background-color: @button-error-active-color !important; + color: @white !important; + } + } } } -- Gitblit v1.9.3