@inject IJSRuntime JS
@* TODO: link to paste view *@ @Paste.RelativeTime @if(MarkupView){
@Utilities.MdToHtmlMarkup(Paste.Content)
} else {
@((MarkupString)Paste.Content)
}
@code { [Parameter] public Paste? Paste { get; set; } [Parameter] public bool Editable { get; set; } = false; [Parameter] public EditPasteDialog? Dialog { get; set; } private bool MarkupView = false; private async Task EditPaste(EventArgs e) { Dialog!.Paste = Paste; await InvokeAsync(StateHasChanged); await JS.InvokeVoidAsync("ui", "#" + Dialog?.id); } public async Task ShareClick(EventArgs e) { await Share.Default.RequestAsync(new ShareTextRequest { Uri = Paste!.Url, Text = Paste!.Content, Title = Paste!.Title, Subject = Paste!.Title }); } }