From 3d3410b4fd664849dd927702bcca45ecc7116945 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Mon, 23 Sep 2024 09:29:09 +0800 Subject: [PATCH] feat: use rounded corner design --- src/main/config.ts | 4 +- src/main/window.ts | 1 + src/renderer/index.html | 16 +++- src/renderer/src/assets/styles/index.scss | 74 +++++++++++++------ src/renderer/src/components/MinApp/index.tsx | 32 +++++++- .../components/Popups/AddAssistantPopup.tsx | 8 +- src/renderer/src/components/app/Navbar.tsx | 6 +- src/renderer/src/components/app/Sidebar.tsx | 12 +-- src/renderer/src/context/ThemeProvider.tsx | 5 ++ src/renderer/src/hooks/useAppInit.ts | 12 ++- src/renderer/src/pages/agents/AgentsPage.tsx | 3 +- src/renderer/src/pages/apps/AppsPage.tsx | 3 +- src/renderer/src/pages/files/FilesPage.tsx | 3 +- src/renderer/src/pages/home/Chat.tsx | 1 + src/renderer/src/pages/home/HomePage.tsx | 3 +- .../src/pages/home/Inputbar/Inputbar.tsx | 2 - src/renderer/src/pages/home/Navbar.tsx | 4 +- src/renderer/src/pages/home/RightSidebar.tsx | 12 ++- .../src/pages/settings/SettingsPage.tsx | 3 +- .../src/pages/translate/TranslatePage.tsx | 3 +- 20 files changed, 142 insertions(+), 65 deletions(-) diff --git a/src/main/config.ts b/src/main/config.ts index bc7daa8f..75a908bf 100644 --- a/src/main/config.ts +++ b/src/main/config.ts @@ -21,13 +21,13 @@ export const DATA_PATH = getDataPath() export const appConfig = new Store() export const titleBarOverlayDark = { - height: 41, + height: 40, color: '#00000000', symbolColor: '#ffffff' } export const titleBarOverlayLight = { - height: 41, + height: 40, color: '#00000000', symbolColor: '#000000' } diff --git a/src/main/window.ts b/src/main/window.ts index 38c325e8..0ac8f21a 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -27,6 +27,7 @@ export function createMainWindow() { autoHideMenuBar: true, transparent: process.platform === 'darwin', vibrancy: 'fullscreen-ui', + visualEffectState: 'active', titleBarStyle: 'hidden', titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight, trafficLightPosition: { x: 8, y: 12 }, diff --git a/src/renderer/index.html b/src/renderer/index.html index e1e049fa..e42dbf24 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -7,11 +7,19 @@ http-equiv="Content-Security-Policy" content="default-src 'self'; connect-src *; script-src 'self' *; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' *; font-src 'self' data: *; img-src 'self' data: file: *; frame-src * file:" />