Switched to database scheme seperation from MoonCores SingleDb. Updated mooncore versions. Updating to correct Async naming

This commit is contained in:
2025-09-21 16:44:01 +00:00
parent 86bec7f2ee
commit 3e87d5c140
93 changed files with 587 additions and 1583 deletions

View File

@@ -30,7 +30,7 @@
<div class="my-8">
<DataGrid TGridItem="ThemeResponse"
ItemsProvider="ItemsProvider"
ItemsProvider="ItemsProviderAsync"
EnableFiltering="true"
EnablePagination="true">
@@ -105,7 +105,7 @@
{
private DataGrid<ThemeResponse> Grid;
private async Task<DataGridItemResult<ThemeResponse>> ItemsProvider(DataGridItemRequest request)
private async Task<DataGridItemResult<ThemeResponse>> ItemsProviderAsync(DataGridItemRequest request)
{
var query = $"?startIndex={request.StartIndex}&count={request.Count}";
@@ -142,13 +142,13 @@
{
if (!file.Name.EndsWith(".json"))
{
await ToastService.Error($"Unable to import {file.Name}", "Only .json files are supported");
await ToastService.ErrorAsync($"Unable to import {file.Name}", "Only .json files are supported");
continue;
}
if (file.Size > maxFileSize)
{
await ToastService.Error($"Unable to import {file.Name}", "Exceeded the maximum file limit of 1MB");
await ToastService.ErrorAsync($"Unable to import {file.Name}", "Exceeded the maximum file limit of 1MB");
continue;
}
@@ -159,7 +159,7 @@
if (themeTransfer == null)
{
await ToastService.Error($"Unable to import {file.Name}", "Failed to deserialize the content");
await ToastService.ErrorAsync($"Unable to import {file.Name}", "Failed to deserialize the content");
continue;
}
@@ -173,7 +173,7 @@
Version = themeTransfer.Version
});
await ToastService.Success("Successfully imported theme", theme.Name);
await ToastService.SuccessAsync("Successfully imported theme", theme.Name);
await Grid.RefreshAsync();
}
@@ -203,19 +203,19 @@
var fileName = $"{transfer.Name.Replace(" ", string.Empty).Trim()}.json";
await DownloadService.Download(fileName, json);
await DownloadService.DownloadAsync(fileName, json);
}
private async Task DeleteAsync(ThemeResponse response)
{
await AlertService.ConfirmDanger(
await AlertService.ConfirmDangerAsync(
"Theme deletion",
$"Do you really want to delete the theme: {response.Name}",
async () =>
{
await ThemeService.DeleteAsync(response.Id);
await ToastService.Success("Successfully deleted theme");
await ToastService.SuccessAsync("Successfully deleted theme");
await Grid.RefreshAsync();
}
);

View File

@@ -14,7 +14,7 @@
<i class="icon-chevron-left"></i>
Back
</a>
<WButton OnClick="_ => Form.Submit()" CssClasses="btn btn-primary">
<WButton OnClick="Form.SubmitAsync" CssClasses="btn btn-primary">
<i class="icon-check"></i>
Create
</WButton>
@@ -59,7 +59,7 @@
private async Task OnValidSubmit()
{
await ThemeService.CreateAsync(Request);
await ToastService.Success("Successfully created theme");
await ToastService.SuccessAsync("Successfully created theme");
NavigationManager.NavigateTo("/admin/system/customisation");
}

View File

@@ -9,13 +9,13 @@
@inject ToastService ToastService
@inject NavigationManager Navigation
<LazyLoader Load="Load">
<LazyLoader Load="LoadAsync">
<PageHeader Title="@($"Update {Request.Name}")">
<a href="/admin/system/customisation" class="btn btn-secondary">
<i class="icon-chevron-left"></i>
Back
</a>
<WButton OnClick="_ => Form.Submit()" CssClasses="btn btn-primary">
<WButton OnClick="Form.SubmitAsync" CssClasses="btn btn-primary">
<i class="icon-check"></i>
Update
</WButton>
@@ -80,7 +80,7 @@
private HandleForm Form;
private async Task Load(LazyLoader _)
private async Task LoadAsync(LazyLoader _)
{
Response = await ThemeService.GetAsync(Id);
@@ -100,7 +100,7 @@
{
await ThemeService.UpdateAsync(Id, Request);
await ToastService.Success("Successfully updated theme");
await ToastService.SuccessAsync("Successfully updated theme");
Navigation.NavigateTo("/admin/system/customisation");
}
}