Skip to content

Commit 3198094

Browse files
committed
✨ Feature(custom): add show_window_on_startup option
ISSUES CLOSED: #77
1 parent 58b7128 commit 3198094

File tree

7 files changed

+611
-588
lines changed

7 files changed

+611
-588
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
"source.fixAll.eslint": "explicit"
3232
},
3333
"typescript.tsdk": "node_modules\\typescript\\lib",
34+
"i18n-ally.localesPaths": [
35+
"src/i18n",
36+
"src/i18n/locales"
37+
],
3438
// "rust-analyzer.cargo.target": "x86_64-unknown-linux-gnu"
3539
//"rust-analyzer.cargo.target": "x86_64-pc-windows-msvc"
3640
// "rust-analyzer.cargo.target": "x86_64-apple-darwin",

package.json

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,42 @@
5757
]
5858
},
5959
"dependencies": {
60-
"@headlessui/vue": "^1.7.23",
61-
"@tauri-apps/api": "^2.6.0",
60+
"@tauri-apps/api": "^2.8.0",
6261
"@tauri-apps/plugin-autostart": "^2.5.0",
63-
"@tauri-apps/plugin-dialog": "^2.3.0",
64-
"@tauri-apps/plugin-fs": "^2.4.0",
65-
"@tauri-apps/plugin-opener": "^2.4.0",
62+
"@tauri-apps/plugin-dialog": "^2.3.3",
63+
"@tauri-apps/plugin-fs": "^2.4.2",
64+
"@tauri-apps/plugin-opener": "^2.5.0",
6665
"@tauri-apps/plugin-process": "^2.3.0",
6766
"@tauri-apps/plugin-shell": "^2.3.0",
68-
"@tauri-apps/plugin-store": "^2.3.0",
69-
"chrono-node": "^2.8.3",
70-
"lucide-vue-next": "^0.525.0",
67+
"@tauri-apps/plugin-store": "^2.4.0",
68+
"chrono-node": "^2.8.4",
69+
"lucide-vue-next": "^0.541.0",
7170
"pinia": "^3.0.3",
72-
"vue": "^3.5.17",
73-
"vue-i18n": "11.1.10",
71+
"vue": "^3.5.19",
72+
"vue-i18n": "11.1.11",
7473
"vue-router": "^4.5.1"
7574
},
7675
"devDependencies": {
77-
"@tauri-apps/cli": "^2.6.2",
78-
"@types/node": "^22.9.3",
79-
"@typescript-eslint/eslint-plugin": "^8.36.0",
80-
"@typescript-eslint/parser": "^8.36.0",
81-
"@vitejs/plugin-vue": "^6.0.0",
76+
"@tauri-apps/cli": "^2.8.2",
77+
"@types/node": "^24.3.0",
78+
"@typescript-eslint/eslint-plugin": "^8.40.0",
79+
"@typescript-eslint/parser": "^8.40.0",
80+
"@vitejs/plugin-vue": "^6.0.1",
8281
"adm-zip": "^0.5.16",
8382
"cross-env": "^7.0.3",
84-
"eslint": "^9.30.1",
83+
"eslint": "^9.34.0",
8584
"eslint-plugin-simple-import-sort": "^12.1.1",
86-
"eslint-plugin-unicorn": "^59.0.1",
87-
"fs-extra": "^11.3.0",
85+
"eslint-plugin-unicorn": "^60.0.0",
86+
"fs-extra": "^11.3.1",
8887
"https-proxy-agent": "^7.0.6",
8988
"husky": "^9.1.7",
90-
"lint-staged": "^16.1.2",
89+
"lint-staged": "^16.1.5",
9190
"node-bump-version": "^2.0.0",
9291
"node-fetch": "^3.3.2",
9392
"tar": "^7.4.3",
9493
"typescript": "^5.8.3",
95-
"typescript-eslint": "^8.36.0",
96-
"vite": "^7.0.3",
97-
"vue-tsc": "^3.0.1"
94+
"typescript-eslint": "^8.40.0",
95+
"vite": "^7.1.3",
96+
"vue-tsc": "^3.0.6"
9897
}
9998
}

src/i18n/locales/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@
237237
"title": "Auto-launch on startup(Immediate Effect)",
238238
"subtitle": "Automatically start OpenList Desktop application when the system starts",
239239
"description": "Automatically start OpenList service when the application launches"
240+
},
241+
"showWindowOnStartup": {
242+
"title": "Show main window on startup",
243+
"description": "Show the main application window when OpenList Desktop starts"
240244
}
241245
}
242246
},

src/i18n/locales/zh.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@
237237
"title": "开机自动启动应用(立即生效)",
238238
"subtitle": "在系统启动时自动启动 OpenList 桌面应用",
239239
"description": "在系统启动时自动启动 OpenList 桌面应用"
240+
},
241+
"showWindowOnStartup": {
242+
"title": "启动时显示主窗口",
243+
"description": "在 OpenList 桌面应用启动时显示主应用窗口"
240244
}
241245
}
242246
},

src/types/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ interface AppConfig {
5050
gh_proxy_api?: boolean
5151
open_links_in_browser?: boolean
5252
admin_password?: string
53+
show_window_on_startup?: boolean
5354
}
5455

5556
interface MergedSettings {

src/views/SettingsView.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ onMounted(async () => {
9393
if (!appSettings.gh_proxy) appSettings.gh_proxy = ''
9494
if (appSettings.gh_proxy_api === undefined) appSettings.gh_proxy_api = false
9595
if (appSettings.open_links_in_browser === undefined) appSettings.open_links_in_browser = false
96+
if (appSettings.show_window_on_startup === undefined) appSettings.show_window_on_startup = false
9697
if (!appSettings.admin_password) appSettings.admin_password = ''
9798
originalOpenlistPort = openlistCoreSettings.port || 5244
9899
originalDataDir = openlistCoreSettings.data_dir
@@ -577,6 +578,21 @@ const loadCurrentAdminPassword = async () => {
577578
</div>
578579
</div>
579580

581+
<div class="settings-section">
582+
<h2>{{ t('settings.app.showWindowOnStartup.title') }}</h2>
583+
584+
<div class="form-group">
585+
<label class="switch-label">
586+
<input v-model="appSettings.show_window_on_startup" type="checkbox" class="switch-input" />
587+
<span class="switch-slider"></span>
588+
<div class="switch-content">
589+
<span class="switch-title">{{ t('settings.app.showWindowOnStartup.title') }}</span>
590+
<span class="switch-description">{{ t('settings.app.showWindowOnStartup.description') }}</span>
591+
</div>
592+
</label>
593+
</div>
594+
</div>
595+
580596
<div class="settings-section">
581597
<h2>{{ t('settings.app.updates.title') }}</h2>
582598
<p>{{ t('settings.app.updates.subtitle') }}</p>

0 commit comments

Comments
 (0)