Add user manager page #22
@@ -9,7 +9,7 @@ namespace GameIdeas.BlazorApp.Pages.Games.Header;
|
||||
public partial class GameHeader : ComponentBase
|
||||
{
|
||||
[Parameter] public bool DisplayAdd { get; set; } = true;
|
||||
[Parameter] public EventCallback<AddType>? AddTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<AddType> AddTypeChanged { get; set; }
|
||||
[Parameter] public RenderFragment? ChildContent { get; set; }
|
||||
|
||||
|
||||
@@ -40,6 +40,6 @@ public partial class GameHeader : ComponentBase
|
||||
private async Task HandleAddTypeClicked(IEnumerable<KeyValuePair<AddType, string>> values)
|
||||
{
|
||||
SelectListAdd?.Close();
|
||||
await AddTypeChanged?.InvokeAsync(values.FirstOrDefault().Key)!;
|
||||
await AddTypeChanged.InvokeAsync(values.FirstOrDefault().Key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
<GameHeader DisplayAdd="false">
|
||||
<div class="header-content">
|
||||
<SearchInput />
|
||||
<SelectSearch TItem="RoleDto" />
|
||||
<SearchInput Placeholder="@ResourcesKey.EnterUsername" />
|
||||
<SelectSearch TItem="RoleDto" Placeholder="@ResourcesKey.Roles" />
|
||||
</div>
|
||||
</GameHeader>
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
::deep.header-content>* {
|
||||
box-sizing: border-box;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ public class Translations (TranslationService translationService)
|
||||
public string UserUnauthorized => translationService.Translate(nameof(UserUnauthorized));
|
||||
public string UserLoginFailed => translationService.Translate(nameof(UserLoginFailed));
|
||||
public string UserLogoutFailed => translationService.Translate(nameof(UserLogoutFailed));
|
||||
public string Roles => translationService.Translate(nameof(Roles));
|
||||
}
|
||||
|
||||
public static class ResourcesKey
|
||||
@@ -116,4 +117,5 @@ public static class ResourcesKey
|
||||
public static string UserUnauthorized => _instance?.UserUnauthorized ?? throw new InvalidOperationException("ResourcesKey.UserUnauthorized is not initialized.");
|
||||
public static string UserLoginFailed => _instance?.UserLoginFailed ?? throw new InvalidOperationException("ResourcesKey.UserLoginFailed is not initialized.");
|
||||
public static string UserLogoutFailed => _instance?.UserLogoutFailed ?? throw new InvalidOperationException("ResourcesKey.UserLogoutFailed is not initialized.");
|
||||
public static string Roles => _instance?.Roles ?? throw new InvalidOperationException("ResourcesKey.Roles is not initialized.");
|
||||
}
|
||||
@@ -49,5 +49,6 @@
|
||||
"InvalidToken": "Le token JWT est invalide",
|
||||
"UserUnauthorized": "Utilisateur non authorisé",
|
||||
"UserLoginFailed": "Authentification de l'utilisateur échoué",
|
||||
"UserLogoutFailed": "Déconnection de l'utilisateur échoué"
|
||||
"UserLogoutFailed": "Déconnection de l'utilisateur échoué",
|
||||
"Roles": "Rôles"
|
||||
}
|
||||
Reference in New Issue
Block a user