Add user manager page (#22)
Reviewed-on: #22
This commit was merged in pull request #22.
This commit is contained in:
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Pages.Games;
|
||||
|
||||
public partial class Game
|
||||
public partial class Games
|
||||
{
|
||||
[Inject] private IGameGateway GameGateway { get; set; } = default!;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class GameGateway(IHttpClientService httpClientService) : IGameGateway
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new CategoryNotFoundException(ResourcesKey.ErrorFetchGames);
|
||||
throw new GameNotFoundException(ResourcesKey.ErrorFetchGames);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using GameIdeas.BlazorApp.Pages.Games
|
||||
@using GameIdeas.BlazorApp.Pages.User
|
||||
@using GameIdeas.BlazorApp.Pages.UserMenu
|
||||
@using GameIdeas.BlazorApp.Shared.Components.Select
|
||||
@using GameIdeas.BlazorApp.Shared.Components.Select.Models
|
||||
@using GameIdeas.BlazorApp.Shared.Models
|
||||
@@ -10,32 +10,35 @@
|
||||
@inherits ComponentBase
|
||||
|
||||
<div class="header-tab">
|
||||
<div class="icon-container" @onclick="HandleIconClicked">
|
||||
<a href="/Games" class="icon-container">
|
||||
<img src="icon.png" alt="Game Ideas">
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@ChildContent
|
||||
|
||||
<div class="account-add-container">
|
||||
<AuthorizeView Roles="@GlobalConstants.ADMIN_MEMBER">
|
||||
<Authorized>
|
||||
<div class="add-buttons">
|
||||
<div class="first-button button">
|
||||
<svg class="button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
|
||||
</svg>
|
||||
</div>
|
||||
<Select @ref="SelectListAdd" TItem="KeyValuePair<AddType, string>" THeader="object"
|
||||
ValuesChanged=HandleAddTypeClicked Params=SelectParams Theme="SelectTheme.Navigation">
|
||||
<div class="second-button button">
|
||||
@if (DisplayAdd)
|
||||
{
|
||||
<AuthorizeView Roles="@GlobalConstants.ADMIN_MEMBER">
|
||||
<Authorized>
|
||||
<div class="add-buttons">
|
||||
<div class="first-button button">
|
||||
<svg class="button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M1 3H23L12 22" />
|
||||
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</Select>
|
||||
</div>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
<Select @ref="SelectListAdd" TItem="KeyValuePair<AddType, string>" THeader="object"
|
||||
ValuesChanged=HandleAddTypeClicked Params=SelectParams Theme="SelectTheme.Navigation">
|
||||
<div class="second-button button">
|
||||
<svg class="button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M1 3H23L12 22" />
|
||||
</svg>
|
||||
</div>
|
||||
</Select>
|
||||
</div>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
}
|
||||
|
||||
<UserMenu />
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,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 RenderFragment? ChildContent { get; set; }
|
||||
|
||||
@@ -31,11 +32,6 @@ public partial class GameHeader : ComponentBase
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
||||
private void HandleIconClicked()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private async Task HandleAddTypeClicked(IEnumerable<KeyValuePair<AddType, string>> values)
|
||||
{
|
||||
SelectListAdd?.Close();
|
||||
|
||||
Reference in New Issue
Block a user