refactor(client):优化设备管理与登录逻辑

- 移除冗余的日志记录器声明
- 简化设备心跳接口,合并注册与更新逻辑
- 调整设备数量限制检查逻辑,提高代码可读性
- 修改默认设备数量限制从3台调整为1台- 更新客户端登出提示文案- 固定启动窗口尺寸并移除延迟启动逻辑
- 调整设备移除时的消息提示内容
This commit is contained in:
2025-10-17 16:14:43 +08:00
parent d9f91b77e3
commit 0c85aa5677
5 changed files with 41 additions and 117 deletions

View File

@@ -199,7 +199,7 @@ function startSpringBoot() {
}
}
// startSpringBoot();
startSpringBoot();
function stopSpringBoot() {
if (!springProcess) return;
@@ -269,10 +269,9 @@ app.whenReady().then(() => {
createWindow();
createTray(mainWindow);
const {width: sw, height: sh} = screen.getPrimaryDisplay().workAreaSize;
splashWindow = new BrowserWindow({
width: Math.min(Math.floor(sw * 0.8), 1800),
height: Math.min(Math.floor(sh * 0.8), 1200),
width: 1200,
height: 675,
frame: false,
transparent: false,
resizable: false,
@@ -296,9 +295,9 @@ app.whenReady().then(() => {
splashWindow.loadFile(splashPath);
}
setTimeout(() => {
openAppIfNotOpened();
}, 2000);
// setTimeout(() => {
// openAppIfNotOpened();
// }, 2000);
app.on('activate', () => {
if (mainWindow && !mainWindow.isDestroyed()) {