mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 06:01: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"
|
||||
};
|
||||
|
||||
let class_ = if instance.local {
|
||||
"hidden"
|
||||
} else {
|
||||
"btn btn-sm"
|
||||
};
|
||||
view! {
|
||||
<button
|
||||
class="btn btn-sm"
|
||||
class=class_
|
||||
on:click=move |_| follow_action.dispatch(instance.id)
|
||||
prop:disabled=move || is_following
|
||||
prop:hidden=move || instance.local
|
||||
title="Follow the instance so that new edits are synchronized to your instance."
|
||||
>
|
||||
{follow_text}
|
||||
|
|
Loading…
Reference in a new issue