diff --git a/build/icon.ico b/build/icon.ico index 72c391eb..eab67124 100644 Binary files a/build/icon.ico and b/build/icon.ico differ diff --git a/build/icon.png b/build/icon.png index cf9e8b2c..0a2b4e84 100644 Binary files a/build/icon.png and b/build/icon.png differ diff --git a/electron.vite.config.ts b/electron.vite.config.ts index c454dadf..9a7c61ad 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -15,6 +15,9 @@ export default defineConfig({ '@renderer': resolve('src/renderer/src') } }, - plugins: [react()] + plugins: [react()], + server: { + host: '0.0.0.0' + } } }) diff --git a/resources/icon.icns b/resources/icon.icns deleted file mode 100644 index 67be2a94..00000000 Binary files a/resources/icon.icns and /dev/null differ diff --git a/src/main/index.ts b/src/main/index.ts index 87244710..eceaa7f7 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -8,7 +8,7 @@ import installExtension, { REDUX_DEVTOOLS } from 'electron-devtools-installer' function createWindow(): void { // Load the previous state with fallback to defaults const mainWindowState = windowStateKeeper({ - defaultWidth: 900, + defaultWidth: 1080, defaultHeight: 670 }) @@ -20,10 +20,9 @@ function createWindow(): void { height: mainWindowState.height, minWidth: 1080, minHeight: 500, - show: false, + show: true, autoHideMenuBar: true, titleBarStyle: 'hiddenInset', - transparent: true, trafficLightPosition: { x: 8, y: 8 }, ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { diff --git a/src/renderer/src/assets/styles/index.scss b/src/renderer/src/assets/styles/index.scss index 7ca9f9a4..5ef50129 100644 --- a/src/renderer/src/assets/styles/index.scss +++ b/src/renderer/src/assets/styles/index.scss @@ -99,31 +99,29 @@ body, resize: none; } -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - /* 全局初始化滚动条样式 */ - ::-webkit-scrollbar { - width: 5px; - height: 5px; - } +/* 全局初始化滚动条样式 */ +::-webkit-scrollbar { + width: 5px; + height: 5px; +} - ::-webkit-scrollbar-track { - background: transparent; - } +::-webkit-scrollbar-track { + background: transparent; +} - ::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, 0.6); - border-radius: 10px; - } +::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.2); + border-radius: 10px; +} - ::-webkit-scrollbar-thumb:hover { - background: rgba(255, 255, 255, 0.8); - } +::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.4); +} - /* Safari 和 Chrome */ - @media screen and (-webkit-min-device-pixel-ratio: 0) { - body { - scrollbar-width: thin; /* 告诉 FF 用细滚动条 */ - scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.1); /* FF 前面色后面色 */ - } +/* Safari 和 Chrome */ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + body { + scrollbar-width: thin; /* 告诉 FF 用细滚动条 */ + scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.1); /* FF 前面色后面色 */ } } diff --git a/src/renderer/src/components/TopView/index.tsx b/src/renderer/src/components/TopView/index.tsx index 1468d7bb..9b8449e1 100644 --- a/src/renderer/src/components/TopView/index.tsx +++ b/src/renderer/src/components/TopView/index.tsx @@ -5,8 +5,15 @@ import React, { useEffect, useState } from 'react' let id = 0 let onPop = () => {} -let onShow = ({ element, key }: { element: React.FC | React.ReactNode; key: number }) => {} -let onHide = ({ key }: { key: number }) => {} + +let onShow = ({ element, key }: { element: React.FC | React.ReactNode; key: number }) => { + element + key +} + +let onHide = ({ key }: { key: number }) => { + key +} interface Props { children?: React.ReactNode diff --git a/src/renderer/src/pages/apps/AppsPage.tsx b/src/renderer/src/pages/apps/AppsPage.tsx index 0b5703af..0e3e42f0 100644 --- a/src/renderer/src/pages/apps/AppsPage.tsx +++ b/src/renderer/src/pages/apps/AppsPage.tsx @@ -31,7 +31,7 @@ const AppsPage: FC = () => { return ( - Assistant Market + Assistant Market {Object.keys(assistantGroups).map((group) => ( diff --git a/src/renderer/src/pages/home/components/Assistants.tsx b/src/renderer/src/pages/home/components/Assistants.tsx index 3479605d..725e0050 100644 --- a/src/renderer/src/pages/home/components/Assistants.tsx +++ b/src/renderer/src/pages/home/components/Assistants.tsx @@ -88,10 +88,7 @@ const Container = styled.div` max-width: var(--assistants-width); border-right: 0.5px solid var(--color-border); height: calc(100vh - var(--navbar-height)); - overflow-y: scroll; - &::-webkit-scrollbar { - display: none; - } + overflow-y: auto; ` const AssistantItem = styled.div` diff --git a/src/renderer/src/pages/home/components/Messages.tsx b/src/renderer/src/pages/home/components/Messages.tsx index 427d00bb..31845c22 100644 --- a/src/renderer/src/pages/home/components/Messages.tsx +++ b/src/renderer/src/pages/home/components/Messages.tsx @@ -30,6 +30,7 @@ const Messages: FC = ({ assistant, topic }) => { content: assistant.description, assistantId: assistant.id, topicId: topic.id, + status: 'pending', createdAt: new Date().toISOString() } diff --git a/src/renderer/src/pages/settings/SettingsPage.tsx b/src/renderer/src/pages/settings/SettingsPage.tsx index 8905bbd0..cb5c0308 100644 --- a/src/renderer/src/pages/settings/SettingsPage.tsx +++ b/src/renderer/src/pages/settings/SettingsPage.tsx @@ -18,7 +18,7 @@ const SettingsPage: FC = () => { return ( - {t('settings.title')} + {t('settings.title')}