From e7ea27695ebef166fe1acac4250f926be7a099d4 Mon Sep 17 00:00:00 2001 From: AHQ Miness Date: Fri, 6 Dec 2024 10:17:15 +0530 Subject: [PATCH] fix icon --- src-service/Cargo.lock | 4 +-- src-service/Cargo.toml | 2 +- src-service/src/authentication.rs | 5 +-- src/app/apps/components/app_modal.tsx | 50 ++++++++++++--------------- src/app/apps/components/windows.svg | 1 + 5 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 src/app/apps/components/windows.svg diff --git a/src-service/Cargo.lock b/src-service/Cargo.lock index 373cd291..ac18c31b 100644 --- a/src-service/Cargo.lock +++ b/src-service/Cargo.lock @@ -1486,9 +1486,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af" +checksum = "948512566b1895f93b1592c7574baeb2de842f224f2aab158799ecadb8ebbb46" dependencies = [ "core-foundation-sys", "libc", diff --git a/src-service/Cargo.toml b/src-service/Cargo.toml index b4fa65a1..074e9a6d 100644 --- a/src-service/Cargo.toml +++ b/src-service/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://ahqstore.github.io/" lazy_static = "1" reqwest = { version = "0.12", features = ["json", "rustls-tls"] } serde_json = "1" -sysinfo = "0.32" +sysinfo = "0.33" tokio = { version = "1", default-features = false, features = [ "net", "rt", diff --git a/src-service/src/authentication.rs b/src-service/src/authentication.rs index 47b4bb48..9ca74a69 100644 --- a/src-service/src/authentication.rs +++ b/src-service/src/authentication.rs @@ -13,7 +13,7 @@ pub fn is_current_logged_in_user(pid: usize) -> bool { let mut system = System::new(); let mut users = Users::new(); - users.refresh_list(); + users.refresh(); system.refresh_processes_specifics( ProcessesToUpdate::Some(&[Pid::from(pid)]), true, @@ -68,7 +68,8 @@ pub fn authenticate_process(pid: usize, time: bool) -> (bool, bool, String) { let mut system = System::new(); let mut users = Users::new(); - users.refresh_list(); + + users.refresh(); system.refresh_processes_specifics( ProcessesToUpdate::Some(&[Pid::from(pid)]), true, diff --git a/src/app/apps/components/app_modal.tsx b/src/app/apps/components/app_modal.tsx index 23ef0b4e..ef81ec31 100644 --- a/src/app/apps/components/app_modal.tsx +++ b/src/app/apps/components/app_modal.tsx @@ -19,9 +19,10 @@ import { ApplicationPopup } from "../../resources/components/popup"; import { invoke } from "@tauri-apps/api/core"; import { IoCheckmarkCircle, IoWarning } from "react-icons/io5"; import { FaAndroid, FaLinux } from "react-icons/fa6"; -import { SiWindows } from "react-icons/si"; import { worker } from "../../resources/core/installer"; +import win from "./windows.svg"; + import { Carousel, CarouselContent, @@ -66,13 +67,13 @@ const defAppData: appData = { displayImages: [], downloadUrls: [], install: { - free: () => {}, + free: () => { }, linux: undefined, win32: undefined, android: undefined, }, repo: { - free: () => {}, + free: () => { }, author: "", repo: "", }, @@ -106,7 +107,7 @@ export default function ShowModal(props: AppDataPropsModal) { ); const [author, setAuthor] = useState({ avatar_url: "", - free: () => {}, + free: () => { }, github: "", id: "", name: "", @@ -156,7 +157,7 @@ export default function ShowModal(props: AppDataPropsModal) { } } } - } catch (_) {} + } catch (_) { } }); return () => { @@ -283,25 +284,22 @@ export default function ShowModal(props: AppDataPropsModal) { /> ) : (
)}

{appDisplayName}

{description.length > 128 ? description.substring(0, 127) : description}

@@ -355,11 +353,10 @@ export default function ShowModal(props: AppDataPropsModal) { <>

Description

@@ -480,13 +476,13 @@ export default function ShowModal(props: AppDataPropsModal) { }) } > - - - Windows{" "} - {appData.install.win32 == undefined ? "arm64" : ""} - -
- )} + + + Windows{" "} + {appData.install.win32 == undefined ? "arm64" : ""} + +
+ )} {appData.install.linux != undefined && (
\ No newline at end of file