mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 17:41:09 +00:00
Fix hiding follow button
This commit is contained in:
parent
1d2bd75faa
commit
1678cbd279
1 changed files with 6 additions and 2 deletions
|
@ -29,12 +29,16 @@ pub fn InstanceFollowButton(instance: DbInstance) -> impl IntoView {
|
||||||
"Follow instance"
|
"Follow instance"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let class_ = if instance.local {
|
||||||
|
"hidden"
|
||||||
|
} else {
|
||||||
|
"btn btn-sm"
|
||||||
|
};
|
||||||
view! {
|
view! {
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm"
|
class=class_
|
||||||
on:click=move |_| follow_action.dispatch(instance.id)
|
on:click=move |_| follow_action.dispatch(instance.id)
|
||||||
prop:disabled=move || is_following
|
prop:disabled=move || is_following
|
||||||
prop:hidden=move || instance.local
|
|
||||||
title="Follow the instance so that new edits are synchronized to your instance."
|
title="Follow the instance so that new edits are synchronized to your instance."
|
||||||
>
|
>
|
||||||
{follow_text}
|
{follow_text}
|
||||||
|
|
Loading…
Reference in a new issue