Skip to content

Commit

Permalink
feat: initial upload page
Browse files Browse the repository at this point in the history
  • Loading branch information
rupansh committed Jan 18, 2024
1 parent 21e4cd8 commit 2f911a4
Show file tree
Hide file tree
Showing 21 changed files with 1,264 additions and 7 deletions.
233 changes: 231 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ ic-agent = { version = "0.31.0", default-features = false, features = ["pem", "r
serde-wasm-bindgen = { version = "0.6.3" }
futures = "0.3.30"
leptos-use = "0.9.0"
reqwest = { version = "0.11.23", default-features = false }
reqwest = { version = "0.11.23", default-features = false, features = ["json"] }
serde_bytes = "0.11.14"
hex = "0.4.3"
leptos_icons = "0.2.1"
icondata = "0.3.0"
gloo = { version = "0.11.0", features = ["futures", "net", "net"] }
once_cell = "1.19.0"
async-trait = "0.1.77"
web-time = "1.0.0"

[build-dependencies]
candid_parser = "0.1.1"
Expand All @@ -57,6 +61,9 @@ ssr = [
"leptos-use/ssr",
"reqwest/rustls-tls",
]
cloudflare = []
release-bin = ["ssr", "cloudflare"]
release-lib = ["hydrate", "cloudflare"]

# Defines a size-optimized profile for the WASM bundle in release mode
[profile.wasm-release]
Expand Down
6 changes: 5 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use crate::{
error_template::{AppError, ErrorTemplate},
page::{err::ServerErrorPage, post_view::PostView, profile::ProfileView, root::RootPage},
page::{
err::ServerErrorPage, post_view::PostView, profile::ProfileView, root::RootPage,
upload::UploadPostPage,
},
state::canisters::Canisters,
};
use leptos::*;
Expand Down Expand Up @@ -30,6 +33,7 @@ pub fn App() -> impl IntoView {
<Route path="/" view=RootPage/>
<Route path="/hot-or-not/:canister_id/:post_id" view=PostView/>
<Route path="/profile/:id" view=ProfileView/>
<Route path="/upload" view=UploadPostPage/>
<Route path="/error" view=ServerErrorPage/>
</Routes>
</main>
Expand Down
2 changes: 2 additions & 0 deletions src/component/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pub mod bullet_loader;
pub mod modal;
pub mod spinner;
pub mod toggle;
Loading

0 comments on commit 2f911a4

Please sign in to comment.