This commit is contained in:
idranme 2024-11-14 11:47:31 +08:00
parent bb8771a5b4
commit 104839f7ea
No known key found for this signature in database
GPG Key ID: D0F3677546E6ECD5
3 changed files with 9 additions and 3 deletions

View File

@ -228,6 +228,9 @@ function onLoad() {
// 创建窗口时触发
function onBrowserWindowCreated(window: BrowserWindow) {
if (window.id === 2) {
mainWindow = window
}
}
try {

View File

@ -442,6 +442,7 @@ export interface RawMessage {
attrType: number
attrId: string
}>
isOnlineMsg: boolean
}
export interface Peer {

View File

@ -247,7 +247,9 @@ async function onSettingWindowCreated(view: Element) {
} else {
errDom?.classList.add('show')
}
errCodeDom!.innerHTML = errMsg
if (errCodeDom) {
errCodeDom.innerHTML = errMsg
}
}
showError().then()
@ -456,8 +458,8 @@ async function onSettingWindowCreated(view: Element) {
}
window.llonebot.checkVersion().then(checkVersionFunc)
window.addEventListener('beforeunload', () => {
window.llonebot.getConfig().then(oldConfig=>{
if(JSON.stringify(oldConfig) !== JSON.stringify(config)){
window.llonebot.getConfig().then(oldConfig => {
if (JSON.stringify(oldConfig) !== JSON.stringify(config)) {
window.llonebot.setConfig(true, config)
}
})