.
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s
Rust / build (macos-latest, stable) (pull_request) Canceled after 0s
Rust / build (ubuntu-latest, stable) (pull_request) Canceled after 0s
Rust / build (windows-latest, stable) (pull_request) Canceled after 0s

This commit is contained in:
2026-09-14 11:03:02 +07:00
parent 7d2c3fd0c5
commit ec459d6507
+22 -19
View File
@@ -2017,30 +2017,33 @@ pub(super) fn repo_display_name(store: &RepoStore) -> SharedString {
/// The owner and identifier a local repository is already bound to. /// The owner and identifier a local repository is already bound to.
fn bound_repo_label(binding: &Nip34Binding, cx: &App) -> AnyElement { fn bound_repo_label(binding: &Nip34Binding, cx: &App) -> AnyElement {
let owner = binding let store = ProfileStore::global(cx);
.owner let profile = binding.owner.map(|pk| store.read(cx).get(&pk));
.and_then(|owner| owner.to_bech32().ok())
.map(|npub| middle_truncate(&npub, 12, 8))
.unwrap_or_else(|| "a NIP-34 coordinate".to_owned());
let mut label = v_flex().flex_shrink_0().items_end().gap_1().child( h_flex()
div() .flex_shrink_0()
.text_xs() .gap_2()
.text_sm()
.child("Initialized by")
.text_color(cx.theme().muted_foreground) .text_color(cx.theme().muted_foreground)
.child(SharedString::from(format!("Bound to {owner}"))), .when_some(profile, |this, profile| {
); this.child(
h_flex()
if let Some(identifier) = binding.identifier.as_deref() { .gap_1()
label = label.child( .text_color(cx.theme().foreground)
.child(UserAvatar::new(profile.name()).picture(profile.picture()))
.child(profile.name()),
)
})
.when_some(binding.identifier.as_deref(), |this, ident| {
this.child(
div() div()
.text_xs() .text_xs()
.font_semibold() .font_semibold()
.text_color(cx.theme().muted_foreground) .child(SharedString::from(format!("/{ident}"))),
.child(SharedString::from(identifier.to_owned())), )
); })
} .into_any_element()
label.into_any_element()
} }
impl BasePanel for RepoDetailView { impl BasePanel for RepoDetailView {