@page "/person/{Address}" @inject State State @inject IJSRuntime JS @inject NavigationManager Nav

@Address

@Address
@(Address).omg.lol Status.lol Some.pics @if(now != null){ /Now }
Open in browser
@if (bio == null) {

} else { @bio }
@if(now != null){
Open in browser
}
@code { [Parameter] public string Address { get; set; } public string ProfileUrl { get => $"https://{Address}.omg.lol/"; } public ExternalPageComponent? NowPage { get; set; } public ExternalPageComponent? ProfilePage { get; set; } private bool Editable { get => Address == State.SelectedAddressName; } private MarkupString? bio; private NowData? now; protected override async Task OnInitializedAsync() { List? garden = await State.GetNowGarden(); now = garden?.FirstOrDefault(n => n.Address == Address); await InvokeAsync(StateHasChanged); string fragment = new Uri(Nav.Uri).Fragment; await JS.InvokeVoidAsync("ui", fragment); if (fragment.EndsWith("now")) await ReloadNow(); else if (fragment.EndsWith("profile")) await ReloadProfile(); bio = await State.GetBio(Address); } private async Task ReloadNow() { if(NowPage != null) { await NowPage.Reload(); await ResizeIframes(); } } private async Task ReloadProfile() { if (ProfilePage != null) { await ProfilePage.Reload(); await ResizeIframes(); } } private async Task ResizeIframes() { await JS.InvokeVoidAsync("iframeResize", new { license = "GPLv3" }); } }