cleaned up sites

This commit is contained in:
t.ruspekhofer 2022-03-02 17:00:41 +01:00
parent 6d4c39c49d
commit 435914d79e
3 changed files with 7 additions and 14 deletions

View file

@ -5,25 +5,19 @@
@inject UserService UserService
<h3>UserOverview</h3>
<h3>Role Edit</h3>
<AuthorizeView Policy="@Constants.Roles.Admin">
<Authorized>
<table>
<tr>
<th>Name</th>
<th>GW2 Account</th>
<th>Banned Until</th>
</tr>
<h5>Roles</h5>
@foreach(LiebRole role in _roles)
{
<tr>
<td>@if(!role.IsSystemRole)
{
<button type=button @onclick="() => DeleteRoleClicked(role)">Create Role</button>
<button type=button @onclick="() => DeleteRoleClicked(role)">Delete Role</button>
}</td>
<td>@role.RoleName</td>
</tr>

View file

@ -28,11 +28,10 @@
</Authorized>
</AuthorizeView>
<label>Equipped Builds</label>
<table>
<tr>
<th></th>
<th>Role Name</th>
<th>Role</th>
<th>IsSystemRole</th>
</tr>
@foreach (LiebRole role in _roles)

View file

@ -38,22 +38,22 @@
HashSet<LiebUser> foundUsers = new HashSet<LiebUser>();
if(_bannedOnly)
{
foreach(LiebUser user in _users.Where(u => u.Name.Contains(_searchString) && u.BannedUntil > DateTime.Now))
foreach(LiebUser user in _users.Where(u => u.Name.Contains(_searchString, StringComparison.OrdinalIgnoreCase) && u.BannedUntil > DateTime.Now))
{
foundUsers.Add(user);
}
foreach(LiebUser user in _users.Where(u => u.GuildWars2Accounts.Where(a => a.AccountName.Contains(_searchString)).Any() && u.BannedUntil > DateTime.Now))
foreach(LiebUser user in _users.Where(u => u.GuildWars2Accounts.Where(a => a.AccountName.Contains(_searchString, StringComparison.OrdinalIgnoreCase)).Any() && u.BannedUntil > DateTime.Now))
{
foundUsers.Add(user);
}
}
else
{
foreach(LiebUser user in _users.Where(u => u.Name.Contains(_searchString)))
foreach(LiebUser user in _users.Where(u => u.Name.Contains(_searchString, StringComparison.OrdinalIgnoreCase)))
{
foundUsers.Add(user);
}
foreach(LiebUser user in _users.Where(u => u.GuildWars2Accounts.Where(a => a.AccountName.Contains(_searchString)).Any()))
foreach(LiebUser user in _users.Where(u => u.GuildWars2Accounts.Where(a => a.AccountName.Contains(_searchString, StringComparison.OrdinalIgnoreCase)).Any()))
{
foundUsers.Add(user);
}