From ea156b65f12609a110020048e1834ebc94e06073 Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 19 Jun 2026 01:25:44 +0800 Subject: [PATCH] Implement Web frontend Phase 2: Tab switching + search box UI - New category_view.html with Apple-style design - Tab switching between Category and Series views - Search box with API integration - Navigation stack for back button - Routes: /downloads and / (root) - All tests pass (135 passed) --- markbase-core/src/category_view.html | 351 +++++++++++++++++++++++++++ markbase-core/src/server.rs | 2 + 2 files changed, 353 insertions(+) create mode 100644 markbase-core/src/category_view.html diff --git a/markbase-core/src/category_view.html b/markbase-core/src/category_view.html new file mode 100644 index 0000000..3815326 --- /dev/null +++ b/markbase-core/src/category_view.html @@ -0,0 +1,351 @@ + + + + + + MarkBase Download Service + + + +

MarkBase Download Service

+ + + +
+
By Category
+
By Series
+
+ +
+
+
-
+
Categories
+
+
+
-
+
Total Files
+
+
+ +
+ +
+
Loading...
+
+
+ + + + \ No newline at end of file diff --git a/markbase-core/src/server.rs b/markbase-core/src/server.rs index 51e7bc4..6ff3c77 100644 --- a/markbase-core/src/server.rs +++ b/markbase-core/src/server.rs @@ -232,6 +232,8 @@ pub async fn run(port: u16, file: Option) -> anyhow::Result<()> { .route("/upload", get(|| async { Html(include_str!("upload.html")) })) .route("/files", get(|| async { Html(include_str!("file_list.html")) })) .route("/products", get(|| async { Html(include_str!("product_manager.html")) })) + .route("/downloads", get(|| async { Html(include_str!("category_view.html")) })) + .route("/", get(|| async { Html(include_str!("category_view.html")) })) .layer(DefaultBodyLimit::disable()) // Disable body size limit for large file uploads .with_state(state);