From d3bbb3bda7ef0dccee2163d0e4be7888c7757ba5 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Fri, 9 Aug 2024 23:01:03 +0800 Subject: [PATCH] add pink theme --- src/renderer/src/App.tsx | 2 +- src/renderer/src/main.tsx | 2 +- src/renderer/src/pages/settings.tsx | 1 + src/shared/types.d.ts | 2 +- tailwind.config.js | 7 +++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 9ae49fcf..8311931a 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -30,7 +30,7 @@ const App: React.FC = () => { useEffect(() => { setTheme(appTheme) - }, []) + }, [appTheme]) return (
diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index fe9000ab..20755d57 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -13,7 +13,7 @@ init().then(() => { diff --git a/src/renderer/src/pages/settings.tsx b/src/renderer/src/pages/settings.tsx index 930e217e..50e9d124 100644 --- a/src/renderer/src/pages/settings.tsx +++ b/src/renderer/src/pages/settings.tsx @@ -98,6 +98,7 @@ const Settings: React.FC = () => { + diff --git a/src/shared/types.d.ts b/src/shared/types.d.ts index d56fecda..6938a01a 100644 --- a/src/shared/types.d.ts +++ b/src/shared/types.d.ts @@ -1,7 +1,7 @@ type OutboundMode = 'rule' | 'global' | 'direct' type LogLevel = 'info' | 'debug' | 'warning' | 'error' | 'silent' type SysProxyMode = 'auto' | 'manual' -type AppTheme = 'system' | 'light' | 'dark' | 'gray' +type AppTheme = 'system' | 'light' | 'dark' | 'gray' | 'pink' type MihomoGroupType = 'Selector' | 'URLTest' | 'LoadBalance' | 'Relay' type MihomoProxyType = | 'Direct' diff --git a/tailwind.config.js b/tailwind.config.js index 033322a4..902e6f59 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -29,6 +29,13 @@ module.exports = { 400: '#a1a1aa' } } + }, + pink: { + extend: 'light', + colors: { + primary: '#ED9CC2', + secondary: '#71CCAA' + } } } })