add: forges ui
TODO: forges tickets feed, posts open/closed state
This commit is contained in:
parent
5b1db42c51
commit
a6140f7c8c
40 changed files with 1664 additions and 1270 deletions
|
@ -22,8 +22,10 @@ pub struct Community {
|
|||
// likes
|
||||
pub likes: isize,
|
||||
pub dislikes: isize,
|
||||
// counts
|
||||
// ...
|
||||
pub member_count: usize,
|
||||
pub is_forge: bool,
|
||||
pub post_count: usize,
|
||||
}
|
||||
|
||||
impl Community {
|
||||
|
@ -44,6 +46,8 @@ impl Community {
|
|||
likes: 0,
|
||||
dislikes: 0,
|
||||
member_count: 0,
|
||||
is_forge: false,
|
||||
post_count: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,6 +66,8 @@ impl Community {
|
|||
likes: 0,
|
||||
dislikes: 0,
|
||||
member_count: 0,
|
||||
is_forge: false,
|
||||
post_count: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,9 +90,6 @@ pub struct CommunityContext {
|
|||
/// `enable_titles` is required for this setting to work.
|
||||
#[serde(default)]
|
||||
pub require_titles: bool,
|
||||
/// The community's layout in the UI.
|
||||
#[serde(default)]
|
||||
pub layout: CommunityLayout,
|
||||
}
|
||||
|
||||
/// Who can read a [`Community`].
|
||||
|
@ -140,21 +143,6 @@ impl Default for CommunityJoinAccess {
|
|||
}
|
||||
}
|
||||
|
||||
/// The layout of the [`Community`]'s UI.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum CommunityLayout {
|
||||
/// The classic timeline-like layout.
|
||||
Classic,
|
||||
/// A GitHub-esque bug tracker layout.
|
||||
BugTracker,
|
||||
}
|
||||
|
||||
impl Default for CommunityLayout {
|
||||
fn default() -> Self {
|
||||
Self::Classic
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct CommunityMembership {
|
||||
pub id: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue