mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Move code for browser tests to code-behind.
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@page "/admin/browser_tests"
|
@page "/admin/browser_tests"
|
||||||
@using Marechai.Database.Models
|
|
||||||
@inherits OwningComponentBase<BrowserTestsService>
|
@inherits OwningComponentBase<BrowserTestsService>
|
||||||
@inject IStringLocalizer<BrowserTestsService> L
|
@inject IStringLocalizer<BrowserTestsService> L
|
||||||
@attribute [Authorize(Roles = "UberAdmin")]
|
@attribute [Authorize(Roles = "UberAdmin")]
|
||||||
@@ -151,13 +150,3 @@
|
|||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@code
|
|
||||||
{
|
|
||||||
List<BrowserTest> _tests;
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
_tests = await Service.GetAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
13
Marechai/Pages/Admin/BrowserTests.razor.cs
Normal file
13
Marechai/Pages/Admin/BrowserTests.razor.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Marechai.Database.Models;
|
||||||
|
|
||||||
|
namespace Marechai.Pages.Admin
|
||||||
|
{
|
||||||
|
public partial class BrowserTests
|
||||||
|
{
|
||||||
|
List<BrowserTest> _tests;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync() => _tests = await Service.GetAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user