[frontend/components] Don't show Follow button for yourself
This commit is contained in:
parent
3dfc7c6b63
commit
60ed8d3c3c
1 changed files with 9 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
@using Microsoft.Extensions.Localization
|
||||
@inject IStringLocalizer<Localization> Loc;
|
||||
@inject ApiService Api;
|
||||
@if (_buttonType == ButtonType.Self) return;
|
||||
|
||||
<span class="follow-button">
|
||||
@switch (_buttonType)
|
||||
{
|
||||
|
@ -51,7 +53,8 @@
|
|||
Unfollow,
|
||||
FollowBack,
|
||||
FollowLocked,
|
||||
CancelRequest
|
||||
CancelRequest,
|
||||
Self
|
||||
}
|
||||
|
||||
private void Action()
|
||||
|
@ -110,5 +113,10 @@
|
|||
{
|
||||
_buttonType = ButtonType.CancelRequest;
|
||||
}
|
||||
|
||||
if (UserProfile.Relations.HasFlag(Relations.Self))
|
||||
{
|
||||
_buttonType = ButtonType.Self;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue