build: for windows

This commit is contained in:
kangfenmao 2024-07-09 21:05:31 +08:00
parent f7c5c1551a
commit fd7475d408
11 changed files with 39 additions and 34 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 489 KiB

View File

@ -15,6 +15,9 @@ export default defineConfig({
'@renderer': resolve('src/renderer/src') '@renderer': resolve('src/renderer/src')
} }
}, },
plugins: [react()] plugins: [react()],
server: {
host: '0.0.0.0'
}
} }
}) })

Binary file not shown.

View File

@ -8,7 +8,7 @@ import installExtension, { REDUX_DEVTOOLS } from 'electron-devtools-installer'
function createWindow(): void { function createWindow(): void {
// Load the previous state with fallback to defaults // Load the previous state with fallback to defaults
const mainWindowState = windowStateKeeper({ const mainWindowState = windowStateKeeper({
defaultWidth: 900, defaultWidth: 1080,
defaultHeight: 670 defaultHeight: 670
}) })
@ -20,10 +20,9 @@ function createWindow(): void {
height: mainWindowState.height, height: mainWindowState.height,
minWidth: 1080, minWidth: 1080,
minHeight: 500, minHeight: 500,
show: false, show: true,
autoHideMenuBar: true, autoHideMenuBar: true,
titleBarStyle: 'hiddenInset', titleBarStyle: 'hiddenInset',
transparent: true,
trafficLightPosition: { x: 8, y: 8 }, trafficLightPosition: { x: 8, y: 8 },
...(process.platform === 'linux' ? { icon } : {}), ...(process.platform === 'linux' ? { icon } : {}),
webPreferences: { webPreferences: {

View File

@ -99,31 +99,29 @@ body,
resize: none; resize: none;
} }
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { /* 全局初始化滚动条样式 */
/* 全局初始化滚动条样式 */ ::-webkit-scrollbar {
::-webkit-scrollbar { width: 5px;
width: 5px; height: 5px;
height: 5px; }
}
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.2);
border-radius: 10px; border-radius: 10px;
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.4);
} }
/* Safari 和 Chrome */ /* Safari 和 Chrome */
@media screen and (-webkit-min-device-pixel-ratio: 0) { @media screen and (-webkit-min-device-pixel-ratio: 0) {
body { body {
scrollbar-width: thin; /* 告诉 FF 用细滚动条 */ scrollbar-width: thin; /* 告诉 FF 用细滚动条 */
scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.1); /* FF 前面色后面色 */ scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.1); /* FF 前面色后面色 */
}
} }
} }

View File

@ -5,8 +5,15 @@ import React, { useEffect, useState } from 'react'
let id = 0 let id = 0
let onPop = () => {} 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 { interface Props {
children?: React.ReactNode children?: React.ReactNode

View File

@ -31,7 +31,7 @@ const AppsPage: FC = () => {
return ( return (
<Container> <Container>
<Navbar> <Navbar>
<NavbarCenter>Assistant Market</NavbarCenter> <NavbarCenter style={{ borderRight: 'none' }}>Assistant Market</NavbarCenter>
</Navbar> </Navbar>
<ContentContainer> <ContentContainer>
{Object.keys(assistantGroups).map((group) => ( {Object.keys(assistantGroups).map((group) => (

View File

@ -88,10 +88,7 @@ const Container = styled.div`
max-width: var(--assistants-width); max-width: var(--assistants-width);
border-right: 0.5px solid var(--color-border); border-right: 0.5px solid var(--color-border);
height: calc(100vh - var(--navbar-height)); height: calc(100vh - var(--navbar-height));
overflow-y: scroll; overflow-y: auto;
&::-webkit-scrollbar {
display: none;
}
` `
const AssistantItem = styled.div` const AssistantItem = styled.div`

View File

@ -30,6 +30,7 @@ const Messages: FC<Props> = ({ assistant, topic }) => {
content: assistant.description, content: assistant.description,
assistantId: assistant.id, assistantId: assistant.id,
topicId: topic.id, topicId: topic.id,
status: 'pending',
createdAt: new Date().toISOString() createdAt: new Date().toISOString()
} }

View File

@ -18,7 +18,7 @@ const SettingsPage: FC = () => {
return ( return (
<Container> <Container>
<Navbar> <Navbar>
<NavbarCenter>{t('settings.title')}</NavbarCenter> <NavbarCenter style={{ borderRight: 'none' }}>{t('settings.title')}</NavbarCenter>
</Navbar> </Navbar>
<ContentContainer> <ContentContainer>
<SettingMenus> <SettingMenus>