From 7703063830cd40d46f12dc173630425b873ab106 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 15 May 2025 13:07:26 +1000 Subject: [PATCH] feat(gui-client): re-design the "about" window (#9149) This re-designs the "About" window of the GUI client. |Before|After| |---|---| |![Screenshot From 2025-05-15 11-40-46](https://github.com/user-attachments/assets/ce7f1cf5-e234-4d64-825a-8e1c0badddb5)|![image](https://github.com/user-attachments/assets/a0c2f54f-f8f9-4d57-a8ee-0e826ce004da)| I also reduced the window in its size and made it non-resizable to avoid it looking bad when users try to fiddle around with it. The embedded Git hash is also trimmed to 8 characters, currently it is embedded as the fully hash. --- .../src-tauri/capabilities/default.json | 17 ++++++++++++++++ rust/gui-client/src-tauri/tauri.conf.json | 9 +++++---- rust/gui-client/src/about.html | 20 +++++++++++++------ rust/gui-client/src/about.ts | 4 ++-- 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 rust/gui-client/src-tauri/capabilities/default.json diff --git a/rust/gui-client/src-tauri/capabilities/default.json b/rust/gui-client/src-tauri/capabilities/default.json new file mode 100644 index 000000000..bd4153aba --- /dev/null +++ b/rust/gui-client/src-tauri/capabilities/default.json @@ -0,0 +1,17 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default-capability", + "description": "Capability for our windows", + "windows": ["*"], + "permissions": [ + "core:path:default", + "core:event:default", + "core:window:default", + "core:app:default", + "core:resources:default", + "core:menu:default", + "core:tray:default", + "notification:default", + "shell:default" + ] +} diff --git a/rust/gui-client/src-tauri/tauri.conf.json b/rust/gui-client/src-tauri/tauri.conf.json index 670904aff..a405ef766 100644 --- a/rust/gui-client/src-tauri/tauri.conf.json +++ b/rust/gui-client/src-tauri/tauri.conf.json @@ -42,7 +42,8 @@ "app": { "withGlobalTauri": true, "security": { - "csp": null + "csp": null, + "capabilities": ["default-capability"] }, "windows": [ { @@ -50,9 +51,9 @@ "title": "About Firezone", "url": "src/about.html", "fullscreen": false, - "resizable": true, - "width": 640, - "height": 480, + "resizable": false, + "width": 400, + "height": 300, "visible": false }, { diff --git a/rust/gui-client/src/about.html b/rust/gui-client/src/about.html index 96b4683fd..2db0139f0 100644 --- a/rust/gui-client/src/about.html +++ b/rust/gui-client/src/about.html @@ -10,14 +10,22 @@ - -
- Firezone Logo -

- Version - + +

+ Firezone Logo +

Version

+

+ +

+

()

+ Documentation
diff --git a/rust/gui-client/src/about.ts b/rust/gui-client/src/about.ts index 0f7dea4fe..09a516c33 100644 --- a/rust/gui-client/src/about.ts +++ b/rust/gui-client/src/about.ts @@ -18,8 +18,8 @@ function get_cargo_version() { function get_git_version() { try { - invoke("get_git_version").then((gitVersion: unknown) => { - gitVersionSpan.innerText = gitVersion as string; + invoke("get_git_version").then((gitVersion) => { + gitVersionSpan.innerText = gitVersion.substring(0, 8); // Trim Git hash }); } catch (e) { gitVersionSpan.innerText = "Unknown";