49 lines
No EOL
1.4 KiB
Text
49 lines
No EOL
1.4 KiB
Text
@using Iceshrimp.Assets.PhosphorIcons
|
|
@using Iceshrimp.Shared.Schemas
|
|
<div class="note-footer">
|
|
@if (Reactions.Count > 0)
|
|
{
|
|
<div claass="reactions">
|
|
@foreach (var reaction in Reactions)
|
|
{
|
|
<NoteReaction Reaction="reaction"/>
|
|
}
|
|
</div>
|
|
}
|
|
<button class="btn">
|
|
<Icon Name="Icons.ArrowUUpLeft"/>
|
|
</button>
|
|
<button class="btn">
|
|
<Icon Name="Icons.ArrowsClockwise"/>
|
|
</button>
|
|
<button @onclick="Like" class="btn">
|
|
@if (IsLiked)
|
|
{
|
|
<Icon Name="Icons.Heart" Pack="IconStyle.Fill"/>
|
|
}else {
|
|
<Icon Name="Icons.Heart"/>
|
|
}
|
|
@if (Likes > 0)
|
|
{
|
|
<span class="like-count">@Likes</span>
|
|
}
|
|
</button>
|
|
<button class="btn">
|
|
<Icon Name="Icons.Smiley"/>
|
|
</button>
|
|
<button class="btn">
|
|
<Icon Name="Icons.DotsThreeOutline"/>
|
|
</button>
|
|
</div>
|
|
@code {
|
|
[Parameter] [EditorRequired] public required List<NoteReactionSchema> Reactions { get; set; }
|
|
[Parameter] [EditorRequired] public required int Likes { get; set; }
|
|
[Parameter] [EditorRequired] public required bool IsLiked { get; set; }
|
|
|
|
[CascadingParameter] NoteComponent NoteComponent { get; set; }
|
|
|
|
private void Like()
|
|
{
|
|
NoteComponent.Like();
|
|
}
|
|
} |