diff --git a/package-lock.json b/package-lock.json index 9fb4642..ef7fb43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.7", "license": "MIT", "dependencies": { - "@codex-storage/marketplace-ui-components": "0.0.42", + "@codex-storage/marketplace-ui-components": "^0.0.43", "@codex-storage/sdk-js": "^0.0.15", "@sentry/browser": "^8.32.0", "@sentry/react": "^8.31.0", @@ -424,9 +424,9 @@ "peer": true }, "node_modules/@codex-storage/marketplace-ui-components": { - "version": "0.0.42", - "resolved": "https://registry.npmjs.org/@codex-storage/marketplace-ui-components/-/marketplace-ui-components-0.0.42.tgz", - "integrity": "sha512-JRs7v5rsxNnH3T30UV+DHuJNr25kJ1a1EAqgthA/0okDrcr9IlOVEvl7XrsNBGRDDbJC5MDJkWo9VD2Jh3gAgQ==", + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/@codex-storage/marketplace-ui-components/-/marketplace-ui-components-0.0.43.tgz", + "integrity": "sha512-rNhLfbJXu/1ZKh8hTnD2PkUcj/6M0/jHEfHJ86vIgFX4AFPq4+XGMstylx33VZAUYiDCEAc8iyJV/hMXjTNOsA==", "dependencies": { "lucide-react": "^0.453.0" }, diff --git a/package.json b/package.json index 8204889..8c90b35 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "React" ], "dependencies": { - "@codex-storage/marketplace-ui-components": "0.0.42", + "@codex-storage/marketplace-ui-components": "^0.0.43", "@codex-storage/sdk-js": "^0.0.15", "@sentry/browser": "^8.32.0", "@sentry/react": "^8.31.0", diff --git a/src/assets/icons/bridge.svg b/src/assets/icons/bridge.svg new file mode 100644 index 0000000..32808a5 --- /dev/null +++ b/src/assets/icons/bridge.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/buy-sell.svg b/src/assets/icons/buy-sell.svg new file mode 100644 index 0000000..6c2efb2 --- /dev/null +++ b/src/assets/icons/buy-sell.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/codextoken.svg b/src/assets/icons/codextoken.svg new file mode 100644 index 0000000..fb56963 --- /dev/null +++ b/src/assets/icons/codextoken.svg @@ -0,0 +1,38 @@ + diff --git a/src/assets/icons/contacts.svg b/src/assets/icons/contacts.svg new file mode 100644 index 0000000..fcbbde8 --- /dev/null +++ b/src/assets/icons/contacts.svg @@ -0,0 +1,10 @@ + diff --git a/src/assets/icons/ethereum.svg b/src/assets/icons/ethereum.svg new file mode 100644 index 0000000..edef96b --- /dev/null +++ b/src/assets/icons/ethereum.svg @@ -0,0 +1,10 @@ + diff --git a/src/assets/icons/import.svg b/src/assets/icons/import.svg new file mode 100644 index 0000000..79ddb5a --- /dev/null +++ b/src/assets/icons/import.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/receive.svg b/src/assets/icons/receive.svg new file mode 100644 index 0000000..f62ef22 --- /dev/null +++ b/src/assets/icons/receive.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/send.svg b/src/assets/icons/send.svg new file mode 100644 index 0000000..67e06d0 --- /dev/null +++ b/src/assets/icons/send.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/swap.svg b/src/assets/icons/swap.svg new file mode 100644 index 0000000..fe59f13 --- /dev/null +++ b/src/assets/icons/swap.svg @@ -0,0 +1,11 @@ + diff --git a/src/assets/icons/tokens.svg b/src/assets/icons/tokens.svg new file mode 100644 index 0000000..bc20137 --- /dev/null +++ b/src/assets/icons/tokens.svg @@ -0,0 +1,10 @@ + diff --git a/src/components/AppBar/AppBar.tsx b/src/components/AppBar/AppBar.tsx index b9a1540..e38fac5 100644 --- a/src/components/AppBar/AppBar.tsx +++ b/src/components/AppBar/AppBar.tsx @@ -74,9 +74,12 @@ export function AppBar({ onIconClick }: Props) { const networkIconColor = online ? "#3EE089" : "var(--codex-input-color-error)"; - const nodesIconColor = codex.enabled - ? "#3EE089" - : "var(--codex-input-color-error)"; + const nodesIconColor = + codex.enabled === false + ? "var(--codex-input-color-error)" + : persistence.enabled + ? "#3EE089" + : "var(--codex-input-color-warning)"; return ( <> diff --git a/src/components/AppBar/appBar.css b/src/components/AppBar/appBar.css index 084a830..9a6d877 100644 --- a/src/components/AppBar/appBar.css +++ b/src/components/AppBar/appBar.css @@ -26,7 +26,7 @@ border-right-color: var(--codex-input-color-error); } - &.app-bar--no-persistence { + &.app-bar--no-persistence:not(.app-bar--offline) { border-right-color: rgb(var(--codex-color-warning)); } diff --git a/src/components/ConnectedAccount/WalletCard.css b/src/components/ConnectedAccount/WalletCard.css index 4971622..f0fa1d8 100644 --- a/src/components/ConnectedAccount/WalletCard.css +++ b/src/components/ConnectedAccount/WalletCard.css @@ -30,6 +30,11 @@ } header { + display: flex; + justify-content: space-between; + margin-bottom: 16px; + align-items: center; + button { background-color: #161616; border: 1px solid #96969633; diff --git a/src/components/Files/FileDetails.css b/src/components/Files/FileDetails.css index 790551b..4f78919 100644 --- a/src/components/Files/FileDetails.css +++ b/src/components/Files/FileDetails.css @@ -15,6 +15,8 @@ line-height: 24px; letter-spacing: -0.011em; text-align: left; + gap: 16px; + margin-bottom: 8px; span { flex-grow: 1; diff --git a/src/components/Files/FolderButton.css b/src/components/Files/FolderButton.css index 755b618..5ec2643 100644 --- a/src/components/Files/FolderButton.css +++ b/src/components/Files/FolderButton.css @@ -1,12 +1,9 @@ .folder-button { > div { position: absolute; - right: 300px; + transform: translate(310px, -200px); opacity: 0; - transition: - transform 0.25s, - left 0.25s, - opacity 0.15s; + transition: opacity 0.15s; background-color: var(--codex-background); padding: 0.5rem; border-radius: var(--codex-border-radius); diff --git a/src/components/HealthChecks/HealthChecks.tsx b/src/components/HealthChecks/HealthChecks.tsx index 7efb698..abc16dd 100644 --- a/src/components/HealthChecks/HealthChecks.tsx +++ b/src/components/HealthChecks/HealthChecks.tsx @@ -37,14 +37,10 @@ export function HealthChecks({ online, onStepValid }: Props) { useEffect( () => { - if (codex.isSuccess) { - persistence.refetch(); - portForwarding.refetch().then(({ data }) => { - onStepValid(data?.reachable || false); - }); - } else { - onStepValid(false); - } + persistence.refetch(); + portForwarding.refetch(); + + onStepValid(codex.isSuccess); }, // We really do not want to add persistence and portForwarding as // dependencies because it will cause a re-render every time. @@ -163,18 +159,6 @@ export function HealthChecks({ online, onStepValid }: Props) { Internet connection -
What's Codex?
-- Codex is a decentralised data storage platform that provides - exceptionally strong censorship resistance and durability - guarantees. It serves as the storage layer of the Logos tech - stack. -
+ return ( +What's Codex?
++ Codex is a decentralised data storage platform that provides + exceptionally strong censorship resistance and durability + guarantees. It serves as the storage layer of the Logos tech + stack. +
+- What is the purpose of this web application? -
-- This application allows you to interact with the Codex Marketplace - network in a user-friendly manner. -
++ What is the purpose of this web application? +
++ This application allows you to interact with the Codex + Marketplace network in a user-friendly manner. +
+Can Codex handle big files ?
-- Codex can handle very large files, which is its main purpose. - However, for this UI, the files used should not be too large. -
+Can Codex handle big files ?
++ Codex can handle very large files, which is its main purpose. + However, for this UI, the files used should not be too large. +
+Is it production ready ?
-- Not at all! This is a very early alpha version. You should expect - to encounter bugs, but don't worry—feel free to reach out to us if - you need assistance. -
+Is it production ready ?
++ Not at all! This is a very early alpha version. You should + expect to encounter bugs, but don't worry—feel free to reach out + to us if you need assistance. +
+- How can I reach you if I am stuck ? -
-- Please create a new issue on our GitHub repository - - https://github.com/codex-storage/codex-marketplace-ui - - . -
++ How can I reach you if I am stuck ? +
++ Please create a new issue on our GitHub repository + + https://github.com/codex-storage/codex-marketplace-ui + + . +
+How can I build and run Codex ?
-- For instructions, please visit{" "} - - https://docs.codex.storage - - . -
+How can I build and run Codex ?
++ For instructions, please visit{" "} + + https://docs.codex.storage + + . +
+123,223 CDX
+2.32 ETH
+
diff --git a/src/routes/onboarding-checks.tsx b/src/routes/onboarding-checks.tsx
index bf9ea25..ac51a1c 100644
--- a/src/routes/onboarding-checks.tsx
+++ b/src/routes/onboarding-checks.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, useNavigate } from "@tanstack/react-router";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { attributes } from "../utils/attributes";
import ArrowRightCircle from "../assets/icons/arrow-circle.svg?react";
import { OnBoardingLayout } from "../components/OnBoarding/OnBoardingLayout";
@@ -14,6 +14,21 @@ const OnBoardingChecks = () => {
const [isStepValid, setIsStepValid] = useState(false);
const navigate = useNavigate({ from: "/onboarding-checks" });
+ useEffect(() => {
+ const onKeyPress = (event: Event) => {
+ const e = event as KeyboardEvent;
+ if (e.key === "ArrowRight" && isStepValid) {
+ navigate({ to: "/dashboard" });
+ } else if (e.key === "ArrowLeft") {
+ navigate({ to: "/onboarding-name" });
+ }
+ };
+
+ document.addEventListener("keydown", onKeyPress);
+
+ return () => document.removeEventListener("keydown", onKeyPress);
+ }, [navigate, isStepValid]);
+
const onNextStep = () => {
if (isStepValid) {
navigate({ to: "/dashboard" });
diff --git a/src/routes/onboarding-name.tsx b/src/routes/onboarding-name.tsx
index 983c3df..09faacf 100644
--- a/src/routes/onboarding-name.tsx
+++ b/src/routes/onboarding-name.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, useNavigate } from "@tanstack/react-router";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { OnBoardingLayout } from "../components/OnBoarding/OnBoardingLayout";
import { attributes } from "../utils/attributes";
import ArrowRightCircle from "../assets/icons/arrow-circle.svg?react";
@@ -21,6 +21,21 @@ const OnBoardingName = () => {
}
};
+ useEffect(() => {
+ const onKeyPress = (event: Event) => {
+ const e = event as KeyboardEvent;
+ if (e.key === "ArrowRight") {
+ navigate({ to: "/onboarding-checks" });
+ } else if (e.key === "ArrowLeft") {
+ navigate({ to: "/" });
+ }
+ };
+
+ document.addEventListener("keydown", onKeyPress);
+
+ return () => document.removeEventListener("keydown", onKeyPress);
+ }, [navigate]);
+
return (