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')
}
},
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 {
// 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: {

View File

@ -99,31 +99,29 @@ body,
resize: none;
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* 全局初始化滚动条样式 */
::-webkit-scrollbar {
/* 全局初始化滚动条样式 */
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
}
::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
background: transparent;
}
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.6);
::-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) {
/* 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 前面色后面色 */
}
}
}

View File

@ -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

View File

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

View File

@ -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`

View File

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

View File

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