parent
f223bd6a79
commit
bb4e8620f1
@ -1,4 +0,0 @@
|
|||||||
@page "/admin-manager"
|
|
||||||
@attribute [Authorize(Roles = "superadmin")]
|
|
||||||
|
|
||||||
<h3>Admin Page</h3>
|
|
@ -1,30 +0,0 @@
|
|||||||
@page "/banned-users"
|
|
||||||
@using HeartTrack.Models
|
|
||||||
|
|
||||||
<PageTitle>Banned Users</PageTitle>
|
|
||||||
|
|
||||||
<h1>Banned Users</h1>
|
|
||||||
|
|
||||||
This is banned users list of this website.
|
|
||||||
<div>
|
|
||||||
<NavLink class="btn btn-primary" href="banned-users/add" Match="NavLinkMatch.All">
|
|
||||||
<i class="fa fa-plus"></i> Ajouter
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
|
||||||
|
|
||||||
<DataGrid TItem="User"
|
|
||||||
Data="@users"
|
|
||||||
ReadData="@OnReadData"
|
|
||||||
TotalItems="@totalUser"
|
|
||||||
PageSize="10"
|
|
||||||
ShowPager
|
|
||||||
Responsive>
|
|
||||||
<DataGridColumn TItem="User" Field="@nameof(User.Id)" Caption="Id" />
|
|
||||||
<DataGridColumn TItem="User" Field="@nameof(User.Username)" Caption="@Localizer["Username"]" />
|
|
||||||
<DataGridColumn TItem="User" Field="@nameof(User.Nom)" Caption="@Localizer["FirstN"]" />
|
|
||||||
<DataGridColumn TItem="User" Field="@nameof(User.Prenom)" Caption="@Localizer["LastN"]" />
|
|
||||||
<DataGridColumn Caption="" />
|
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
@page "/reports"
|
|
||||||
@using HeartTrack.Models
|
|
||||||
|
|
||||||
<PageTitle>Reports</PageTitle>
|
|
||||||
|
|
||||||
<h1>Report list</h1>
|
|
||||||
|
|
||||||
This is the report list of users.
|
|
||||||
|
|
||||||
<DataGrid TItem="Report"
|
|
||||||
Data="@reports"
|
|
||||||
ReadData="@OnReadData"
|
|
||||||
TotalItems="@totalReport"
|
|
||||||
PageSize="10"
|
|
||||||
ShowPager
|
|
||||||
Responsive>
|
|
||||||
<DataGridColumn TItem="Report" Field="@nameof(Report.Id)" Caption="Id" />
|
|
||||||
<DataGridColumn TItem="Report" Field="@nameof(Report.Username)" Caption="@Localizer["Username"]" />
|
|
||||||
<DataGridColumn TItem="Report" Field="@nameof(Report.Raison)" Caption="@Localizer["Raison"]" />
|
|
||||||
<DataGridColumn TItem="Report" Field="@nameof(Report.Description)" Caption="@Localizer["Description"]" />
|
|
||||||
<DataGridColumn Caption="" />
|
|
||||||
</DataGrid>
|
|
@ -1,20 +0,0 @@
|
|||||||
@page "/test"
|
|
||||||
<div class="text-center bg-blue-100">
|
|
||||||
<input class="border-4 w-1/3 rounded m-6 p-6 h-8
|
|
||||||
border-blue-300" @bind-value="SearchText"
|
|
||||||
@bind-value:event="oninput" placeholder="Search by title" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (!Users.Any())
|
|
||||||
{
|
|
||||||
<p>Loading some images...</p>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div class="p-2 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
|
||||||
@foreach (var user in FilteredUsers)
|
|
||||||
{
|
|
||||||
<p>feur</p>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
}
|
|
@ -1,42 +1,12 @@
|
|||||||
@using System.Globalization
|
@using System.Globalization
|
||||||
@inject NavigationManager NavigationManager
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<select @bind="Culture">
|
<select @bind="Culture">
|
||||||
@foreach (var culture in supportedCultures)
|
@foreach (var culture in @supportedCultures)
|
||||||
{
|
{
|
||||||
<option value="@culture">@culture.DisplayName</option>
|
<option value="@culture">@culture.DisplayName</option>
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@code
|
|
||||||
{
|
|
||||||
private CultureInfo[] supportedCultures = new[]
|
|
||||||
{
|
|
||||||
new CultureInfo("en-US"),
|
|
||||||
new CultureInfo("fr-FR")
|
|
||||||
};
|
|
||||||
|
|
||||||
private CultureInfo Culture
|
|
||||||
{
|
|
||||||
get => CultureInfo.CurrentCulture;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (CultureInfo.CurrentUICulture == value)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var culture = value.Name.ToLower(CultureInfo.InvariantCulture);
|
|
||||||
|
|
||||||
var uri = new Uri(this.NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
|
|
||||||
var query = $"?culture={Uri.EscapeDataString(culture)}&" + $"redirectUri={Uri.EscapeDataString(uri)}";
|
|
||||||
|
|
||||||
// Redirect the user to the culture controller to set the cookie
|
|
||||||
this.NavigationManager.NavigateTo("/Culture/SetCulture" + query, forceLoad: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
<div class="alert alert-secondary mt-4">
|
|
||||||
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
|
|
||||||
<strong>@Title</strong>
|
|
||||||
|
|
||||||
<span class="text-nowrap">
|
|
||||||
Please take our
|
|
||||||
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2149017">brief survey</a>
|
|
||||||
</span>
|
|
||||||
and tell us what you think.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
// Demonstrates how a parent component can supply parameters
|
|
||||||
[Parameter]
|
|
||||||
public string? Title { get; set; }
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in new issue