feat: add basic profile panel
This commit is contained in:
@@ -5,7 +5,7 @@ use gpui::{
|
||||
AnyView, App, AppContext as _, Context, Entity, InteractiveElement as _, IntoElement,
|
||||
ParentElement as _, Render, SharedString, Styled as _, Subscription, WeakEntity, Window, div,
|
||||
};
|
||||
use nostr::prelude::EventId;
|
||||
use nostr::prelude::{EventId, PublicKey};
|
||||
use settings::{AppearanceMode, SettingsStore};
|
||||
use signed_core::{Announcement, RepoAddr};
|
||||
use signed_state::{Backend, BackendEvent, RepoStore};
|
||||
@@ -27,6 +27,7 @@ use crate::identity::passphrase::PassphraseDialog;
|
||||
use crate::inbox::InboxView;
|
||||
use crate::issues::IssuesView;
|
||||
use crate::issues::detail::IssueDetailView;
|
||||
use crate::profile::ProfileView;
|
||||
use crate::pull_requests::{PullRequestDetailView, PullRequestsView};
|
||||
use crate::repo::RepoDetailView;
|
||||
use crate::shared::log_dropped;
|
||||
@@ -245,6 +246,16 @@ impl AppRoot {
|
||||
InboxView::open_panel(&self.panels, cx.weak_entity(), window, cx);
|
||||
}
|
||||
|
||||
/// Opens a user's profile in the main stack, keyed by their public key.
|
||||
pub(crate) fn open_profile(
|
||||
&mut self,
|
||||
public_key: PublicKey,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
ProfileView::open(&self.panels, cx.weak_entity(), public_key, window, cx);
|
||||
}
|
||||
|
||||
/// Opens the dialog that creates a repository.
|
||||
fn open_create_repository(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
self.titlebar.update(cx, |titlebar, cx| {
|
||||
|
||||
Reference in New Issue
Block a user