Fix empty spaces on community page when not logged in
This commit is contained in:
parent
43aed85726
commit
b857219be2
|
@ -79,10 +79,16 @@ impl SimpleComponent for CommunityPage {
|
||||||
set_text: &format!("{} subscribers", model.info.counts.subscribers),
|
set_text: &format!("{} subscribers", model.info.counts.subscribers),
|
||||||
set_margin_end: 10,
|
set_margin_end: 10,
|
||||||
},
|
},
|
||||||
|
gtk::Label {
|
||||||
|
#[watch]
|
||||||
|
set_text: &format!("{} posts, {} comments", model.info.counts.posts, model.info.counts.comments),
|
||||||
|
set_margin_start: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
if settings::get_current_account().jwt.is_some() {
|
if settings::get_current_account().jwt.is_some() {
|
||||||
gtk::Box {
|
gtk::Box {
|
||||||
set_orientation: gtk::Orientation::Horizontal,
|
set_orientation: gtk::Orientation::Horizontal,
|
||||||
|
|
||||||
match model.info.subscribed {
|
match model.info.subscribed {
|
||||||
SubscribedType::Subscribed => {
|
SubscribedType::Subscribed => {
|
||||||
gtk::Button {
|
gtk::Button {
|
||||||
|
@ -102,25 +108,14 @@ impl SimpleComponent for CommunityPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
|
||||||
} else {
|
|
||||||
gtk::Box {}
|
|
||||||
},
|
|
||||||
gtk::Label {
|
|
||||||
#[watch]
|
|
||||||
set_text: &format!("{} posts, {} comments", model.info.counts.posts, model.info.counts.comments),
|
|
||||||
set_margin_start: 10,
|
|
||||||
},
|
|
||||||
|
|
||||||
if settings::get_current_account().jwt.is_some() {
|
|
||||||
gtk::Button {
|
gtk::Button {
|
||||||
set_label: "Create post",
|
set_label: "Create post",
|
||||||
set_margin_start: 10,
|
set_margin_start: 10,
|
||||||
connect_clicked => CommunityInput::OpenCreatePostDialog,
|
connect_clicked => CommunityInput::OpenCreatePostDialog,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
gtk::Box {}
|
gtk::Box {}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
gtk::Separator {},
|
gtk::Separator {},
|
||||||
|
|
Loading…
Reference in New Issue