add community creation flow

This commit is contained in:
2026-09-19 08:14:03 +07:00
parent 907347d002
commit 0328d35945
8 changed files with 126 additions and 33 deletions
+5 -17
View File
@@ -1,6 +1,7 @@
use std::rc::Rc;
use chat::Room;
use community::Community;
use gpui::prelude::FluentBuilder;
use gpui::{
App, ClickEvent, ElementId, Entity, InteractiveElement, IntoElement, ParentElement, RenderOnce,
@@ -66,7 +67,10 @@ pub enum SidebarRow {
pinned: bool,
},
Community {
entry: &'static CommunityEntry,
community: Entity<Community>,
depth: u8,
},
NewCommunity {
depth: u8,
},
Hint {
@@ -75,22 +79,6 @@ pub enum SidebarRow {
},
}
pub struct CommunityEntry {
pub name: &'static str,
}
pub fn dummy_communities() -> &'static [CommunityEntry] {
// TODO(concord): replace with CommunityRegistry communities, see docs/concord-usage.md.
&[
CommunityEntry {
name: "Coop Contributors",
},
CommunityEntry {
name: "Nostr Design",
},
]
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TreeRowKind {
Section,