2024-06-18 01:44:18 +00:00
|
|
|
@inject State State
|
|
|
|
|
2024-06-24 04:52:45 +00:00
|
|
|
<button id="refreshButton" class="absolute transparent circle top right margin" @onclick="() => State.SendRefresh()">
|
2024-06-18 01:44:18 +00:00
|
|
|
<i class="fa-solid fa-arrow-rotate-right @(State.IsRefreshing ? "fa-spin" : "")"></i>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
@code {
|
|
|
|
protected override async Task OnInitializedAsync() {
|
|
|
|
await base.OnInitializedAsync();
|
|
|
|
State.PropertyChanged += StateChanged;
|
|
|
|
}
|
|
|
|
|
|
|
|
private async void StateChanged(object? sender, PropertyChangedEventArgs e) {
|
|
|
|
if (e.PropertyName == nameof(State.IsRefreshing)) {
|
|
|
|
await InvokeAsync(StateHasChanged);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|