From 260ebeea28bf05537d5bd71598d0270ecd228469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:34:51 +0200 Subject: [PATCH] Display MAC address and bug fixes --- apps/web/src/routes/+page.svelte | 2 +- packages/ui/pages/connections.svelte | 2 +- packages/ui/pages/home.svelte | 1 + packages/ui/pages/network.svelte | 1 + packages/ui/pages/onboarding.svelte | 4 +++- platforms/core/src/utils.rs | 6 +----- platforms/windows/lib/HardwareInfo.cs | 7 ++++++- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte index 4c751d9..3de3843 100644 --- a/apps/web/src/routes/+page.svelte +++ b/apps/web/src/routes/+page.svelte @@ -254,7 +254,7 @@ -
+
diff --git a/packages/ui/pages/connections.svelte b/packages/ui/pages/connections.svelte index 957ed40..097a022 100644 --- a/packages/ui/pages/connections.svelte +++ b/packages/ui/pages/connections.svelte @@ -46,7 +46,7 @@ }} > - Setup + Open
diff --git a/packages/ui/pages/home.svelte b/packages/ui/pages/home.svelte index 7fa35dc..3797239 100644 --- a/packages/ui/pages/home.svelte +++ b/packages/ui/pages/home.svelte @@ -498,6 +498,7 @@

Name: {name}

Description: {description}

Address: {ipAddress} ({mask})

+

MAC address: {macAddress}

Gateway: {gateway} ({dns})

Speed: {speed} Mbit/s

diff --git a/packages/ui/pages/network.svelte b/packages/ui/pages/network.svelte index e2e4856..0ec9c1d 100644 --- a/packages/ui/pages/network.svelte +++ b/packages/ui/pages/network.svelte @@ -14,6 +14,7 @@

Name: {name}

Description: {description}

Address: {ipAddress} ({mask})

+

MAC address: {macAddress}

Gateway: {gateway} ({dns})

Speed: {speed} Mbit/s

diff --git a/packages/ui/pages/onboarding.svelte b/packages/ui/pages/onboarding.svelte index b7e26f4..635102a 100644 --- a/packages/ui/pages/onboarding.svelte +++ b/packages/ui/pages/onboarding.svelte @@ -153,7 +153,9 @@ const free = () => { $settings.licenseKey = "free" $settings.licenseActivated = new Date().toISOString() - step3() + setTimeout(() => { + step3() + }, 250) } const activate = async () => { diff --git a/platforms/core/src/utils.rs b/platforms/core/src/utils.rs index d478ca1..6f556cf 100644 --- a/platforms/core/src/utils.rs +++ b/platforms/core/src/utils.rs @@ -1,5 +1,5 @@ -use std::env; use serde::{Deserialize, Serialize}; +use std::env; use sysinfo::System; #[derive(Serialize, Deserialize, Debug)] @@ -41,15 +41,11 @@ pub fn system_info() -> SystemInfo { String::from("N/A") }; - println!("GPU name: {}", gpu_name_json); - let gpu_name = match serde_json::from_str::(&gpu_name_json) { Ok(parsed) => parsed.name, Err(_) => "N/A".to_string(), }; - println!("GPU name: {}", gpu_name); - os_name = match os_name.as_str() { "Darwin" => "macOS".to_string(), _ => os_name, diff --git a/platforms/windows/lib/HardwareInfo.cs b/platforms/windows/lib/HardwareInfo.cs index 345e905..9651c28 100644 --- a/platforms/windows/lib/HardwareInfo.cs +++ b/platforms/windows/lib/HardwareInfo.cs @@ -30,6 +30,8 @@ public HardwareInfo() { } public void GetInfo() { + var errorSent = false; + try { var computerHardware = computer.Hardware; @@ -651,7 +653,10 @@ public void GetInfo() { firstRun = false; } catch (Exception e) { - SentrySdk.CaptureException(e); + if (errorSent == false) { + SentrySdk.CaptureException(e); + errorSent = true; + } } }