mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 03:14:56 +08:00
✨ Feature(custom): change default value of show window on startup to true
This commit is contained in:
@@ -281,7 +281,7 @@ winget install OpenListTeam.OpenListDesktop
|
||||
"gh_proxy_api": false,
|
||||
"open_links_in_browser": true,
|
||||
"admin_password": "",
|
||||
"show_window_on_startup": false
|
||||
"show_window_on_startup": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -281,7 +281,7 @@ Add custom Rclone flags for optimal performance:
|
||||
"gh_proxy_api": false,
|
||||
"open_links_in_browser": true,
|
||||
"admin_password": "",
|
||||
"show_window_on_startup": false
|
||||
"show_window_on_startup": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -20,7 +20,7 @@ impl AppConfig {
|
||||
gh_proxy_api: Some(false),
|
||||
open_links_in_browser: Some(false),
|
||||
admin_password: None,
|
||||
show_window_on_startup: Some(false),
|
||||
show_window_on_startup: Some(true),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ pub fn run() {
|
||||
utils::init_log::init_log()?;
|
||||
utils::path::get_app_config_dir()?;
|
||||
let settings = conf::config::MergedSettings::load().unwrap_or_default();
|
||||
let show_window = settings.app.show_window_on_startup.unwrap_or(false);
|
||||
let show_window = settings.app.show_window_on_startup.unwrap_or(true);
|
||||
|
||||
let app_state = app.state::<AppState>();
|
||||
if let Err(e) = app_state.init(app_handle) {
|
||||
|
||||
@@ -16,7 +16,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
gh_proxy_api: false,
|
||||
open_links_in_browser: false,
|
||||
admin_password: undefined,
|
||||
show_window_on_startup: false
|
||||
show_window_on_startup: true
|
||||
}
|
||||
})
|
||||
const openlistCoreStatus = ref<OpenListCoreStatus>({ running: false })
|
||||
|
||||
@@ -96,7 +96,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.show_window_on_startup === undefined) appSettings.show_window_on_startup = true
|
||||
if (!appSettings.admin_password) appSettings.admin_password = ''
|
||||
originalOpenlistPort = openlistCoreSettings.port || 5244
|
||||
originalDataDir = openlistCoreSettings.data_dir
|
||||
|
||||
Reference in New Issue
Block a user