Neighbourhood.omg.lol/Components/Pages/Person.razor

60 lines
1.4 KiB
Text
Raw Normal View History

2024-05-30 01:06:08 +00:00
@page "/person/{Address}"
2024-06-06 05:20:09 +00:00
@inject State State
<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
<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
2024-06-05 12:41:08 +00:00
<div class="responsive">
<div class="tabs">
<a data-ui="#statuses" class="active">
<i class="fa-solid fa-message-smile"></i>
<span>Status.lol</span>
</a>
<a data-ui="#pics">
<i class="fa-solid fa-images"></i>
<span>Some.pics</span>
</a>
2024-05-30 01:06:08 +00:00
</div>
2024-06-05 12:41:08 +00:00
<div id="statuses" class="page padding active">
2024-06-06 05:20:09 +00:00
<StatusList StatusFunc="@State.VirtualStatusesFunc(Address)"></StatusList>
2024-06-05 12:41:08 +00:00
</div>
<div id="pics" class="page padding">
2024-06-07 04:25:21 +00:00
@if(Editable){
<EditPicDialog @ref="editPicDialog" id="EditPicModal"></EditPicDialog>
}
<PicList PicsFunc="@State.VirtualPicsFunc(Address)" Editable="@Editable" Dialog="@editPicDialog"></PicList>
2024-06-05 12:41:08 +00:00
</div>
</div>
2024-05-30 01:06:08 +00:00
@code {
[Parameter]
public string Address { get; set; }
2024-06-07 04:25:21 +00:00
private EditPicDialog? editPicDialog { get; set; }
private bool Editable {
get => Address == State.SelectedAddressName;
}
private MarkupString? bio;
2024-05-30 01:06:08 +00:00
protected override async Task OnInitializedAsync() {
2024-06-06 05:20:09 +00:00
bio = await State.GetBio(Address);
2024-06-05 12:41:08 +00:00
}
2024-05-30 01:06:08 +00:00
}