[frontend/components] Added reply count to reply button
This commit is contained in:
parent
4768bfaf3d
commit
f48ff0c4b3
3 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
||||||
Likes="Note.Likes"
|
Likes="Note.Likes"
|
||||||
IsLiked="Note.Liked"
|
IsLiked="Note.Liked"
|
||||||
Renotes="Note.Renotes"
|
Renotes="Note.Renotes"
|
||||||
|
Replies="Note.Replies"
|
||||||
RenotePossible=
|
RenotePossible=
|
||||||
"@(Note.Visibility == NoteVisibility.Public || Note.Visibility == NoteVisibility.Home || Session.Current?.Id == Note.User.Id)"/>
|
"@(Note.Visibility == NoteVisibility.Public || Note.Visibility == NoteVisibility.Home || Session.Current?.Id == Note.User.Id)"/>
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
}
|
}
|
||||||
<button class="btn" @onclick="Reply" @onclick:stopPropagation="true" aria-label="reply">
|
<button class="btn" @onclick="Reply" @onclick:stopPropagation="true" aria-label="reply">
|
||||||
<Icon Name="Icons.ArrowUUpLeft" Size="1.3em"/>
|
<Icon Name="Icons.ArrowUUpLeft" Size="1.3em"/>
|
||||||
|
@if (Replies > 0)
|
||||||
|
{
|
||||||
|
<span class="reply-count">@Replies</span>
|
||||||
|
}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn @(RenotePossible ? "" : "disabled") positioned" @onclick="@(RenotePossible ? ToggleRenoteMenu : () => { })" @onclick:stopPropagation="true" aria-label="renote">
|
<button class="btn @(RenotePossible ? "" : "disabled") positioned" @onclick="@(RenotePossible ? ToggleRenoteMenu : () => { })" @onclick:stopPropagation="true" aria-label="renote">
|
||||||
@if (RenotePossible)
|
@if (RenotePossible)
|
||||||
|
@ -107,6 +111,7 @@
|
||||||
[Parameter] [EditorRequired] public required int Likes { get; set; }
|
[Parameter] [EditorRequired] public required int Likes { get; set; }
|
||||||
[Parameter] [EditorRequired] public required bool IsLiked { get; set; }
|
[Parameter] [EditorRequired] public required bool IsLiked { get; set; }
|
||||||
[Parameter] [EditorRequired] public required int Renotes { get; set; }
|
[Parameter] [EditorRequired] public required int Renotes { get; set; }
|
||||||
|
[Parameter] [EditorRequired] public required int Replies { get; set; }
|
||||||
[Parameter] public bool RenotePossible { get; set; }
|
[Parameter] public bool RenotePossible { get; set; }
|
||||||
private Menu ContextMenu { get; set; } = null!;
|
private Menu ContextMenu { get; set; } = null!;
|
||||||
private Menu RenoteMenu { get; set; } = null!;
|
private Menu RenoteMenu { get; set; } = null!;
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
.like-count {
|
.like-count {
|
||||||
margin-left: 0.3em;
|
margin-left: 0.3em;
|
||||||
}
|
}
|
||||||
|
.reply-count {
|
||||||
|
margin-left: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
.renote-count {
|
.renote-count {
|
||||||
margin-left: 0.3em;
|
margin-left: 0.3em;
|
||||||
|
|
Loading…
Add table
Reference in a new issue