forked from akanyan/STARTLINER
feat: ui scaling, update all
This commit is contained in:
@ -355,6 +355,23 @@ pub async fn list_platform_capabilities() -> Result<Vec<String>, ()> {
|
||||
return Ok(vec!["wine".to_owned()]);
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn is_offline(state: State<'_, Mutex<AppData>>) -> Result<bool, ()> {
|
||||
log::debug!("invoke: is_offline");
|
||||
|
||||
let appd = state.lock().await;
|
||||
Ok(appd.cfg.offline_mode)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_offline(state: State<'_, Mutex<AppData>>, value: bool) -> Result<(), String> {
|
||||
log::debug!("invoke: set_offline({value})");
|
||||
|
||||
let mut appd = state.lock().await;
|
||||
appd.cfg.offline_mode = value;
|
||||
appd.write().map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
#[cfg(target_os = "windows")]
|
||||
pub async fn list_displays() -> Result<Vec<(String, String)>, String> {
|
||||
|
@ -71,8 +71,8 @@ pub async fn run(_args: Vec<String>) {
|
||||
} else {
|
||||
tauri::WebviewWindowBuilder::new(app, "main", tauri::WebviewUrl::App("index.html".into()))
|
||||
.title("STARTLINER")
|
||||
.inner_size(720f64, 480f64)
|
||||
.min_inner_size(720f64, 480f64)
|
||||
.inner_size(760f64, 480f64)
|
||||
.min_inner_size(760f64, 480f64)
|
||||
.build()?;
|
||||
start_immediately = false;
|
||||
}
|
||||
@ -200,6 +200,9 @@ pub async fn run(_args: Vec<String>) {
|
||||
cmd::sync_current_profile,
|
||||
cmd::save_current_profile,
|
||||
|
||||
cmd::is_offline,
|
||||
cmd::set_offline,
|
||||
|
||||
cmd::list_displays,
|
||||
cmd::list_platform_capabilities,
|
||||
cmd::list_directories,
|
||||
|
Reference in New Issue
Block a user