update
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run

This commit is contained in:
2026-09-11 21:52:56 +07:00
parent 81e421d121
commit f62fa9884d
+27 -7
View File
@@ -17,9 +17,9 @@ use signed_core::{
COVER_NOTE_KIND, InboxItem, InboxReadState, RepoAddr, activity_subject, filters, COVER_NOTE_KIND, InboxItem, InboxReadState, RepoAddr, activity_subject, filters,
}; };
use signed_state::{ use signed_state::{
Backend, BackendEvent, RefreshGate, RefreshRequest, RepoListStore, query_inbox, Backend, BackendEvent, ProfileStore, RefreshGate, RefreshRequest, RepoListStore, query_inbox,
}; };
use signed_ui::CountBadge; use signed_ui::{CountBadge, UserAvatar};
use utils::relative_time; use utils::relative_time;
use super::{RepoItem, open_repo_item, open_repo_panel}; use super::{RepoItem, open_repo_item, open_repo_panel};
@@ -577,6 +577,11 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
return div().id((prefix, ix)); return div().id((prefix, ix));
}; };
let profile_store = ProfileStore::global(cx);
let profile = profile_store.read(cx).get(&newest.pubkey);
let author = profile.name();
let picture = profile.picture();
let kind = item.root_kind.unwrap_or(newest.kind); let kind = item.root_kind.unwrap_or(newest.kind);
let subject = SharedString::from(activity_subject(newest)); let subject = SharedString::from(activity_subject(newest));
let age = relative_time(item.latest_activity()); let age = relative_time(item.latest_activity());
@@ -587,6 +592,7 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
.h_16() .h_16()
.w_full() .w_full()
.px_3() .px_3()
.gap_1()
.justify_center() .justify_center()
.bg(cx.theme().secondary) .bg(cx.theme().secondary)
.hover(|this| this.bg(cx.theme().secondary_hover)) .hover(|this| this.bg(cx.theme().secondary_hover))
@@ -621,13 +627,26 @@ fn notification_row(prefix: &'static str, ix: usize, item: &InboxItem, cx: &App)
}), }),
) )
.child( .child(
h_flex().gap_2().child(div().w_6().flex_shrink_0()).child(
h_flex() h_flex()
.w_full()
.gap_2()
.child(div().w_6().flex_shrink_0())
.child(
h_flex()
.flex_1()
.gap_1() .gap_1()
.items_center()
.text_xs() .text_xs()
.text_color(cx.theme().muted_foreground) .text_color(cx.theme().muted_foreground)
.child(
h_flex()
.gap_1()
.child(UserAvatar::new(author.clone()).picture(picture))
.child(author.clone()),
)
.child("opened")
.child(SharedString::from(kind_label(kind))) .child(SharedString::from(kind_label(kind)))
.child("·") .child(div().flex_1())
.child(SharedString::from(age)), .child(SharedString::from(age)),
), ),
) )
@@ -643,6 +662,7 @@ fn activity_row(ix: usize, event: &Event, cx: &App) -> AnyElement {
.h_16() .h_16()
.w_full() .w_full()
.px_3() .px_3()
.gap_1()
.justify_center() .justify_center()
.bg(cx.theme().secondary) .bg(cx.theme().secondary)
.hover(|this| this.bg(cx.theme().secondary_hover)) .hover(|this| this.bg(cx.theme().secondary_hover))
@@ -683,16 +703,16 @@ fn kind_icon(kind: Kind) -> Icon {
} }
match kind { match kind {
Kind::GitIssue => Icon::new(CustomIconName::GitIssueOpen), Kind::GitIssue => Icon::new(CustomIconName::GitIssueOngoing),
Kind::GitPullRequest | Kind::GitPullRequestUpdate => { Kind::GitPullRequest | Kind::GitPullRequestUpdate => {
Icon::new(CustomIconName::GitPullRequest) Icon::new(CustomIconName::GitPullRequest)
} }
Kind::GitPatch => Icon::new(CustomIconName::GitCommit), Kind::GitPatch => Icon::new(CustomIconName::GitCommit),
Kind::Comment => Icon::new(IconName::File), Kind::Comment => Icon::new(IconName::Star),
Kind::GitStatusOpen Kind::GitStatusOpen
| Kind::GitStatusApplied | Kind::GitStatusApplied
| Kind::GitStatusClosed | Kind::GitStatusClosed
| Kind::GitStatusDraft => Icon::new(IconName::CircleCheck), | Kind::GitStatusDraft => Icon::new(CustomIconName::GitIssueOpen),
_ => Icon::new(IconName::Bell), _ => Icon::new(IconName::Bell),
} }
.small() .small()