fix(quotesdb): gate UI binary on wasm32, update UI ticket statuses

- main.rs: add #[cfg(target_arch = "wasm32")] guards on all wasm32-only
  code; add stub fn main() for native targets so cargo check passes
- Ticket statuses updated for all completed UI page/component tickets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 3 months ago
parent 92e0f691cf
commit d4be4653d8

@ -1,7 +1,7 @@
+++
title = "Implement shared QuoteCard component — displays text, author, source, date, tags"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["93515e", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Write src/bin/ui/style.css — full stylesheet for all UI pages and components"
priority = 6
status = "todo"
status = "done"
ticket_type = "task"
dependencies = ["dc3d2b"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement Home page (/) — fetch and display random quote, 'Browse all' link"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "0d987f", "fc2f51", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement Submit page (/submit) — quote creation form, display returned auth_code on success"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "fc2f51", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement pagination component — prev/next buttons, current page indicator, total pages"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["93515e", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement Browse page (/browse) — paginated quote list with author/tag filter controls"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "0d987f", "2c5a57", "d3d502", "fc2f51", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement Quote detail page (/quotes/:id) — view, edit form with auth prompt, delete with auth prompt"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "0d987f", "f850c6", "fc2f51", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement Author page (/author/:name) — paginated list of quotes by a single author"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "0d987f", "2c5a57", "d3d502", "fc2f51", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement tag filter component — tag input/select for browse and author pages"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["93515e", "0fbdd5"]
+++

@ -1,7 +1,7 @@
+++
title = "Implement auth code modal/prompt component — dialog requesting X-Auth-Code before edit or delete"
priority = 5
status = "in_progress"
status = "done"
ticket_type = "task"
dependencies = ["93515e", "5379eb", "0fbdd5"]
+++

@ -2,13 +2,28 @@
//!
//! Compiled to WebAssembly via Trunk targeting `wasm32-unknown-unknown`.
//! Runs the Yew single-page application with client-side routing.
//!
//! All functional code is gated on `wasm32` — yew, web-sys, and wasm-bindgen
//! are wasm32-only crates unavailable on native targets.
#[cfg(target_arch = "wasm32")]
mod api;
#[cfg(target_arch = "wasm32")]
mod components;
#[cfg(target_arch = "wasm32")]
mod pages;
#[cfg(target_arch = "wasm32")]
mod storage;
#[cfg(target_arch = "wasm32")]
use yew::prelude::*;
#[cfg(target_arch = "wasm32")]
use yew_router::prelude::*;
/// Application routes matching the frontend route definitions in the design spec.
///
/// Routes map to page components. The `NotFound` variant catches all unmatched paths.
#[cfg(target_arch = "wasm32")]
#[derive(Clone, Routable, PartialEq)]
pub enum Route {
/// Home page — displays a random quote.
@ -33,6 +48,7 @@ pub enum Route {
}
/// Route switch function — maps each `Route` variant to its page component.
#[cfg(target_arch = "wasm32")]
fn switch(routes: Route) -> Html {
match routes {
Route::Home => html! { <pages::home::HomePage /> },
@ -54,6 +70,7 @@ fn switch(routes: Route) -> Html {
///
/// Wraps the entire application in a `BrowserRouter` and renders the
/// route-switched page components via `Switch`.
#[cfg(target_arch = "wasm32")]
#[function_component(App)]
fn app() -> Html {
html! {
@ -72,11 +89,15 @@ fn app() -> Html {
}
}
/// WASM entry point — called by the Trunk-generated JS bootstrap.
#[cfg(target_arch = "wasm32")]
fn main() {
yew::Renderer::<App>::new().render();
}
mod api;
mod components;
mod pages;
mod storage;
/// Stub entry point for native targets.
///
/// The UI binary is only meaningful when compiled for wasm32 via Trunk.
/// This stub satisfies the Rust binary requirement on other targets.
#[cfg(not(target_arch = "wasm32"))]
fn main() {}

Loading…
Cancel
Save