add refresh button to module and theme installation page
This commit is contained in:
parent
6fafeedeb9
commit
3f28b39da0
|
@ -28,6 +28,7 @@
|
||||||
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
||||||
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
||||||
|
<button type="button" class="btn btn-primary ms-2" @onclick="Refresh"><span class="@Icons.Reload" aria-hidden="true"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,11 +57,11 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Pager Format="Grid" Items="@_packages" DisplayPages="1" PageSize="9" Toolbar="Both" Class="container-fluid px-0" RowClass="row g-0" ColumnClass="col-lg-4 col-md-6">
|
<Pager Format="Grid" Items="@_packages" DisplayPages="1" PageSize="9" Toolbar="Both" Class="container-fluid px-0" RowClass="row g-0" ColumnClass="col-lg-4 col-md-6" CurrentPage="@_page.ToString()" OnPageChange="OnPageChange">
|
||||||
<Row>
|
<Row>
|
||||||
<div class="m-2 p-2 d-flex justify-content-center">
|
<div class="m-2 p-2 d-flex justify-content-center">
|
||||||
<div class="container-fluid px-0">
|
<div class="container-fluid px-0">
|
||||||
<div class="row g-0">
|
<div class="row g-0 mb-2">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@if (context.LogoFileId != null)
|
@if (context.LogoFileId != null)
|
||||||
{
|
{
|
||||||
|
@ -162,6 +163,7 @@
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool _initialized = false;
|
private bool _initialized = false;
|
||||||
|
private int _page = 1;
|
||||||
private List<Package> _packages;
|
private List<Package> _packages;
|
||||||
private string _price = "free";
|
private string _price = "free";
|
||||||
private string _sort = "popularity";
|
private string _sort = "popularity";
|
||||||
|
@ -223,28 +225,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Search()
|
private async Task Search()
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
await LoadModuleDefinitions();
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error On Search");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Reset()
|
private async Task Reset()
|
||||||
{
|
{
|
||||||
try
|
_page = 1;
|
||||||
{
|
|
||||||
_search = "";
|
_search = "";
|
||||||
await LoadModuleDefinitions();
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
|
private async Task Refresh()
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error On Reset");
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnPageChange(int page)
|
||||||
|
{
|
||||||
|
_page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SortChanged(ChangeEventArgs e)
|
private async void SortChanged(ChangeEventArgs e)
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
||||||
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
||||||
|
<button type="button" class="btn btn-primary ms-2" @onclick="Refresh"><span class="@Icons.Reload" aria-hidden="true"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,7 +61,7 @@
|
||||||
<Row>
|
<Row>
|
||||||
<div class="m-2 p-2 d-flex justify-content-center">
|
<div class="m-2 p-2 d-flex justify-content-center">
|
||||||
<div class="container-fluid px-0">
|
<div class="container-fluid px-0">
|
||||||
<div class="row g-0">
|
<div class="row g-0 mb-2">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@if (context.LogoFileId != null)
|
@if (context.LogoFileId != null)
|
||||||
{
|
{
|
||||||
|
@ -164,6 +165,7 @@
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool _initialized = false;
|
private bool _initialized = false;
|
||||||
|
private int _page = 1;
|
||||||
private List<Package> _packages;
|
private List<Package> _packages;
|
||||||
private string _price = "free";
|
private string _price = "free";
|
||||||
private string _sort = "popularity";
|
private string _sort = "popularity";
|
||||||
|
@ -225,28 +227,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Search()
|
private async Task Search()
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
await LoadThemes();
|
await LoadThemes();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error On Search");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Reset()
|
private async Task Reset()
|
||||||
{
|
{
|
||||||
try
|
_page = 1;
|
||||||
{
|
|
||||||
_search = "";
|
_search = "";
|
||||||
await LoadThemes();
|
await LoadThemes();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
|
private async Task Refresh()
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error On Reset");
|
await LoadThemes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnPageChange(int page)
|
||||||
|
{
|
||||||
|
_page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SortChanged(ChangeEventArgs e)
|
private async void SortChanged(ChangeEventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user