From 09746c2315c9d658e10b4264a94883bfceb7845c Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Mon, 9 Sep 2024 22:23:41 -0400 Subject: [PATCH] Minimum width and height for small(ish) screens - Maximum height and width now matches the web app's - Finally, renamed the "greet" functions to "station" --- src-tauri/src/main.rs | 4 ++-- src-tauri/tauri.conf.json | 10 +++++++--- src/Pages/Home.razor | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 12035aa..9ef4ff7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -3,7 +3,7 @@ // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command #[tauri::command] -fn greet(name: &str) -> String { +fn station(name: &str) -> String { format!( "https://dixielandsoftware.net/cgi-bin/solari_relay.pl?data={}", name @@ -12,7 +12,7 @@ fn greet(name: &str) -> String { fn main() { tauri::Builder::default() - .invoke_handler(tauri::generate_handler![greet]) + .invoke_handler(tauri::generate_handler![station]) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 69a5968..e9ba3bd 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "AMTK Status", - "version": "0.1.101" + "version": "0.1.102" }, "tauri": { "allowlist": { @@ -22,8 +22,12 @@ { "title": "Amtrak Status Boards", "resizable": true, - "width": 1450, - "height": 950 + "width": 1100, + "height": 768, + "minWidth": 1100, + "minHeight": 768, + "maxWidth": 1450, + "maxHeight": 950 } ], "security": { diff --git a/src/Pages/Home.razor b/src/Pages/Home.razor index cae0732..ba67c00 100644 --- a/src/Pages/Home.razor +++ b/src/Pages/Home.razor @@ -4,7 +4,7 @@
-
+
@@ -21,9 +21,9 @@ private string? StationCode { get; set; } - private async Task GreetAsync() + private async Task StationAsync() { - StationCode = await JsRuntime.InvokeAsync("__TAURI__.tauri.invoke", "greet", new { name = CodeInput }); + StationCode = await JsRuntime.InvokeAsync("__TAURI__.tauri.invoke", "station", new { name = CodeInput }); NavigationManager.NavigateTo(StationCode); }