@using Iceshrimp.Shared.Schemas @using Iceshrimp.Frontend.Components.Note @using Iceshrimp.Frontend.Localization @using Microsoft.Extensions.Localization @inject IStringLocalizer Loc; @inject NavigationManager NavigationManager
@if (NotificationResponse is { User: not null, Type: "like" or "follow" }) {
@(NotificationResponse.User.DisplayName ?? NotificationResponse.User.Username) @if (NotificationResponse is { Note: not null, Type: "like", User: not null }) { @Loc["liked your post: \"{0}\"", NotificationResponse.Note.Text ?? NotificationResponse.Note.Cw ?? "This one!"] } @if (NotificationResponse is { Type: "follow", User: not null }) { @Loc["Followed you."] }
} @if (NotificationResponse is { Type: "mention" }) {
} @if (NotificationResponse is { Type: "reply" }) {
} @if (NotificationResponse is { Type: "renote" }) {
@Loc["{0} boosted your post.", NotificationResponse.User!.DisplayName ?? NotificationResponse.User.Username]
} @if (NotificationResponse is { Type: "quote" }) {
}
@code { [Parameter] public required NotificationResponse NotificationResponse { get; set; } private void OpenNote() { NavigationManager.NavigateTo($"/notes/{NotificationResponse.Note!.Id}"); } }