diff --git a/src/renderer/src/assets/styles/index.scss b/src/renderer/src/assets/styles/index.scss index 1135cee1..b0a6a99d 100644 --- a/src/renderer/src/assets/styles/index.scss +++ b/src/renderer/src/assets/styles/index.scss @@ -50,7 +50,7 @@ --color-reference-text: #ffffff; --color-reference-background: #0b0e12; - --navbar-background-mac: rgba(20, 20, 20, 0.6); + --navbar-background-mac: rgba(20, 20, 20, 0.55); --navbar-background: rgba(40, 40, 40); --navbar-height: 40px; @@ -115,7 +115,7 @@ body[theme-mode='light'] { --color-reference-text: #000000; --color-reference-background: #f1f7ff; - --navbar-background-mac: rgba(255, 255, 255, 0.6); + --navbar-background-mac: rgba(255, 255, 255, 0.55); --navbar-background: rgba(244, 244, 244); --chat-background: #f3f3f3; diff --git a/src/renderer/src/components/MinApp/index.tsx b/src/renderer/src/components/MinApp/index.tsx index 20a2ba1b..9a91b198 100644 --- a/src/renderer/src/components/MinApp/index.tsx +++ b/src/renderer/src/components/MinApp/index.tsx @@ -64,7 +64,9 @@ const PopupContainer: React.FC = ({ app, resolve }) => { const newPinned = isPinned ? pinned.filter((item) => item.id !== app.id) : [...pinned, app] updatePinnedMinapps(newPinned) } + const isInDevelopment = process.env.NODE_ENV === 'development' + const Title = () => { return ( @@ -176,6 +178,7 @@ const TitleContainer = styled.div` left: 0; right: 0; bottom: 0; + background-color: transparent; ` const TitleText = styled.div` diff --git a/src/renderer/src/hooks/useAppInit.ts b/src/renderer/src/hooks/useAppInit.ts index 6dab8c40..da9f73d0 100644 --- a/src/renderer/src/hooks/useAppInit.ts +++ b/src/renderer/src/hooks/useAppInit.ts @@ -1,5 +1,6 @@ import { isMac } from '@renderer/config/constant' import { isLocalAi } from '@renderer/config/env' +import { useTheme } from '@renderer/context/ThemeProvider' import db from '@renderer/databases' import i18n from '@renderer/i18n' import { useAppDispatch } from '@renderer/store' @@ -21,6 +22,7 @@ export function useAppInit() { const { minappShow } = useRuntime() const { setDefaultModel, setTopicNamingModel, setTranslateModel } = useDefaultModel() const avatar = useLiveQuery(() => db.settings.get('image://avatar')) + const { theme } = useTheme() useUpdateHandler() useFullScreenNotice() @@ -58,8 +60,14 @@ export function useAppInit() { useEffect(() => { const transparentWindow = windowStyle === 'transparent' && isMac && !minappShow + + if (minappShow) { + window.root.style.background = theme === 'dark' ? 'var(--color-black)' : 'var(--color-white)' + return + } + window.root.style.background = transparentWindow ? 'var(--navbar-background-mac)' : 'var(--navbar-background)' - }, [windowStyle, minappShow]) + }, [windowStyle, minappShow, theme]) useEffect(() => { if (isLocalAi) { diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index db695581..06d31dcb 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -1,6 +1,7 @@ import { ClearOutlined, ColumnHeightOutlined, + FormOutlined, FullscreenExitOutlined, FullscreenOutlined, GlobalOutlined, @@ -123,6 +124,7 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic, topic }) = const inputTokenCount = showInputEstimatedTokens ? tokenCount : 0 + const newTopicShortcut = useShortcutDisplay('new_topic') const cleanTopicShortcut = useShortcutDisplay('clear_topic') const inputEmpty = isEmpty(text.trim()) && files.length === 0 @@ -707,6 +709,11 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic, topic }) = + + + + + = memo(({ assistant, model, message }) => { src={avatarSource} size={35} style={{ - borderRadius: '20%', + borderRadius: '25%', cursor: showMinappIcon ? 'pointer' : 'default', border: isLocalAi ? '1px solid var(--color-border-soft)' : 'none', filter: theme === 'dark' ? 'invert(0.05)' : undefined @@ -88,7 +88,7 @@ const MessageHeader: FC = memo(({ assistant, model, message }) => { UserPopup.show()} /> )} diff --git a/src/renderer/src/pages/home/Navbar.tsx b/src/renderer/src/pages/home/Navbar.tsx index 68923a07..8261bd41 100644 --- a/src/renderer/src/pages/home/Navbar.tsx +++ b/src/renderer/src/pages/home/Navbar.tsx @@ -9,7 +9,6 @@ import { modelGenerating } from '@renderer/hooks/useRuntime' import { useSettings } from '@renderer/hooks/useSettings' import { useShortcut } from '@renderer/hooks/useShortcuts' import { useShowAssistants, useShowTopics } from '@renderer/hooks/useStore' -import AssistantSettingsPopup from '@renderer/pages/settings/AssistantSettings' import { EVENT_NAMES, EventEmitter } from '@renderer/services/EventService' import { useAppDispatch } from '@renderer/store' import { setNarrowMode } from '@renderer/store/settings' @@ -85,12 +84,6 @@ const HeaderNavbar: FC = ({ activeAssistant }) => { )} - AssistantSettingsPopup.show({ assistant })}> - {assistant.name} - @@ -159,16 +152,6 @@ export const NavbarIcon = styled.div` } ` -const TitleText = styled.span` - margin-left: 5px; - font-family: Ubuntu; - font-size: 12px; - user-select: none; - @media (max-width: 1080px) { - display: none; - } -` - const NarrowIcon = styled(NavbarIcon)` @media (max-width: 1000px) { display: none;