Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/services/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def set_SelfStart(self, if_self_start: bool) -> None:
</Settings>
<Actions Context="Author">
<Exec>
<Command>"{Path.cwd() / 'AUTO-MAS.exe'}"</Command>
<Command>"{Path.cwd() / 'AUTO-MAS.exe'}" --auto-start</Command>
</Exec>
</Actions>
</Task>"""
Expand Down
9 changes: 5 additions & 4 deletions frontend/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ let tray: Tray | null = null
let isQuitting = false
let saveWindowStateTimeout: NodeJS.Timeout | null = null
let isInitialStartup = true // 标记是否为初次启动
const isAutoStart = process.argv.includes('--auto-start') // 是否由开机自启动任务计划拉起

// 配置接口
interface AppConfig {
Expand Down Expand Up @@ -362,8 +363,8 @@ function createWindow() {

// 页面加载完成后再显示窗口,避免白屏闪烁
win.webContents.on('did-finish-load', () => {
// 根据配置决定是否显示窗口
if (!config.Start.IfMinimizeDirectly) {
// 仅开机自启动且开启"启动后直接最小化"时才隐藏窗口,手动双击启动始终显示
if (!(isAutoStart && config.Start.IfMinimizeDirectly)) {
win.show()
logger.info('页面加载完成,窗口已显示')
}
Expand Down Expand Up @@ -547,8 +548,8 @@ function createWindow() {
// 根据配置初始化托盘
updateTrayVisibility(currentConfig)

// 处理启动后直接最小化(只在初次启动时执行
if (isInitialStartup && currentConfig.Start.IfMinimizeDirectly) {
// 处理启动后直接最小化(仅开机自启动时执行
if (isAutoStart && isInitialStartup && currentConfig.Start.IfMinimizeDirectly) {
if (currentConfig.UI.IfToTray) {
win.hide()
win.setSkipTaskbar(true)
Expand Down
3 changes: 3 additions & 0 deletions res/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"version": "v5.3.0-beta.3",
"version_info": {
"v5.3.0-beta.3": {
"新增功能": [
"区分开机自启与手动启动,双击EXE始终显示窗口"
],
"程序优化": [
"优化模拟器搜索功能",
"优化模拟器管理页面样式",
Expand Down
Loading