@* ReSharper disable once RedundantUsingDirective *@ @using Iceshrimp.Frontend.Components.Note @using Iceshrimp.Frontend.Localization @using Iceshrimp.Shared.Schemas.Web @using Microsoft.Extensions.Localization @inject IStringLocalizer Loc; @inject NavigationManager NavigationManager
@if (NotificationResponse is { User: not null, Type: "like" or "follow" or "reaction" or "followRequestReceived" }) {
@(NotificationResponse.User.DisplayName ?? NotificationResponse.User.Username) @if (NotificationResponse is { Note: not null, Type: "like", User: not null }) { @Loc["liked your post: "] } @if (NotificationResponse is { Note: not null, Type: "reaction" }) { @Loc["reacted to your post: "] } @if (NotificationResponse is { Type: "follow", User: not null }) { @Loc["Followed you."] } @if (NotificationResponse is { Type: "followRequestReceived" }) {
@Loc["Requested to follow 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}"); } private void OpenFollowRequests() { NavigationManager.NavigateTo("/follow-requests"); } }