From 4b6ecbea27d47eea29c396d46fa4f7810c6fe0a4 Mon Sep 17 00:00:00 2001 From: Adeoye Adefemi Date: Tue, 19 Sep 2023 15:03:13 +0100 Subject: [PATCH 1/3] fixes --- src/pages/index.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 11313386..8948e66c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -14,6 +14,8 @@ import Link from "next/link"; import { useEffect, useState } from "react"; import { CommandData } from "../../core/bindings/CommandData"; import { TransferHistory } from "../../core/bindings/TransferHistory"; +import { AppData } from "@/types"; +import { computeFileSize } from "@/utils"; interface QuickAccessTab { name: string; @@ -98,7 +100,7 @@ export default function Main() { href={"quick-access/" + tab.name.toLowerCase()} className="rounded-[12px] shadow shadow-gray-500 px-3" style={{ - backgroundColor: "#3074f5", + backgroundColor: "#4c1d95", }} >
{tab.icon}
@@ -137,15 +139,15 @@ export default function Main() { - {isLoading ? : ( - transferHistory.data?.map((file, index) => ( - - {file.fileName} - {file.fileSize} - {file.date} - - )) - )} + {transferHistory?.data?.map((file, index) => ( + + {file.fileName} + + {computeFileSize(Number(file.fileSize))} + + {file.date} + + ))} From 2042901540520278afef49ec8eeabbc00bf19cdb Mon Sep 17 00:00:00 2001 From: Adeoye Adefemi Date: Tue, 19 Sep 2023 15:23:07 +0100 Subject: [PATCH 2/3] hot fixes --- core/src/main.rs | 2 +- src/pages/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main.rs b/core/src/main.rs index b26c8350..bed068e1 100644 --- a/core/src/main.rs +++ b/core/src/main.rs @@ -36,7 +36,7 @@ lazy_static! { let db_path = format!( "{downloads_dir}/{db_path}", downloads_dir = os_default_downloads_dir.display(), - db_path = ".dat" + db_path = ".store" ); // create the path if not exist path if not exist let _ = std::fs::create_dir_all(&db_path); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8948e66c..8370d01d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -100,7 +100,7 @@ export default function Main() { href={"quick-access/" + tab.name.toLowerCase()} className="rounded-[12px] shadow shadow-gray-500 px-3" style={{ - backgroundColor: "#4c1d95", + backgroundColor: "#3074f5", }} >
{tab.icon}
From e85a592f0f77524abd41ffe8f4ca19c3559355a1 Mon Sep 17 00:00:00 2001 From: Adeoye Adefemi Date: Tue, 19 Sep 2023 17:29:35 +0100 Subject: [PATCH 3/3] fixes --- core/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main.rs b/core/src/main.rs index bed068e1..c8d7e441 100644 --- a/core/src/main.rs +++ b/core/src/main.rs @@ -36,7 +36,7 @@ lazy_static! { let db_path = format!( "{downloads_dir}/{db_path}", downloads_dir = os_default_downloads_dir.display(), - db_path = ".store" + db_path = "store" ); // create the path if not exist path if not exist let _ = std::fs::create_dir_all(&db_path);