private void ToggleLogView() { if (_adminInfo is not null) { ShowWarning = !ShowWarning; Logs = (ShowWarning ? _adminInfo.Logs : _adminInfo.Logs.Where(l => l.Level == "Error")).OrderByDescending(l => l.Timestamp).ToList(); LogsTable.SetItems(Logs); } }
private async Task ClearLogsAsync() { await AdminApi.ClearLogsAsync(); await OnInitializedAsync(); ToastService.DisplayToast("Logs vidés.", TimeSpan.FromSeconds(3), ToastType.Success, "clear-logs-admin", true); LogsTable.SetItems(Logs); ShowWarning = false; }