feat: Redesign New Chat (#31)

* make subject is optional

* redesign

* search

* fix

* adjust
This commit is contained in:
reya
2025-05-12 20:46:01 +07:00
committed by GitHub
parent 2f83b5091e
commit 4e24061817
32 changed files with 580 additions and 367 deletions

View File

@@ -27,6 +27,10 @@ impl Account {
cx.global::<GlobalAccount>().0.clone()
}
pub fn get_global(cx: &App) -> &Self {
cx.global::<GlobalAccount>().0.read(cx)
}
pub fn set_global(account: Entity<Self>, cx: &mut App) {
cx.set_global(GlobalAccount(account));
}
@@ -162,6 +166,11 @@ impl Account {
.detach();
}
/// Get the reference to profile.
pub fn profile_ref(&self) -> Option<&Profile> {
self.profile.as_ref()
}
/// Sets the profile for the account.
pub fn profile(&mut self, profile: Profile, cx: &mut Context<Self>) {
self.profile = Some(profile);