diff --git a/kinode/packages/homepage/homepage/src/lib.rs b/kinode/packages/homepage/homepage/src/lib.rs index e051d936..bd45bc9a 100644 --- a/kinode/packages/homepage/homepage/src/lib.rs +++ b/kinode/packages/homepage/homepage/src/lib.rs @@ -146,14 +146,11 @@ fn init(our: Address) { ) .expect("failed to bind /bird-plain.svg"); + // because boot uses this path to check if homepage is served yet, + // it's best to respond dynamically and only serve this path once + // all of the apps/widgets have populated. http_server - .bind_http_static_path( - "/version", - true, - false, - Some("text/plain".to_string()), - version_from_cargo_toml().into(), - ) + .bind_http_path("/version", http_config.clone()) .expect("failed to bind /version"); http_server @@ -196,6 +193,19 @@ fn init(our: Address) { .unwrap(), )), ), + "/version" => { + if app_data.len() >= 4 { + ( + server::HttpResponse::new(http::StatusCode::OK), + Some(LazyLoadBlob::new( + Some("text/plain"), + version_from_cargo_toml().as_bytes().to_vec(), + )), + ) + } else { + (server::HttpResponse::new(http::StatusCode::TOO_EARLY), None) + } + } "/favorite" => { let Ok(http::Method::POST) = incoming.method() else { return ( diff --git a/kinode/packages/homepage/ui/src/components/AllApps.tsx b/kinode/packages/homepage/ui/src/components/AllApps.tsx index e6027905..299976f9 100644 --- a/kinode/packages/homepage/ui/src/components/AllApps.tsx +++ b/kinode/packages/homepage/ui/src/components/AllApps.tsx @@ -25,14 +25,12 @@ const AllApps: React.FC = () => { // Sort apps based on persisted order const sortedApps = useMemo(() => { - if (!orderedApps.length) { - setOrderedApps(apps); - } - const o = [...orderedApps].sort((a, b) => { - return a.order - b.order; - }); - return o.filter(app => app.path !== null); - }, [orderedApps, apps]); + // Use orderedApps if we have them, otherwise fall back to apps + const appsToSort = orderedApps.length ? orderedApps : apps; + return [...appsToSort] + .sort((a, b) => a.order - b.order) + .filter(app => app.path !== null); + }, [apps, orderedApps]); const displayedApps = expanded ? sortedApps @@ -74,6 +72,8 @@ const AllApps: React.FC = () => { setOrderedApps(updatedApps); + handleDragEnd(); + // Sync the order with the backend fetch('/order', { method: 'POST', @@ -83,8 +83,6 @@ const AllApps: React.FC = () => { credentials: 'include', body: JSON.stringify(newSortedApps.map((app, index) => [app.id, index])) }); - - handleDragEnd(); }; return ( diff --git a/kinode/src/register-ui/src/index.css b/kinode/src/register-ui/src/index.css index 971f7fbe..82a3dade 100644 --- a/kinode/src/register-ui/src/index.css +++ b/kinode/src/register-ui/src/index.css @@ -7,6 +7,7 @@ .form-label { margin-bottom: 0.5rem; font-weight: bold; + text-align: center; } .form-input { @@ -241,6 +242,12 @@ color: var(--off-white); } +summary { + font-family: var(--font-family-main); + color: light-dark(var(--off-black), var(--off-white)); + margin-bottom: 10px; +} + button.secondary { width: 100%; } @@ -250,6 +257,7 @@ button.back { width: auto !important; padding: 5px !important; border: none !important; + background-color: var(--orange) !important; } /* Progress Bar Styles */ diff --git a/kinode/src/register-ui/src/pages/CommitDotOsName.tsx b/kinode/src/register-ui/src/pages/CommitDotOsName.tsx index 0e8018e6..563ff7b1 100644 --- a/kinode/src/register-ui/src/pages/CommitDotOsName.tsx +++ b/kinode/src/register-ui/src/pages/CommitDotOsName.tsx @@ -109,7 +109,10 @@ function CommitDotOsName({ - +
+ Advanced Options + +
-

This will confirm availability of the name and reserve it, then on the next screen you will be prompted to mint.

Already have a node? diff --git a/kinode/src/register-ui/src/pages/KinodeHome.tsx b/kinode/src/register-ui/src/pages/KinodeHome.tsx index 621cef20..6c22c3a2 100644 --- a/kinode/src/register-ui/src/pages/KinodeHome.tsx +++ b/kinode/src/register-ui/src/pages/KinodeHome.tsx @@ -32,7 +32,7 @@ function KinodeHome({ knsName }: OsHomeProps) { ) : ( <>

Welcome to Kinode

-

New here? Register a name to get started

+

New here? Register a node to get started: