[frontend] Add "reaction" notification type
This commit is contained in:
parent
ffe56307f3
commit
b39007362c
1 changed files with 8 additions and 3 deletions
|
@ -5,9 +5,8 @@
|
||||||
@inject IStringLocalizer<Localization> Loc;
|
@inject IStringLocalizer<Localization> Loc;
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
|
|
||||||
<div class="notification">
|
<div class="notification">
|
||||||
@if (NotificationResponse is { User: not null, Type: "like" or "follow" })
|
@if (NotificationResponse is { User: not null, Type: "like" or "follow" or "reaction" })
|
||||||
{
|
{
|
||||||
<img class="user-avatar" src="@NotificationResponse.User.AvatarUrl"/>
|
<img class="user-avatar" src="@NotificationResponse.User.AvatarUrl"/>
|
||||||
<div class="notification-body">
|
<div class="notification-body">
|
||||||
|
@ -16,7 +15,13 @@
|
||||||
@if (NotificationResponse is { Note: not null, Type: "like", User: not null })
|
@if (NotificationResponse is { Note: not null, Type: "like", User: not null })
|
||||||
{
|
{
|
||||||
<span @onclick="OpenNote" class="notification-text">
|
<span @onclick="OpenNote" class="notification-text">
|
||||||
@Loc["liked your post: \"{0}\"", NotificationResponse.Note.Text ?? NotificationResponse.Note.Cw ?? "This one!"]
|
@Loc["liked your post: "]<MfmText Text="@NotificationResponse.Note.Text"></MfmText>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
@if (NotificationResponse is { Note: not null, Type: "reaction" })
|
||||||
|
{
|
||||||
|
<span @onclick="OpenNote" class="notification-text">
|
||||||
|
@Loc["reacted to your post: "] <MfmText Text="@NotificationResponse.Note.Text"></MfmText>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue