Renamed testing projects
This commit is contained in:
31
testing/HopFrame.Testing.Web/Components/Pages/Counter.razor
Normal file
31
testing/HopFrame.Testing.Web/Components/Pages/Counter.razor
Normal file
@@ -0,0 +1,31 @@
|
||||
@page "/counter"
|
||||
@using System.Text.Json
|
||||
@using HopFrame.Web
|
||||
@using HopFrame.Web.Admin.Providers
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@inject IAdminPagesProvider Provider
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
private string[] permissions = ["web.counter"];
|
||||
|
||||
private void IncrementCount() {
|
||||
currentCount++;
|
||||
|
||||
string json = JsonSerializer.Serialize(Provider.LoadRegisteredAdminPages(), new JsonSerializerOptions {
|
||||
WriteIndented = true
|
||||
});
|
||||
|
||||
Console.WriteLine(json);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user