Switched to database scheme seperation from MoonCores SingleDb. Updated mooncore versions. Updating to correct Async naming
This commit is contained in:
@@ -16,7 +16,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>
|
||||
@@ -66,17 +66,17 @@
|
||||
|
||||
var response = await ApiClient.PostJson<CreateApiKeyResponse>("api/admin/apikeys", Request);
|
||||
|
||||
await DownloadService.Download(
|
||||
await DownloadService.DownloadAsync(
|
||||
$"moonlight-key-{response.Id}.txt",
|
||||
response.Secret
|
||||
);
|
||||
|
||||
await AlertService.Success(
|
||||
await AlertService.SuccessAsync(
|
||||
"API Key successfully created",
|
||||
"The API Key has been downloaded. Dont lose it, you cant view it anymore"
|
||||
);
|
||||
|
||||
await ToastService.Success("Successfully created api key");
|
||||
await ToastService.SuccessAsync("Successfully created api key");
|
||||
Navigation.NavigateTo("/admin/api");
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<DataGrid @ref="Grid"
|
||||
TGridItem="ApiKeyResponse"
|
||||
ItemsProvider="ItemsProvider"
|
||||
ItemsProvider="ItemsProviderAsync"
|
||||
EnableFiltering="true"
|
||||
EnablePagination="true">
|
||||
<PropertyColumn Field="x => x.Id" Sortable="true" />
|
||||
@@ -92,7 +92,7 @@
|
||||
{
|
||||
private DataGrid<ApiKeyResponse> Grid;
|
||||
|
||||
private async Task<DataGridItemResult<ApiKeyResponse>> ItemsProvider(DataGridItemRequest request)
|
||||
private async Task<DataGridItemResult<ApiKeyResponse>> ItemsProviderAsync(DataGridItemRequest request)
|
||||
{
|
||||
var query = $"?startIndex={request.StartIndex}&count={request.Count}";
|
||||
|
||||
@@ -116,13 +116,13 @@
|
||||
|
||||
private async Task DeleteAsync(ApiKeyResponse apiKeyResponse)
|
||||
{
|
||||
await AlertService.ConfirmDanger(
|
||||
"API Key deletion",
|
||||
await AlertService.ConfirmDangerAsync(
|
||||
"API Key Deletion",
|
||||
$"Do you really want to delete the api key '{apiKeyResponse.Description}'",
|
||||
async () =>
|
||||
{
|
||||
await ApiClient.Delete($"api/admin/apikeys/{apiKeyResponse.Id}");
|
||||
await ToastService.Success("Successfully deleted api key");
|
||||
await ToastService.SuccessAsync("Successfully deleted api key");
|
||||
|
||||
await Grid.RefreshAsync();
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
@inject NavigationManager Navigation
|
||||
@inject ToastService ToastService
|
||||
|
||||
<LazyLoader Load="Load">
|
||||
<LazyLoader Load="LoadAsync">
|
||||
<PageHeader Title="Update API Key">
|
||||
<a href="/admin/api" 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>
|
||||
@@ -40,7 +40,7 @@
|
||||
private HandleForm Form;
|
||||
private UpdateApiKeyRequest Request;
|
||||
|
||||
private async Task Load(LazyLoader _)
|
||||
private async Task LoadAsync(LazyLoader _)
|
||||
{
|
||||
var detail = await ApiClient.GetJson<ApiKeyResponse>($"api/admin/apikeys/{Id}");
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
{
|
||||
await ApiClient.Patch($"api/admin/apikeys/{Id}", Request);
|
||||
|
||||
await ToastService.Success("Successfully updated api key");
|
||||
await ToastService.SuccessAsync("Successfully updated api key");
|
||||
Navigation.NavigateTo("/admin/api");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user