forked from akanyan/STARTLINER
feat: ui scaling, update all
This commit is contained in:
@ -12,6 +12,9 @@
|
||||
"core:window:allow-set-focus",
|
||||
"core:window:allow-hide",
|
||||
"core:window:allow-show",
|
||||
"core:window:allow-set-size",
|
||||
"core:window:allow-inner-size",
|
||||
"core:window:allow-set-min-size",
|
||||
"core:app:allow-app-hide",
|
||||
"shell:default",
|
||||
"dialog:default",
|
||||
|
@ -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,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "STARTLINER",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"identifier": "zip.patafour.startliner",
|
||||
"build": {
|
||||
"beforeDevCommand": "bun run dev",
|
||||
|
Reference in New Issue
Block a user