This commit is contained in:
yj 2024-08-23 15:36:46 +08:00
parent f48a5a5613
commit dc9307e3a3
3 changed files with 174 additions and 179 deletions

13
main.js
View File

@ -109,20 +109,15 @@ function createWindow() {
mainWindow = new AppWindow();
mainWindow.focus();
}
// 处理单实例
app.on('session-created', (session) => {
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
})
const additionalData = { myKey: 'myValue' }
// 退出房间
app.on('will-quit', async (event) => {
await mainWindow.webContents.send('quitAndInstall');
});
app.on('ready', () => {
const gotTheLock = app.requestSingleInstanceLock(additionalData)
if (gotTheLock) {
env = process.argv.find((arg) => arg.startsWith('--env='))?.split('=')[1];
if (env === 'development') {
Object.defineProperty(app, 'isPackaged', {
@ -296,8 +291,8 @@ app.on('ready', () => {
}
});
});
}
});
// 检测更新在你想要检查更新的时候执行renderer事件触发后的操作自行编写
function updateHandle() {
autoUpdater.checkForUpdates()

View File

@ -1,16 +1,16 @@
.isUpdateModal {
height: 500px;
background-color: rgb(21, 25, 29);
background-size: 100% auto;
background-repeat: no-repeat;
color: #ffffff;
padding: 140px 30px 0;
padding: 130px 30px 0;
box-sizing: border-box;
.remarks {
width: 100%;
color: #C8C8C8;
height: 70%;
min-height: 240px;
max-height: 240px;
overflow-y: auto;
}
@ -20,7 +20,7 @@
text-align: center;
.button2 {
margin-top: 10px;
padding: 10px 0;
color: #555454;
cursor: pointer;
font-size: 14px;

View File

@ -282,7 +282,7 @@ $pagination-hover-background-color: #5575F2;
}
.ant-modal-body {
max-height: 80vh;
max-height: 90vh;
overflow-y: auto;
}
}