mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 03:14:56 +08:00
✨ Feature(custom): add show_window_on_startup option
ISSUES CLOSED: #77
This commit is contained in:
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -31,6 +31,10 @@
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
"i18n-ally.localesPaths": [
|
||||
"src/i18n",
|
||||
"src/i18n/locales"
|
||||
],
|
||||
// "rust-analyzer.cargo.target": "x86_64-unknown-linux-gnu"
|
||||
//"rust-analyzer.cargo.target": "x86_64-pc-windows-msvc"
|
||||
// "rust-analyzer.cargo.target": "x86_64-apple-darwin",
|
||||
|
||||
43
package.json
43
package.json
@@ -57,43 +57,42 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/vue": "^1.7.23",
|
||||
"@tauri-apps/api": "^2.6.0",
|
||||
"@tauri-apps/api": "^2.8.0",
|
||||
"@tauri-apps/plugin-autostart": "^2.5.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.3.0",
|
||||
"@tauri-apps/plugin-fs": "^2.4.0",
|
||||
"@tauri-apps/plugin-opener": "^2.4.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.3.3",
|
||||
"@tauri-apps/plugin-fs": "^2.4.2",
|
||||
"@tauri-apps/plugin-opener": "^2.5.0",
|
||||
"@tauri-apps/plugin-process": "^2.3.0",
|
||||
"@tauri-apps/plugin-shell": "^2.3.0",
|
||||
"@tauri-apps/plugin-store": "^2.3.0",
|
||||
"chrono-node": "^2.8.3",
|
||||
"lucide-vue-next": "^0.525.0",
|
||||
"@tauri-apps/plugin-store": "^2.4.0",
|
||||
"chrono-node": "^2.8.4",
|
||||
"lucide-vue-next": "^0.541.0",
|
||||
"pinia": "^3.0.3",
|
||||
"vue": "^3.5.17",
|
||||
"vue-i18n": "11.1.10",
|
||||
"vue": "^3.5.19",
|
||||
"vue-i18n": "11.1.11",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^2.6.2",
|
||||
"@types/node": "^22.9.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
||||
"@typescript-eslint/parser": "^8.36.0",
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"@tauri-apps/cli": "^2.8.2",
|
||||
"@types/node": "^24.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
||||
"@typescript-eslint/parser": "^8.40.0",
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"adm-zip": "^0.5.16",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.30.1",
|
||||
"eslint": "^9.34.0",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unicorn": "^59.0.1",
|
||||
"fs-extra": "^11.3.0",
|
||||
"eslint-plugin-unicorn": "^60.0.0",
|
||||
"fs-extra": "^11.3.1",
|
||||
"https-proxy-agent": "^7.0.6",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.1.2",
|
||||
"lint-staged": "^16.1.5",
|
||||
"node-bump-version": "^2.0.0",
|
||||
"node-fetch": "^3.3.2",
|
||||
"tar": "^7.4.3",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.36.0",
|
||||
"vite": "^7.0.3",
|
||||
"vue-tsc": "^3.0.1"
|
||||
"typescript-eslint": "^8.40.0",
|
||||
"vite": "^7.1.3",
|
||||
"vue-tsc": "^3.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,6 +237,10 @@
|
||||
"title": "Auto-launch on startup(Immediate Effect)",
|
||||
"subtitle": "Automatically start OpenList Desktop application when the system starts",
|
||||
"description": "Automatically start OpenList service when the application launches"
|
||||
},
|
||||
"showWindowOnStartup": {
|
||||
"title": "Show main window on startup",
|
||||
"description": "Show the main application window when OpenList Desktop starts"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -237,6 +237,10 @@
|
||||
"title": "开机自动启动应用(立即生效)",
|
||||
"subtitle": "在系统启动时自动启动 OpenList 桌面应用",
|
||||
"description": "在系统启动时自动启动 OpenList 桌面应用"
|
||||
},
|
||||
"showWindowOnStartup": {
|
||||
"title": "启动时显示主窗口",
|
||||
"description": "在 OpenList 桌面应用启动时显示主应用窗口"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
1
src/types/types.d.ts
vendored
1
src/types/types.d.ts
vendored
@@ -50,6 +50,7 @@ interface AppConfig {
|
||||
gh_proxy_api?: boolean
|
||||
open_links_in_browser?: boolean
|
||||
admin_password?: string
|
||||
show_window_on_startup?: boolean
|
||||
}
|
||||
|
||||
interface MergedSettings {
|
||||
|
||||
@@ -93,6 +93,7 @@ onMounted(async () => {
|
||||
if (!appSettings.gh_proxy) appSettings.gh_proxy = ''
|
||||
if (appSettings.gh_proxy_api === undefined) appSettings.gh_proxy_api = false
|
||||
if (appSettings.open_links_in_browser === undefined) appSettings.open_links_in_browser = false
|
||||
if (appSettings.show_window_on_startup === undefined) appSettings.show_window_on_startup = false
|
||||
if (!appSettings.admin_password) appSettings.admin_password = ''
|
||||
originalOpenlistPort = openlistCoreSettings.port || 5244
|
||||
originalDataDir = openlistCoreSettings.data_dir
|
||||
@@ -577,6 +578,21 @@ const loadCurrentAdminPassword = async () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h2>{{ t('settings.app.showWindowOnStartup.title') }}</h2>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="switch-label">
|
||||
<input v-model="appSettings.show_window_on_startup" type="checkbox" class="switch-input" />
|
||||
<span class="switch-slider"></span>
|
||||
<div class="switch-content">
|
||||
<span class="switch-title">{{ t('settings.app.showWindowOnStartup.title') }}</span>
|
||||
<span class="switch-description">{{ t('settings.app.showWindowOnStartup.description') }}</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h2>{{ t('settings.app.updates.title') }}</h2>
|
||||
<p>{{ t('settings.app.updates.subtitle') }}</p>
|
||||
|
||||
Reference in New Issue
Block a user