This commit is contained in:
Đăng Nguyễn
2025-12-22 21:28:57 +07:00
parent 30732b4b9f
commit e4e135e35f
6 changed files with 75 additions and 45 deletions

View File

@@ -77,6 +77,13 @@
</div>
</div>
<script>
window.ScrollToBottom = (element) => {
if (element) {
element.scrollTop = element.scrollHeight;
}
};
</script>
@code {
private DateTime DateLog = DateTime.Today;

View File

@@ -23,7 +23,7 @@
.log-level {
display: inline-block;
width: 46px;
width: 60px;
}
.log-head {

View File

@@ -560,10 +560,14 @@ public partial class RobotConfigManager
private async Task LoadConfig()
{
IsLoading = true;
StateHasChanged();
var response = await (await Http.PostAsync($"api/RobotConfigs/load", null)).Content.ReadFromJsonAsync<MessageResult>();
if (response is null) Snackbar.Add("Failed to load config", Severity.Warning);
else if (!response.IsSuccess) Snackbar.Add(response.Message ?? "Failed to load config", Severity.Warning);
else Snackbar.Add("Config loaded", Severity.Success);
IsLoading = false;
StateHasChanged();
}
}