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"
|
||||
@using Marechai.Database.Models
|
||||
@inherits OwningComponentBase<BrowserTestsService>
|
||||
@inject IStringLocalizer<BrowserTestsService> L
|
||||
@attribute [Authorize(Roles = "UberAdmin")]
|
||||
@@ -150,14 +149,4 @@
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@code
|
||||
{
|
||||
List<BrowserTest> _tests;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_tests = await Service.GetAsync();
|
||||
}
|
||||
}
|
||||
</table>
|
||||
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