Add user manager page (#22)
Reviewed-on: #22
This commit was merged in pull request #22.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<div class="confirm-section">
|
||||
<span class="descrption">@ResourcesKey.ConfirmDeleteDescription</span>
|
||||
<div class="buttons">
|
||||
<div class="cancel" @onclick=HandleCancelClicked>@ResourcesKey.Cancel</div>
|
||||
<div class="confirm" @onclick=HandleConfirmClicked>@ResourcesKey.Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Shared.Components.Popup.Components;
|
||||
|
||||
public partial class ConfirmDelete
|
||||
{
|
||||
[Parameter] public EventCallback OnCancel { get; set; }
|
||||
[Parameter] public EventCallback OnConfirm { get; set; }
|
||||
|
||||
private async Task HandleConfirmClicked()
|
||||
{
|
||||
await OnConfirm.InvokeAsync();
|
||||
}
|
||||
private async Task HandleCancelClicked()
|
||||
{
|
||||
await OnCancel.InvokeAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
.confirm-section {
|
||||
padding: 10px 20px;
|
||||
display: grid;
|
||||
grid-gap: 20px;
|
||||
}
|
||||
|
||||
.descrption {
|
||||
|
||||
}
|
||||
|
||||
.buttons {
|
||||
justify-content: end;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
.cancel, .confirm {
|
||||
height: 28px;
|
||||
align-content: center;
|
||||
padding: 0 10px;
|
||||
background: var(--violet);
|
||||
border-radius: var(--small-radius);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cancel:hover, .confirm:hover {
|
||||
background: var(--violet-selected);
|
||||
}
|
||||
@@ -2,8 +2,7 @@
|
||||
@using GameIdeas.Shared.Constants
|
||||
|
||||
<div class="search-container">
|
||||
<input id="searchInput"
|
||||
type="text"
|
||||
<input type="text"
|
||||
class="search-field"
|
||||
placeholder="@Placeholder"
|
||||
disabled="@IsDisable"
|
||||
|
||||
@@ -42,4 +42,13 @@
|
||||
|
||||
.navigation .selected {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/***** Single Theme *****/
|
||||
.single {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.single .selected {
|
||||
display: none;
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public static class SelectHelper
|
||||
SelectTheme.Filter => "filter",
|
||||
SelectTheme.AdvancedFilter => "advanced-filter",
|
||||
SelectTheme.Creation => "creation",
|
||||
SelectTheme.Single => "single",
|
||||
_ => string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ public enum SelectTheme
|
||||
Sort,
|
||||
Filter,
|
||||
AdvancedFilter,
|
||||
Creation
|
||||
Creation,
|
||||
Single
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
z-index: var(--index-dropdown);
|
||||
border-radius: var(--small-radius);
|
||||
width: 100%;
|
||||
box-shadow: var(--drop-shadow);
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -23,7 +24,6 @@
|
||||
flex-direction: column;
|
||||
animation-name: fade-in;
|
||||
animation-duration: 0.2s;
|
||||
box-shadow: var(--drop-shadow);
|
||||
}
|
||||
|
||||
.line {
|
||||
@@ -87,7 +87,7 @@
|
||||
border-bottom: 2px solid var(--input-selected);
|
||||
}
|
||||
|
||||
/***** Sort Theme *****/
|
||||
/***** Creation Theme *****/
|
||||
.creation .content {
|
||||
border-radius: var(--small-radius);
|
||||
box-sizing: border-box;
|
||||
@@ -100,3 +100,7 @@
|
||||
border-bottom: 2px solid var(--input-selected);
|
||||
}
|
||||
|
||||
/***** Single Theme *****/
|
||||
.single {
|
||||
border: none;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@typeparam TItem
|
||||
|
||||
<Select @ref=Select TItem="TItem" THeader="string" Theme="Theme" Type="SelectType.Multiple"
|
||||
<Select @ref=Select TItem="TItem" THeader="string" Theme="Theme" Type="SelectType"
|
||||
Params="SelectParams" Values=Values ValuesChanged="HandleValuesChanged" QuickAdd=QuickAdd>
|
||||
|
||||
<div class="@SelectHelper.GetClassFromTheme(Theme)">
|
||||
|
||||
@@ -15,6 +15,7 @@ public partial class SelectSearch<TItem>
|
||||
[Parameter] public string Placeholder { get; set; } = string.Empty;
|
||||
[Parameter] public bool QuickAdd { get; set; } = false;
|
||||
[Parameter] public Func<string, TItem>? AddItem { get; set; }
|
||||
[Parameter] public SelectType SelectType { get; set; } = SelectType.Multiple;
|
||||
|
||||
private SelectParams<TItem, string> SelectParams = new();
|
||||
private SearchInput? SearchInput;
|
||||
|
||||
@@ -7,17 +7,27 @@ public static class Endpoints
|
||||
{
|
||||
public static class Game
|
||||
{
|
||||
public static readonly string Create = "api/Game/Create";
|
||||
public const string Create = "api/Game/Create";
|
||||
public static string Fetch(GameFilterDto filter) => $"api/Game?{UrlHelper.BuildUrlParams(filter)}";
|
||||
}
|
||||
|
||||
public static class Category
|
||||
{
|
||||
public static readonly string AllCategories = "api/Category/All";
|
||||
public const string AllCategories = "api/Category/All";
|
||||
}
|
||||
|
||||
public static class Auth
|
||||
{
|
||||
public static readonly string Login = "api/User/Login";
|
||||
public const string Login = "api/User/Login";
|
||||
}
|
||||
|
||||
public static class User
|
||||
{
|
||||
public static string Fetch(UserFilterDto filter) => $"api/User?{UrlHelper.BuildUrlParams(filter)}";
|
||||
public const string Roles = "api/User/Roles";
|
||||
public const string Create = "api/User/Create";
|
||||
public static string Delete(string userId) => $"api/User/Delete/{userId}";
|
||||
public static string Update(string userId) => $"api/User/Update/{userId}";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,16 @@ public static class Icons
|
||||
public readonly static MarkupString Account = new(OpenBraket +
|
||||
"<path d=\"M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z\" />" +
|
||||
CloseBraket);
|
||||
|
||||
public readonly static MarkupString Bin = new(OpenBraket +
|
||||
"<path d=\"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z\" />" +
|
||||
CloseBraket);
|
||||
|
||||
public readonly static MarkupString Pen = new(OpenBraket +
|
||||
"<path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\" />" +
|
||||
CloseBraket);
|
||||
|
||||
public readonly static MarkupString Check = new(OpenBraket +
|
||||
"<path d=\"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z\" />" +
|
||||
CloseBraket);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace GameIdeas.BlazorApp.Shared.Exceptions;
|
||||
|
||||
public class RoleNotFoundException(string message) : Exception(message);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace GameIdeas.BlazorApp.Shared.Exceptions;
|
||||
|
||||
public class UserCreationException(string message) : Exception(message);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace GameIdeas.BlazorApp.Shared.Exceptions;
|
||||
|
||||
public class UserNotFoundException(string message) : Exception(message);
|
||||
Reference in New Issue
Block a user