From 59583e53bd4f9c6bd4414e39feeff5fc992ccd23 Mon Sep 17 00:00:00 2001 From: butterfly Date: Thu, 25 Apr 2024 21:57:50 +0800 Subject: [PATCH] feat: light theme mode --- app/components/ActionsBar/index.tsx | 8 +- app/components/Btn/index.tsx | 14 +-- app/components/Card/index.tsx | 2 +- app/components/Input/index.tsx | 4 +- app/components/List/index.tsx | 9 +- app/components/Loading/index.tsx | 2 +- app/components/MenuLayout/index.tsx | 4 +- app/components/Popover/index.tsx | 2 +- app/components/Select/index.tsx | 11 +- app/components/SlideRange/index.tsx | 10 +- app/components/Switch/index.tsx | 8 +- app/components/ThumbnailImg/index.tsx | 2 +- app/containers/Chat/ChatActions.tsx | 10 +- app/containers/Chat/ChatHeader.tsx | 10 +- app/containers/Chat/ChatInputPanel.tsx | 15 ++- app/containers/Chat/ChatMessagePanel.tsx | 12 +- app/containers/Chat/ChatPanel.tsx | 18 ++- app/containers/Chat/ClearContextDivider.tsx | 39 ++++-- app/containers/Chat/MessageActions.tsx | 8 +- app/containers/Chat/PromptHint.tsx | 2 +- app/containers/Chat/index.tsx | 22 ++-- app/containers/Settings/DangerItems.tsx | 5 - app/containers/Settings/PromptSetting.tsx | 2 - app/containers/Settings/SettingHeader.tsx | 7 +- app/containers/Settings/SettingPanel.tsx | 2 +- app/containers/Settings/SyncItems.tsx | 5 - app/containers/Settings/index.tsx | 18 +-- app/containers/Sidebar/index.tsx | 3 +- app/hooks/useRows.ts | 9 +- app/hooks/useSwitchTheme.ts | 24 +--- app/icons/selectedIcon.svg | 3 + app/locales/cn.ts | 4 +- app/styles/globals.css | 87 ++++++++++++- tailwind.config.js | 128 +++++++++++++++----- 34 files changed, 335 insertions(+), 174 deletions(-) create mode 100644 app/icons/selectedIcon.svg diff --git a/app/components/ActionsBar/index.tsx b/app/components/ActionsBar/index.tsx index c121e1915..045459c4c 100644 --- a/app/components/ActionsBar/index.tsx +++ b/app/components/ActionsBar/index.tsx @@ -81,8 +81,8 @@ export default function ActionsBar(props: ActionsBarProps) { }%] flex flex-col items-center justify-center gap-0.5 ${ selected === action.id - ? "text-blue-700" - : "text-gray-400" + ? "text-text-sidebar-tab-mobile-active" + : "text-text-sidebar-tab-mobile-inactive" } `} onClick={handlerClick(action)} @@ -99,7 +99,9 @@ export default function ActionsBar(props: ActionsBarProps) {
diff --git a/app/components/Btn/index.tsx b/app/components/Btn/index.tsx index 3c7d9d68a..6be9883f1 100644 --- a/app/components/Btn/index.tsx +++ b/app/components/Btn/index.tsx @@ -31,24 +31,22 @@ export default function Btn(props: { switch (type) { case "primary": - btnClassName = `${disabled ? "bg-blue-300" : "bg-blue-600"} text-white`; + btnClassName = `${ + disabled ? "bg-primary-btn-disabled" : "bg-primary-btn shadow-btn" + } text-text-btn-primary `; break; case "danger": - btnClassName = `${ - disabled ? "bg-blue-300" : "bg-blue-600" - } text-text-danger`; + btnClassName = `bg-danger-btn text-text-btn-danger`; break; default: - btnClassName = `${ - disabled ? "bg-gray-100" : "bg-gray-300" - } text-gray-500`; + btnClassName = `bg-default-btn text-text-btn-default`; } return (