diff --git a/scss/layout.scss b/scss/layout.scss index 3bb3b03..959542a 100644 --- a/scss/layout.scss +++ b/scss/layout.scss @@ -108,6 +108,18 @@ picture { padding: 80px 0 32px; } +.notification { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + + .button-section { + padding: 0; + } +} + .tabs { padding: 0 12px; overflow-x: auto; @@ -336,6 +348,14 @@ picture { padding: 0; } + .notification { + display: block; + + .button-section { + padding: 8px 0; + } + } + .profile-search { padding: 0 8px; } diff --git a/src/main.rs b/src/main.rs index 94c857a..43c0ac2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,7 +50,7 @@ async fn main() -> anyhow::Result<()> { if std::env::var("RUST_LOG").is_err() { if config.debug { - std::env::set_var("RUST_LOG", "hyaenidae_content=debug,hyaenidae_profiles=debug,hyaenidae_accounts=debug,hyaenidae_toolkit=debug,hyaenidae_server=debug,info"); + std::env::set_var("RUST_LOG", "hyaenidae_content=debug,hyaenidae_profiles=debug,hyaenidae_accounts=debug,hyaenidae_toolkit=debug,hyaenidae=debug,info"); } else { std::env::set_var("RUST_LOG", "info"); } diff --git a/src/notifications.rs b/src/notifications.rs index a795801..487ec1b 100644 --- a/src/notifications.rs +++ b/src/notifications.rs @@ -475,18 +475,21 @@ impl NotificationsView { .for_profile(profile_id) { if let Some(follow_req) = store.store.view.follow_requests.by_id(fr_id)? { - if !view.profile_hm.contains_key(&follow_req.right) { + let icon = if let Some(profile) = view.profile_hm.get(&follow_req.right) { + profile.icon() + } else { let profile = store.store.profiles.by_id(follow_req.right)?.req()?; + let icon = profile.icon(); + view.profile_hm.insert(profile.id(), profile); + icon + }; - if let Some(file_id) = profile.icon() { - if !view.file_hm.contains_key(&file_id) { - if let Some(file) = store.store.files.by_id(file_id)? { - view.file_hm.insert(file.id(), file); - } + if let Some(file_id) = icon { + if !view.file_hm.contains_key(&file_id) { + if let Some(file) = store.store.files.by_id(file_id)? { + view.file_hm.insert(file.id(), file); } } - - view.profile_hm.insert(profile.id(), profile); } view.fr_profile_hm.insert(follow_req.id, follow_req.right); diff --git a/templates/bar.rs.html b/templates/bar.rs.html index 4cbed18..a71c13c 100644 --- a/templates/bar.rs.html +++ b/templates/bar.rs.html @@ -23,7 +23,7 @@ @if nav_state.has_notifications() {
diff --git a/templates/notifications/index.rs.html b/templates/notifications/index.rs.html index b919d5a..7a2f7cd 100644 --- a/templates/notifications/index.rs.html +++ b/templates/notifications/index.rs.html @@ -32,12 +32,14 @@ @:card_title({ Follow Requests }) @for fr in view.follow_requests() { @:card_body({ - @:profile_box(loader, &fr.view(), None, nav_state.dark(), {}) -