[frontend/pages] Add loading and error state views to about page

This commit is contained in:
pancakes 2025-03-29 16:06:00 +10:00
parent 7e7e38e9ca
commit 8a28874dfd
No known key found for this signature in database
2 changed files with 19 additions and 0 deletions

View file

@ -43,6 +43,18 @@
{ {
<i>Not found</i> <i>Not found</i>
} }
@if (State == State.Loading)
{
<HeadTitle Text="@Loc["Loading"]"/>
<div class="loading"><LoadingSpinner Scale="2" /></div>
}
@if (State == State.Error)
{
<HeadTitle Text="@Loc["Error"]"/>
<div>Failure</div>
}
@code { @code {
[Parameter] public string? NoteId { get; set; } [Parameter] public string? NoteId { get; set; }

View file

@ -11,4 +11,11 @@ summary {
summary:hover { summary:hover {
background-color: var(--hover-color); background-color: var(--hover-color);
}
.loading {
display: flex;
align-items: center;
justify-content: center;
padding-top: 25vh;
} }