@* ReSharper disable once RedundantUsingDirective *@ @using Iceshrimp.Frontend.Components.Note @using Iceshrimp.Frontend.Localization @using Iceshrimp.Shared.Schemas.Web @using Microsoft.Extensions.Localization @using Iceshrimp.Assets.PhosphorIcons @inject IStringLocalizer Loc; @inject NavigationManager NavigationManager
@if (NotificationResponse is not { Type: "mention" } or { Type: "reply" }) {
@if (NotificationResponse is { User: not null }) { }
@if (NotificationResponse is { User: not null }) { } @switch (NotificationResponse) { case { Note: not null, Type: "like", User: not null }: @Loc["liked note"] break; case { Note: not null, Reaction: not null, Type: "reaction" }: @Loc["reacted to your note"] break; case { Type: "follow", User: not null }: @Loc["followed you"] break; case { Type: "followRequestReceived" }: @Loc["requested to follow you"] break; case { Type: "followRequestAccepted" }: @Loc["accepted your follow request"] break; case { Type: "renote" }: @Loc["renoted your note"] break; case { Type: "quote" }: @Loc["quoted your note"] break; case { Bite: { BiteBack: true }, Type: "bite" }: @Loc["bit you back"] break; case { Note: not null, Type: "bite" }: @Loc["bit your note"] break; case { Type: "bite" }: @Loc["bit you"] break; case { Type: "edit" }: @Loc["edited a note"] break; case { Type: "pollVote" }: @Loc["voted on your poll"] break; case { Type: "pollEnded" }: @Loc["poll has ended"] break; default: @Loc["unsupported notification type"]
view details

ID: @NotificationResponse.Id

Type: @NotificationResponse.Type

break; }
} @if (NotificationResponse is { Note: not null }) {
}
@code { [Parameter] public required NotificationResponse NotificationResponse { get; set; } private void OpenNote() { NavigationManager.NavigateTo($"/notes/{NotificationResponse.Note!.Id}"); } private void OpenFollowRequests() { NavigationManager.NavigateTo("/follow-requests"); } private void OpenProfile() { var username = $"@{NotificationResponse.User?.Username}"; if (NotificationResponse.User?.Host != null) username += $"@{NotificationResponse.User.Host}"; NavigationManager.NavigateTo($"/{username}"); } }