2024-05-30 01:06:08 +00:00
|
|
|
@page "/person/{Address}"
|
2024-05-31 01:27:01 +00:00
|
|
|
<div class="row center-align">
|
|
|
|
<h3><i class="fa-solid fa-fw fa-at"></i>@Address</h3>
|
|
|
|
</div>
|
|
|
|
<div class="row center-align">
|
|
|
|
<img class="profile avatar" src="https://profiles.cache.lol/@Address/picture" alt="@Address" />
|
|
|
|
</div>
|
2024-05-30 01:06:08 +00:00
|
|
|
|
2024-05-31 01:27:01 +00:00
|
|
|
<div id="bio" class="center-align max">
|
|
|
|
@if (bio == null)
|
|
|
|
{
|
|
|
|
<p><em>Getting Bio...</em></p>
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
@bio
|
|
|
|
}
|
|
|
|
</div>
|
2024-05-30 01:06:08 +00:00
|
|
|
|
|
|
|
@if (statuses == null) {
|
2024-05-31 01:27:01 +00:00
|
|
|
<p><em>Loading Statuses...</em></p>
|
2024-05-30 01:06:08 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
<div id="statuses">
|
|
|
|
@foreach (var status in statuses) {
|
2024-05-31 01:27:01 +00:00
|
|
|
<StatusCard status="@status"></StatusCard>
|
2024-05-30 01:06:08 +00:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
|
|
public string Address { get; set; }
|
|
|
|
|
|
|
|
private Status[]? statuses;
|
2024-05-31 01:27:01 +00:00
|
|
|
private MarkupString? bio;
|
2024-05-30 01:06:08 +00:00
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync() {
|
|
|
|
RestService api = new RestService();
|
2024-05-31 01:27:01 +00:00
|
|
|
await GetBioAsync(api);
|
|
|
|
// GetStatusesAsync(api);
|
|
|
|
}
|
|
|
|
|
|
|
|
private async Task GetStatusesAsync(RestService api) {
|
2024-05-30 01:06:08 +00:00
|
|
|
statuses = (await api.Statuslog(Address)).ToArray();
|
2024-05-31 01:27:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private async Task GetBioAsync(RestService api) {
|
2024-05-30 01:06:08 +00:00
|
|
|
bio = await api.StatuslogBio(Address);
|
|
|
|
}
|
|
|
|
}
|