Skip to content

Commit ec7d916

Browse files
committed
client-side works fully again
1 parent 27f7785 commit ec7d916

31 files changed

Lines changed: 1262 additions & 557 deletions

File tree

Cargo.lock

Lines changed: 652 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@ jacquard-lexicon = { path = "../jacquard/crates/jacquard-lexicon", default-featu
5858

5959
[profile.wasm-dev]
6060
inherits = "dev"
61-
opt-level = 1
62-
lto = true
6361
debug = true
6462

6563
[profile.server-dev]
6664
inherits = "dev"
67-
lto = true
6865
debug = true
6966

7067
[profile.android-dev]

crates/weaver-app/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Orual <orual@nonbinary.computer>"]
55
edition = "2024"
66

77
[features]
8-
default = ["web", "no-app-index"]
8+
default = ["web", "fullstack-server", "no-app-index"]
99
# Fullstack mode with SSR and server functions
1010
fullstack-server = ["dioxus/fullstack"]
1111
wasm-split = ["dioxus/wasm-split"]
@@ -41,6 +41,7 @@ humansize = "2.0.0"
4141
base64 = "0.22"
4242
http = "1.3"
4343
reqwest = { version = "0.12", default-features = false, features = ["json"] }
44+
dioxus-free-icons = { version = "0.9", features = ["font-awesome-brands"] }
4445

4546
# diesel = { version = "2.3", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "chrono", "serde_json"] }
4647
# diesel_migrations = { version = "2.3", features = ["sqlite"] }

crates/weaver-app/Dioxus.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# HTML title tag content
66
title = "Weaver"
77

8+
out_dir = "dist"
9+
asset_dir = "public"
10+
811
# include `assets` in web platform
912
[web.resource]
1013

File renamed without changes.

crates/weaver-app/assets/styling/navbar.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
.auth-button {
3838
align-self: flex-end;
39+
background-color: var(--color-base);
3940
}
4041

4142
.auth-handle {

crates/weaver-app/assets/styling/profile.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
.profile-banner {
1010
max-width: 100%;
11-
height: 200px;
11+
height: 150px;
1212
overflow: hidden;
1313
}
1414

crates/weaver-app/src/auth/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mod state;
66
pub use state::AuthState;
77

88
use crate::fetch::Fetcher;
9-
#[cfg(all(feature = "fullstack-server", feature = "server"))]
109
use dioxus::prelude::*;
1110
#[cfg(all(feature = "fullstack-server", feature = "server"))]
1211
use jacquard::oauth::types::OAuthClientMetadata;
@@ -26,12 +25,18 @@ pub async fn client_metadata() -> Result<axum::Json<serde_json::Value>> {
2625
}
2726

2827
#[cfg(not(target_arch = "wasm32"))]
29-
pub async fn restore_session(_fetcher: Fetcher) -> Result<(), String> {
28+
pub async fn restore_session(
29+
_fetcher: Fetcher,
30+
_auth_state: Signal<AuthState>,
31+
) -> Result<(), String> {
3032
Ok(())
3133
}
3234

3335
#[cfg(target_arch = "wasm32")]
34-
pub async fn restore_session(fetcher: Fetcher) -> Result<(), CapturedError> {
36+
pub async fn restore_session(
37+
fetcher: Fetcher,
38+
mut auth_state: Signal<AuthState>,
39+
) -> Result<(), CapturedError> {
3540
use dioxus::prelude::*;
3641
use gloo_storage::{LocalStorage, Storage};
3742
use jacquard::types::string::Did;
@@ -70,8 +75,6 @@ pub async fn restore_session(fetcher: Fetcher) -> Result<(), CapturedError> {
7075
let (restored_did, session_id) = session.session_info().await;
7176

7277
// Update auth state
73-
let mut auth_state = try_consume_context::<Signal<AuthState>>()
74-
.ok_or(CapturedError::from_display("AuthState not in context"))?;
7578
auth_state
7679
.write()
7780
.set_authenticated(restored_did, session_id);

crates/weaver-app/src/components/accordion/style.css renamed to crates/weaver-app/src/components/accordion/accordion.css

File renamed without changes.

0 commit comments

Comments
 (0)