mirror of
https://github.com/yuruotong1/autoMate.git
synced 2026-03-22 13:07:17 +08:00
更新窗口名称和图标
This commit is contained in:
@@ -48,6 +48,13 @@ export const getWindowByName = (name: WindowNameType, router_url="")=>{
|
||||
win = createWindow(config[name].options,router_url)
|
||||
config[name].id = win.id
|
||||
}
|
||||
// 在页面加载完成后设置窗口标题
|
||||
win.webContents.on('did-finish-load', () => {
|
||||
win.setTitle('autoMate');
|
||||
});
|
||||
|
||||
// 修改窗口图标 (需要提供图标的路径)
|
||||
win.setIcon('resources/icon.png');
|
||||
|
||||
return win
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ export default function Chat(props: {id: number, revalidator: () => void}) {
|
||||
const chatMessages = useStore(state=>state.chatMessages)
|
||||
const setMessages = useStore(state=>state.setChatMessage)
|
||||
return (
|
||||
<ProChatProvider>
|
||||
<ProChat
|
||||
chats={chatMessages}
|
||||
onChatsChange={(chat)=>{
|
||||
console.log('chat', chat)
|
||||
setMessages(chat)
|
||||
}}
|
||||
chatRef={proChatRef}
|
||||
@@ -29,7 +29,6 @@ export default function Chat(props: {id: number, revalidator: () => void}) {
|
||||
return response// 支持流式和非流式
|
||||
}}
|
||||
/>
|
||||
</ProChatProvider>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user