@inherits LocalizableComponentBase @implements IDisposable @* The one-time notice before a persona's first reaction or poll vote, before it first joins an event, and before this device's first Web Push subscription (PublicNoticeService), in MainLayout. data-public-notice names which. *@ @HeadingText

@NoticeText

@Localizer["Cancel"] @Localizer["Continue"]
@code { [Inject] PublicNoticeService Notices { get; set; } string ActName => Notices.Act switch { PublicAct.Participation => "participation", PublicAct.Push => "push", _ => "reaction" }; string HeadingText => Notices.Act switch { PublicAct.Participation => Localizer["Joining an event is public"], PublicAct.Push => Localizer["Notifications go through your browser's push service"], _ => Localizer["Reactions and votes are public"] }; string NoticeText => Notices.Act switch { PublicAct.Participation => Localizer["The event's server shows who takes part, {0} included. Your other personas are never named.", CascadingState.Persona?.Name ?? ""], PublicAct.Push => Localizer["To reach this device while decePub is closed, PrivaPub hands each notification to the push service your browser uses (Google's, Mozilla's, Apple's…). It is encrypted for this browser alone: the push service learns when a notification arrives and how big it is, never what it says, who sent it or which persona it is for. Each persona has a subscription of its own, so PrivaPub keeps nothing that ties your personas together."], _ => Localizer["Anyone who can see the post can see that {0} reacted to it or voted in it. Your other personas are never named.", CascadingState.Persona?.Name ?? ""] }; protected override void OnInitialized() { Notices.Changed += Refresh; IsLoading = false; } void Refresh() => InvokeAsync(StateHasChanged); void Closed(bool open) { if (!open) Notices.Answer(false); } public void Dispose() => Notices.Changed -= Refresh; }