mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Adds authorization roles administrator dashboard
This commit is contained in:
1 parent
290af03c83
commit
1df31515fb
191 files changed
+6189
-806
No files matched your search
@@ -125,19 +125,31 @@ public class ApiHttpClient : IApiHttpClient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a DELETE request to the specified <paramref name="endpoint"/> as an asynchronous operation and returns the result.
|
||||
/// Sends a DELETE request to the specified <paramref name="endpoint"/> as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <typeparam name="TResponse">The expected type of the response content.</typeparam>
|
||||
/// <param name="endpoint">The API endpoint where the request is being sent.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>The deserialized response containing the result of the DELETE request.</returns>
|
||||
public async Task<TResponse> DeleteAsync<TResponse>(string endpoint, CancellationToken cancellationToken = default)
|
||||
public async Task DeleteAsync(string endpoint, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using HttpRequestMessage request = new(HttpMethod.Delete, endpoint);
|
||||
AuthenticationHeaderValue? authenticationHeader = GetAuthenticationHeader();
|
||||
if (authenticationHeader is not null)
|
||||
request.Headers.Authorization = authenticationHeader;
|
||||
return await SendRequestAsync<TResponse>(request, cancellationToken).ConfigureAwait(false);
|
||||
//return await SendRequestAsync<TResponse>(request, cancellationToken).ConfigureAwait(false);
|
||||
// send the HTTP request and read the response
|
||||
HttpResponseMessage response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
ProblemDetailsModel? problemDetails = null;
|
||||
string content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
// attempt to deserialize the response content to ProblemDetailsModel if the request fails
|
||||
try
|
||||
{
|
||||
problemDetails = JsonSerializer.Deserialize<ProblemDetailsModel>(content, _jsonOptions);
|
||||
}
|
||||
catch { /* if we can't deserialize to ProblemDetails, we'll just use the status code */ }
|
||||
throw new ApiException(problemDetails, response.StatusCode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -39,13 +39,11 @@ public interface IApiHttpClient
|
||||
Task<BlobDataModel> GetBlobAsync(string endpoint, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a DELETE request to the specified <paramref name="endpoint"/> as an asynchronous operation and returns the result.
|
||||
/// Sends a DELETE request to the specified <paramref name="endpoint"/> as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <typeparam name="TResponse">The expected type of the response content.</typeparam>
|
||||
/// <param name="endpoint">The API endpoint where the request is being sent.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>The deserialized response containing the result of the DELETE request.</returns>
|
||||
Task<TResponse> DeleteAsync<TResponse>(string endpoint, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(string endpoint, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a PUT request to the specified <paramref name="endpoint"/> as an asynchronous operation and returns the result.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Filters.TypeFilters;
|
||||
using Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
#endregion
|
||||
@@ -18,7 +17,7 @@ public class RequireRoleAttribute : ApiAuthorizationAttribute
|
||||
/// Initializes a new instance of the <see cref="RequireRoleAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="roles">One or more roles that are allowed to access the endpoint.</param>
|
||||
public RequireRoleAttribute(params AuthorizationRole[] roles) : base()
|
||||
public RequireRoleAttribute(params string[] roles) : base()
|
||||
{
|
||||
Arguments = [new AuthorizationRequirementModel { Roles = roles }];
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Linq;
|
||||
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
namespace Lumina.Presentation.Web.Common.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Implements authorization logic for API endpoints by validating user roles, permissions, and policies.
|
||||
@@ -49,7 +49,7 @@ public class AuthorizationService : IAuthorizationService
|
||||
/// <param name="role">The role to check.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns><see langword="true"/> if the currently logged in user is in the specified role, <see langword="false"/> otherwise.</returns>
|
||||
public async Task<bool> IsInRoleAsync(AuthorizationRole role, CancellationToken cancellationToken)
|
||||
public async Task<bool> IsInRoleAsync(string role, CancellationToken cancellationToken)
|
||||
{
|
||||
GetAuthorizationResponse authorization = await GetUserAuthorizationAsync(cancellationToken).ConfigureAwait(false);
|
||||
return authorization.Roles.Contains(role);
|
||||
@@ -26,7 +26,7 @@ public interface IAuthorizationService
|
||||
/// <param name="role">The role to check.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns><see langword="true"/> if the currently logged in user is in the specified role, <see langword="false"/> otherwise.</returns>
|
||||
Task<bool> IsInRoleAsync(AuthorizationRole role, CancellationToken cancellationToken);
|
||||
Task<bool> IsInRoleAsync(string role, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Evaluates whether the currently logged in user meets the conditions defined in the specified authorization policy.
|
||||
|
||||
+1
-3
@@ -4,7 +4,6 @@ using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Exceptions;
|
||||
using Lumina.Presentation.Web.Common.Filters.AuthorizationFilters;
|
||||
using Lumina.Presentation.Web.Common.Filters.ExceptionFilters;
|
||||
using Lumina.Presentation.Web.Common.MiddlewareFilters;
|
||||
using Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Security;
|
||||
@@ -49,7 +48,7 @@ public static class PresentationWebLayerServices
|
||||
{
|
||||
services.AddControllersWithViews(mvcOptions =>
|
||||
{
|
||||
mvcOptions.Filters.Add<ApiExceptionFilter>();
|
||||
//mvcOptions.Filters.Add<ApiExceptionFilter>();
|
||||
mvcOptions.Filters.Add(new MiddlewareFilterAttribute(typeof(LocalizationPipeline))); // add localization middleware filter
|
||||
})
|
||||
.AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
|
||||
@@ -216,7 +215,6 @@ public static class PresentationWebLayerServices
|
||||
// enable access to the current HTTP context in non-controller classes
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
services.AddScoped<ApiExceptionFilter>();
|
||||
services.AddScoped<IAuthorizationHandler, InitializationHandler>();
|
||||
services.AddScoped<Authorization.IAuthorizationService, AuthorizationService>();
|
||||
services.AddSingleton<ICryptographyService, CryptographyService>();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
//namespace Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration for authorization roles.
|
||||
/// </summary>
|
||||
public enum AuthorizationRole
|
||||
{
|
||||
None = 0,
|
||||
Admin = 1
|
||||
}
|
||||
///// <summary>
|
||||
///// Enumeration for authorization roles.
|
||||
///// </summary>
|
||||
//public enum AuthorizationRole
|
||||
//{
|
||||
// None = 0,
|
||||
// Admin = 1
|
||||
//}
|
||||
+16
-2
@@ -1,6 +1,9 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Exceptions;
|
||||
using Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using System.Threading.Tasks;
|
||||
@@ -33,7 +36,18 @@ public class ApiAuthorizationFilter : IAsyncAuthorizationFilter
|
||||
/// <param name="context">The authorization filter context.</param>
|
||||
public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
|
||||
{
|
||||
if (!await _authorizationService.EvaluateAuthorizationAsync(_requirement))
|
||||
context.Result = new ForbidResult();
|
||||
try
|
||||
{
|
||||
if (!await _authorizationService.EvaluateAuthorizationAsync(_requirement))
|
||||
context.Result = new ForbidResult();
|
||||
}
|
||||
catch (ApiException ex)
|
||||
{
|
||||
if (ex.HttpStatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
await context.HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
context.HttpContext.Response.Cookies.Delete("Token");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Exceptions;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Filters.ExceptionFilters;
|
||||
|
||||
/// <summary>
|
||||
/// Filters API exceptions and provides centralized handling for API-related errors.
|
||||
/// </summary>
|
||||
public class ApiExceptionFilter : IExceptionFilter
|
||||
{
|
||||
private readonly IStringLocalizer<ApiExceptionFilter> _stringLocalizer;
|
||||
private readonly ILogger<ApiExceptionFilter> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiExceptionFilter"/> class with the specified localizer and logger.
|
||||
/// </summary>
|
||||
/// <param name="stringLocalizer">Injected service used for providing localized strings.</param>
|
||||
/// <param name="logger">Injected service used for logging.</param>
|
||||
public ApiExceptionFilter(IStringLocalizer<ApiExceptionFilter> stringLocalizer, ILogger<ApiExceptionFilter> logger)
|
||||
{
|
||||
_stringLocalizer = stringLocalizer;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called after an action has thrown an Exception.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="ExceptionContext"/>.</param>
|
||||
public void OnException(ExceptionContext context)
|
||||
{
|
||||
// check if the exception is an ApiException
|
||||
if (context.Exception is ApiException apiException)
|
||||
{
|
||||
// log all available details for debugging/monitoring
|
||||
_logger.LogError(
|
||||
apiException,
|
||||
"API Exception occurred. Status: {StatusCode}, Title: {Title}, Detail: {Detail}, Extensions: {Extensions}",
|
||||
apiException.HttpStatusCode,
|
||||
apiException.ProblemDetails?.Title,
|
||||
apiException.ProblemDetails?.Detail,
|
||||
apiException.ProblemDetails?.Extensions);
|
||||
// handle unauthorized errors by prompting the user to re-login
|
||||
if (apiException.HttpStatusCode == HttpStatusCode.Unauthorized) // HTTP 401 Unauthorized actually means lack of valid authentication credentials (not logged in)
|
||||
{
|
||||
SignOutSynchronously(context.HttpContext);
|
||||
string currentUrl = context.HttpContext.Request.GetDisplayUrl();
|
||||
_logger.LogInformation("Redirecting unauthorized user to {Url}", currentUrl);
|
||||
context.HttpContext.Response.Redirect(currentUrl); // force an entire refresh of the current location, so that header and footer are re-rendered too
|
||||
}
|
||||
else
|
||||
{
|
||||
StringBuilder errorMessage = new();
|
||||
if (apiException.ProblemDetails is not null)
|
||||
{
|
||||
// only show the meaningful error message to the user
|
||||
if (!string.IsNullOrEmpty(apiException.ProblemDetails.Detail))
|
||||
errorMessage.AppendLine($"<b>{_stringLocalizer[apiException.ProblemDetails.Detail]}</b><br>");
|
||||
else if (!string.IsNullOrEmpty(apiException.ProblemDetails.Title))
|
||||
errorMessage.AppendLine($"<b>{_stringLocalizer[apiException.ProblemDetails.Title]}</b><br>");
|
||||
|
||||
if (apiException.ProblemDetails.Extensions?.TryGetValue("errors", out JsonElement errorsObj) == true)
|
||||
if (errorsObj.ValueKind == JsonValueKind.Object)
|
||||
foreach (JsonProperty error in errorsObj.EnumerateObject())
|
||||
{
|
||||
_logger.LogError("Validation error {Field}: {@ErrorValues}", error.Name, error.Value.EnumerateArray().Select(jsonElement => jsonElement.ToString()));
|
||||
if (error.Value.ValueKind == JsonValueKind.Array)
|
||||
foreach (JsonElement errorValue in error.Value.EnumerateArray())
|
||||
errorMessage.AppendLine($"{_stringLocalizer[errorValue.ToString()]}<br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogError(apiException, "Generic API error occurred");
|
||||
errorMessage.AppendLine($"{apiException.Message}<br>");
|
||||
}
|
||||
// return a JSON result with the error details
|
||||
context.Result = new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
errorMessage = errorMessage.ToString()
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogError(context.Exception, "Unexpected exception occurred: {Message}", context.Exception.Message);
|
||||
// return a JSON result with the error details
|
||||
context.Result = new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
errorMessage = context.Exception.Message.ToString()
|
||||
});
|
||||
}
|
||||
// mark the exception as handled to prevent propagation
|
||||
context.ExceptionHandled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signs out the user synchronously by deleting the authentication cookie and token.
|
||||
/// </summary>
|
||||
/// <param name="httpContext">The HttpContext for the current request.</param>
|
||||
private static void SignOutSynchronously(HttpContext httpContext)
|
||||
{
|
||||
Task task = httpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
task.Wait(); // run the task synchronously
|
||||
httpContext.Response.Cookies.Delete("Token");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Exceptions;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Middlewares;
|
||||
|
||||
/// <summary>
|
||||
/// Middleware to handle exceptions thrown when the remote API returns a problem details.
|
||||
/// </summary>
|
||||
public class ExceptionHandlingMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly ILogger<ExceptionHandlingMiddleware> _logger;
|
||||
private readonly IStringLocalizer<ExceptionHandlingMiddleware> _stringLocalizer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ExceptionHandlingMiddleware"/> class.
|
||||
/// </summary>
|
||||
/// <param name="next">The next middleware in the request pipeline.</param>
|
||||
/// <param name="logger">Injected service used for logging.</param>
|
||||
/// <param name="stringLocalizer">Injected service used for providing localized strings.</param>
|
||||
public ExceptionHandlingMiddleware(RequestDelegate next, ILogger<ExceptionHandlingMiddleware> logger, IStringLocalizer<ExceptionHandlingMiddleware> stringLocalizer)
|
||||
{
|
||||
_next = next;
|
||||
_logger = logger;
|
||||
_stringLocalizer = stringLocalizer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles incoming requests and handles any exceptions thrown.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="HttpContext"/> for the current request.</param>
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _next(context);
|
||||
}
|
||||
catch (ApiException apiException) // threat API exceptions differently - they contain Problem Details properties
|
||||
{
|
||||
await HandleApiExceptionAsync(context, apiException);
|
||||
}
|
||||
catch (Exception ex) // other cases -
|
||||
{
|
||||
_logger.LogError(ex, "Unexpected exception occurred: {Message}", ex.Message);
|
||||
// return a JSON result with the error details
|
||||
await WriteJsonResponseAsync(context, new
|
||||
{
|
||||
success = false,
|
||||
errorMessage = ex.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles exceptions specific to the API, including problem details.
|
||||
/// </summary>
|
||||
private async Task HandleApiExceptionAsync(HttpContext context, ApiException apiException)
|
||||
{
|
||||
// log all available details for debugging/monitoring
|
||||
_logger.LogError(
|
||||
apiException,
|
||||
"API Exception occurred. Status: {StatusCode}, Title: {Title}, Detail: {Detail}, Extensions: {Extensions}",
|
||||
apiException.HttpStatusCode,
|
||||
apiException.ProblemDetails?.Title,
|
||||
apiException.ProblemDetails?.Detail,
|
||||
apiException.ProblemDetails?.Extensions);
|
||||
|
||||
// handle unauthorized errors by prompting the user to re-login
|
||||
if (apiException.HttpStatusCode == HttpStatusCode.Unauthorized) // HTTP 401 Unauthorized actually means lack of valid authentication credentials (not logged in)
|
||||
await HandleUnauthorizedAsync(context);
|
||||
else
|
||||
{
|
||||
string errorMessage = BuildErrorMessage(apiException);
|
||||
await WriteJsonResponseAsync(context, new
|
||||
{
|
||||
success = false,
|
||||
errorMessage
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles unauthorized exceptions.
|
||||
/// </summary>
|
||||
private async Task HandleUnauthorizedAsync(HttpContext context)
|
||||
{
|
||||
// when API JWT tokens expire, the client app is still logged in, so, sign out the user and delete the authentication cookie and token
|
||||
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
context.Response.Cookies.Delete("Token");
|
||||
|
||||
if (IsApiRequest(context))
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||
await WriteJsonResponseAsync(context, new
|
||||
{
|
||||
success = false,
|
||||
errorMessage = "Unauthorized"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
string culture = context.Request.RouteValues["culture"]?.ToString()?.ToLower() ?? "en-us";
|
||||
string returnUrl = $"{context.Request.Path}{context.Request.QueryString}";
|
||||
string loginUrl = $"/{culture}/auth/login?returnUrl={Uri.EscapeDataString(returnUrl)}";
|
||||
_logger.LogInformation("Redirecting unauthorized user to {Url}", loginUrl);
|
||||
context.Response.Redirect(loginUrl); // force an entire refresh of the current location, so that header and footer are re-rendered too
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds a detailed error message from an <see cref="ApiException"/>.
|
||||
/// </summary>
|
||||
private string BuildErrorMessage(ApiException apiException)
|
||||
{
|
||||
StringBuilder errorMessage = new();
|
||||
|
||||
if (apiException.ProblemDetails is not null)
|
||||
{
|
||||
// only show the meaningful error message to the user
|
||||
if (!string.IsNullOrEmpty(apiException.ProblemDetails.Detail))
|
||||
errorMessage.AppendLine($"<b>{_stringLocalizer[apiException.ProblemDetails.Detail]}</b><br>");
|
||||
else if (!string.IsNullOrEmpty(apiException.ProblemDetails.Title))
|
||||
errorMessage.AppendLine($"<b>{_stringLocalizer[apiException.ProblemDetails.Title]}</b><br>");
|
||||
|
||||
if (apiException.ProblemDetails.Extensions?.TryGetValue("errors", out JsonElement errorsObj) == true)
|
||||
if (errorsObj.ValueKind == JsonValueKind.Object)
|
||||
foreach (JsonProperty error in errorsObj.EnumerateObject())
|
||||
{
|
||||
_logger.LogError("Validation error {Field}: {@ErrorValues}", error.Name, error.Value.EnumerateArray().Select(jsonElement => jsonElement.ToString()));
|
||||
if (error.Value.ValueKind == JsonValueKind.Array)
|
||||
foreach (JsonElement errorValue in error.Value.EnumerateArray())
|
||||
errorMessage.AppendLine($"{_stringLocalizer[errorValue.ToString()]}<br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogError(apiException, "Generic API error occurred");
|
||||
errorMessage.AppendLine($"<b>{apiException.Message}</b><br>");
|
||||
errorMessage.AppendLine($"{_stringLocalizer[apiException.HttpStatusCode.ToString()]}");
|
||||
}
|
||||
return errorMessage.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current request is an API request.
|
||||
/// </summary>
|
||||
private static bool IsApiRequest(HttpContext context)
|
||||
{
|
||||
return context.Request.Headers.Accept.Any(x => x?.Contains("application/json") == true) || context.Request.Headers.XRequestedWith == "XMLHttpRequest";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a JSON response to the client.
|
||||
/// </summary>
|
||||
private static async Task WriteJsonResponseAsync(HttpContext context, object response)
|
||||
{
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAsJsonAsync(response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for adding an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
/// <param name="Permissions">The collection or permissions of the role.</param>
|
||||
public record AddRoleRequestModel(
|
||||
string? RoleName,
|
||||
List<Guid>? Permissions
|
||||
);
|
||||
+1
-1
@@ -13,7 +13,7 @@ public class AuthorizationRequirementModel
|
||||
/// <summary>
|
||||
/// The collection of roles required for accessing the resource.
|
||||
/// </summary>
|
||||
public AuthorizationRole[]? Roles { get; set; }
|
||||
public string[]? Roles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The collection of permissions required for accessing the resource.
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
@@ -16,6 +15,6 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
[DebuggerDisplay("UserId: {UserId}")]
|
||||
public record GetAuthorizationResponse(
|
||||
Guid UserId,
|
||||
AuthorizationRole[] Roles,
|
||||
string[] Roles,
|
||||
AuthorizationPermission[] Permissions
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization permission.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization permission.</param>
|
||||
/// <param name="PermissionName">The authorization permission.</param>
|
||||
public record PermissionModel(
|
||||
Guid Id,
|
||||
AuthorizationPermission PermissionName
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization role.</param>
|
||||
/// <param name="RoleName">The authorization role.</param>
|
||||
public record RoleModel(
|
||||
Guid Id,
|
||||
string RoleName
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization role.</param>
|
||||
/// <param name="Role">The authorization role.</param>
|
||||
public record RolePermissionsModel(
|
||||
RoleModel Role,
|
||||
PermissionModel[] Permissions
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for updating an existing authorization role.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
/// <param name="Permissions">The collection or permissions of the role.</param>
|
||||
public record UpdateRoleRequestModel(
|
||||
Guid RoleId,
|
||||
string? RoleName,
|
||||
List<Guid>? Permissions
|
||||
);
|
||||
@@ -0,0 +1,23 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a cached HTTP response, including its content and status code.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("StatusCode: {StatusCode}")]
|
||||
public class CachedResponseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the content of the cached HTTP response.
|
||||
/// </summary>
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTTP status code of the cached response.
|
||||
/// </summary>
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Models.Common;
|
||||
using Microsoft.Extensions.Caching.Hybrid;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using System;
|
||||
@@ -42,13 +43,19 @@ public class CachedAuthorizationHandler : DelegatingHandler
|
||||
if (!requestPath.EndsWith(AUTHORIZATION_ENDPOINT, StringComparison.OrdinalIgnoreCase))
|
||||
return await base.SendAsync(request, cancellationToken);
|
||||
// otherwise, check the hybrid cache to see if there is a cached authorization
|
||||
string response = await _hybridCache.GetOrCreateAsync(
|
||||
CachedResponseModel response = await _hybridCache.GetOrCreateAsync(
|
||||
AUTHORIZATION_ENDPOINT,
|
||||
async (cancellationToken) =>
|
||||
{
|
||||
// perform the actual API call if cache is empty or expired
|
||||
HttpResponseMessage result = await base.SendAsync(request, cancellationToken);
|
||||
return await result.Content.ReadAsStringAsync(cancellationToken);
|
||||
string content = await result.Content.ReadAsStringAsync(cancellationToken);
|
||||
// cache both status code and content
|
||||
return new CachedResponseModel
|
||||
{
|
||||
Content = content,
|
||||
StatusCode = result.StatusCode
|
||||
};
|
||||
},
|
||||
new HybridCacheEntryOptions()
|
||||
{
|
||||
@@ -56,9 +63,9 @@ public class CachedAuthorizationHandler : DelegatingHandler
|
||||
},
|
||||
cancellationToken: cancellationToken
|
||||
);
|
||||
return new HttpResponseMessage(HttpStatusCode.OK)
|
||||
return new HttpResponseMessage(response.StatusCode)
|
||||
{
|
||||
Content = new StringContent(response)
|
||||
Content = new StringContent(response.Content)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ public interface IUrlService
|
||||
/// </summary>
|
||||
/// <param name="action">The action name within the controller.</param>
|
||||
/// <param name="controller">The controller name.</param>
|
||||
/// <param name="additionalRouteValues">Optional additional route values, like query parameters.</param>
|
||||
/// <returns>An absolute URL to the specified action.</returns>
|
||||
string? GetAbsoluteUrl(string action, string controller);
|
||||
string? GetAbsoluteUrl(string action, string controller, object? additionalRouteValues = null);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc.Infrastructure;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Services;
|
||||
@@ -36,8 +37,9 @@ public class UrlService : IUrlService
|
||||
/// </summary>
|
||||
/// <param name="action">The action name within the controller.</param>
|
||||
/// <param name="controller">The controller name.</param>
|
||||
/// <param name="additionalRouteValues">Optional additional route values, like query parameters.</param>
|
||||
/// <returns>An absolute URL to the specified action.</returns>
|
||||
public string? GetAbsoluteUrl(string action, string controller)
|
||||
public string? GetAbsoluteUrl(string action, string controller, object? additionalRouteValues = null)
|
||||
{
|
||||
HttpContext? httpContext = _httpContextAccessor.HttpContext;
|
||||
if (httpContext is null)
|
||||
@@ -48,16 +50,24 @@ public class UrlService : IUrlService
|
||||
ControllerActionDescriptor? controllerActionDescriptor = _actionDescriptorCollectionProvider
|
||||
.ActionDescriptors.Items
|
||||
.OfType<ControllerActionDescriptor>()
|
||||
.FirstOrDefault(ad =>
|
||||
ad.ControllerName.Equals(controller, StringComparison.OrdinalIgnoreCase) &&
|
||||
ad.ActionName.Equals(action, StringComparison.OrdinalIgnoreCase));
|
||||
.FirstOrDefault(controllerActionDescription =>
|
||||
controllerActionDescription.ControllerName.Equals(controller, StringComparison.OrdinalIgnoreCase) &&
|
||||
controllerActionDescription.ActionName.Equals(action, StringComparison.OrdinalIgnoreCase));
|
||||
if (controllerActionDescriptor is null)
|
||||
return null;
|
||||
// check if the route template contains {culture}
|
||||
string? routeTemplate = controllerActionDescriptor.AttributeRouteInfo?.Template;
|
||||
bool needsCulture = routeTemplate?.Contains("{culture}") == true;
|
||||
// merge culture and additional values
|
||||
RouteValueDictionary routeValues = [];
|
||||
if (needsCulture)
|
||||
routeValues.Add("culture", culture);
|
||||
if (additionalRouteValues is not null)
|
||||
foreach (PropertyInfo prop in additionalRouteValues.GetType().GetProperties())
|
||||
routeValues.Add(prop.Name, prop.GetValue(additionalRouteValues));
|
||||
|
||||
// create route values based on whether the controller is localized
|
||||
object values = needsCulture ? new { culture, action } : new { action };
|
||||
return _linkGenerator.GetUriByAction(httpContext: httpContext, action: action, controller: controller, values: values, scheme: scheme);
|
||||
return _linkGenerator.GetUriByAction(httpContext: httpContext, action: action, controller: controller, values: routeValues, scheme: scheme);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Middlewares;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for making it easier for <see cref="ExceptionHandlingMiddleware"/> to be added the middleware.
|
||||
/// </summary>
|
||||
public static class ApiExceptionHandlingMiddlewareUtilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the <see cref="ExceptionHandlingMiddleware"/> to the application's request pipeline.
|
||||
/// Handles exception raised when the server API returns a problem details.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="IApplicationBuilder"/> used to configure the application's request pipeline.</param>
|
||||
/// <returns>The <see cref="IApplicationBuilder"/> for further configuration.</returns>
|
||||
public static IApplicationBuilder UseApiExceptionHandling(this IApplicationBuilder builder)
|
||||
{
|
||||
return builder.UseMiddleware<ExceptionHandlingMiddleware>();
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -8,8 +8,7 @@ namespace Lumina.Presentation.Web.Common.Utilities;
|
||||
/// <summary>
|
||||
/// Extension methods for making it easier for <see cref="CultureRedirectMiddleware"/> to be added the middleware.
|
||||
/// </summary>
|
||||
// Extension method to make it easier to add the middleware
|
||||
public static class CultureRedirectMiddlewareExtensions
|
||||
public static class CultureRedirectMiddlewareUtilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the <see cref="CultureRedirectMiddleware"/> to the application's request pipeline.
|
||||
@@ -0,0 +1,115 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Attributes;
|
||||
using Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Controller for administrator related operations.
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
[RequireRole("Admin")]
|
||||
[Route("{culture}/admin")]
|
||||
public class AdminController : Controller
|
||||
{
|
||||
private readonly IApiHttpClient _apiHttpClient;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AdminController"/> class.
|
||||
/// </summary>
|
||||
/// <param name="apiHttpClient">Injected service for interactions with the API.</param>
|
||||
public AdminController(IApiHttpClient apiHttpClient)
|
||||
{
|
||||
_apiHttpClient = apiHttpClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the view for managing authorization roles.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("manage-roles")]
|
||||
public async Task<IActionResult> ManageRoles(CancellationToken cancellationToken)
|
||||
{
|
||||
// get the list of roles and permissions from the API
|
||||
ViewData["roles"] = await _apiHttpClient.GetAsync<RoleModel[]>($"roles/", cancellationToken).ConfigureAwait(false);
|
||||
ViewData["rolePermissions"] = await _apiHttpClient.GetAsync<PermissionModel[]>($"permissions/", cancellationToken).ConfigureAwait(false);
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the view for managing authorization permissions.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("manage-permissions")]
|
||||
public async Task<IActionResult> ManagePermissions(CancellationToken cancellationToken)
|
||||
{
|
||||
ViewData["Roles"] = await _apiHttpClient.GetAsync<RoleModel>($"roles/", cancellationToken).ConfigureAwait(false);
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the authorization permissions of a role identified by <paramref name="roleId"/>.
|
||||
/// </summary>
|
||||
/// <param name="roleId">The Id of the role for which to get the list of permissions.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("get-permissions-by-role-id/{roleId}")]
|
||||
public async Task<IActionResult> GetPermissionsByRoleId(Guid roleId, CancellationToken cancellationToken)
|
||||
{
|
||||
RolePermissionsModel response = await _apiHttpClient.GetAsync<RolePermissionsModel>($"roles/{roleId}/permissions", cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of authorization roles.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("get-roles")]
|
||||
public async Task<IActionResult> GetRoles(CancellationToken cancellationToken)
|
||||
{
|
||||
RoleModel[] response = await _apiHttpClient.GetAsync<RoleModel[]>($"roles/", cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an authorization role with the specified name and associated permissions.
|
||||
/// </summary>
|
||||
/// <param name="model">The model containing the data of the role to be created.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpPost("create-role")]
|
||||
public async Task<IActionResult> CreateRole([FromBody] AddRoleRequestModel model, CancellationToken cancellationToken)
|
||||
{
|
||||
RolePermissionsModel response = await _apiHttpClient.PostAsync<RolePermissionsModel, AddRoleRequestModel>($"roles/", model, cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an authorization role with the specified name and associated permissions.
|
||||
/// </summary>
|
||||
/// <param name="model">The model containing the data of the role to be updated.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpPost("update-role")]
|
||||
public async Task<IActionResult> UpdateRole([FromBody] UpdateRoleRequestModel model, CancellationToken cancellationToken)
|
||||
{
|
||||
RolePermissionsModel response = await _apiHttpClient.PutAsync<RolePermissionsModel, UpdateRoleRequestModel>($"roles/", model, cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="roleId">The Id of the role to be deleted.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpDelete("delete-role/{roleId}")]
|
||||
public async Task<IActionResult> DeleteRole(Guid roleId, CancellationToken cancellationToken)
|
||||
{
|
||||
await _apiHttpClient.DeleteAsync($"roles/{roleId}", cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true });
|
||||
}
|
||||
}
|
||||
@@ -63,31 +63,31 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.de-DE.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.de-DE.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.en-US.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.en-US.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.es-ES.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.es-ES.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.fr-FR.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.fr-FR.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.it-IT.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.it-IT.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.ja-JP.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.ja-JP.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.ro-RO.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.ro-RO.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.ru-RU.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.ru-RU.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Common\Filters\ApiExceptionFilter.zh-CN.resx">
|
||||
<EmbeddedResource Update="Resources\Common\Middlewares\ExceptionHandlingMiddleware.zh-CN.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Views\Auth\ChangePassword.de-DE.resx">
|
||||
|
||||
@@ -89,6 +89,7 @@ public class Program
|
||||
ServeUnknownFileTypes = true
|
||||
});
|
||||
app.UseCultureRedirect(); // if the user attempts to go to a localized route without providing a culture, redirect to default culture
|
||||
app.UseApiExceptionHandling(); // handle any problem details returned by the API
|
||||
app.UseRouting();
|
||||
app.UseSession();
|
||||
app.UseAuthentication();
|
||||
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>Verschlüsselungsschlüssel muss eine Base64-Zeichenkette sein!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Fehler beim Speichern der Autorisierungsrolle!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Fehler beim Speichern der Medienbibliothek!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>Sie sind nicht berechtigt, diesen Vorgang auszuführen!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>Die angegebene Ressource wurde nicht gefunden!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>Kein Vorschaubild!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>Pfadliste darf nicht null sein!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>Die Berechtigungsliste darf nicht leer sein!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>Die Berechtigungsliste darf nicht null sein!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Verlag darf maximal 100 Zeichen lang sein!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>Wiederveröffentlichungsjahr muss zwischen 1 und 9999 liegen!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Rolle existiert bereits!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>Rollenkategorie darf nicht leer sein!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Rollenkategorie darf maximal 50 Zeichen lang sein!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Rollen-ID darf nicht leer sein!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Rollenname darf nicht leer sein!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Rollenname darf maximal 50 Zeichen lang sein!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Rolle nicht gefunden</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Stream-ID darf nicht leer sein!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>Encryption secret key must be a Base64 string!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Error persisting authorization role!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Error persisting media library!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>You are not authorized to perform this operation!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>Specified resource was not found!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>No thumbnail!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>Paths list cannot be null!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>Permissions list cannot be empty!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>Permissions list cannot be null!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Publisher must be maximum 100 characters long!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>Re-release year must be between 1 and 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Role already exists!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role category cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Role category must be maximum 50 characters long!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role Id cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role name cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Role name must be maximum 50 characters long!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Role not found</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Stream Id cannot be empty!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>¡La clave secreta de cifrado debe ser una cadena Base64!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>¡Error al persistir el rol de autorización!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>¡Error al guardar la biblioteca multimedia!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>¡No está autorizado para realizar esta operación!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>¡El recurso especificado no fue encontrado!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>¡Sin miniatura!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>¡La lista de rutas no puede ser nula!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡La lista de permisos no puede estar vacía!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>¡La lista de permisos no puede ser nula!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>¡El nombre de la editorial debe tener máximo 100 caracteres!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>¡El año de relanzamiento debe estar entre 1 y 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>¡El rol ya existe!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡La categoría del rol no puede estar vacía!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>¡La categoría del rol debe tener máximo 50 caracteres!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡El ID del rol no puede estar vacío!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡El nombre del rol no puede estar vacío!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>¡El nombre del rol debe tener máximo 50 caracteres!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Rol no encontrado</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡El ID del flujo no puede estar vacío!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>La clé secrète de chiffrement doit être une chaîne Base64!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Erreur lors de la persistance du rôle d'autorisation !</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Erreur lors de l'enregistrement de la bibliothèque multimédia!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>Vous n'êtes pas autorisé à effectuer cette opération!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>La ressource spécifiée n'a pas été trouvée !</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>Pas de vignette !</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>La liste des chemins ne peut pas être nulle !</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>La liste des permissions ne peut pas être vide !</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>La liste des permissions ne peut pas être nulle !</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Le nom de l'éditeur ne doit pas dépasser 100 caractères !</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>L'année de réédition doit être comprise entre 1 et 9999 !</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Le rôle existe déjà !</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>La catégorie du rôle ne peut pas être vide !</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>La catégorie du rôle ne doit pas dépasser 50 caractères !</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'ID du rôle ne peut pas être vide !</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Le nom du rôle ne peut pas être vide !</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Le nom du rôle ne doit pas dépasser 50 caractères !</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Rôle non trouvé</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'identifiant du flux ne peut pas être vide !</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>La chiave segreta di crittografia deve essere una stringa Base64!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Errore nel salvare il ruolo di autorizzazione!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Errore durante il salvataggio della libreria multimediale!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>Non sei autorizzato a eseguire questa operazione!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>La risorsa specificata non è stata trovata!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>Nessuna miniatura!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>La lista dei percorsi non può essere nulla!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'elenco dei permessi non può essere vuoto!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>L'elenco dei permessi non può essere nullo!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Il nome dell'editore deve essere lungo al massimo 100 caratteri!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>L'anno di ripubblicazione deve essere compreso tra 1 e 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Il ruolo esiste già!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>La categoria del ruolo non può essere vuota!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>La categoria del ruolo deve essere lunga al massimo 50 caratteri!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'ID del ruolo non può essere vuoto!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Il nome del ruolo non può essere vuoto!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Il nome del ruolo deve essere lungo al massimo 50 caratteri!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Ruolo non trovato</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'ID del flusso non può essere vuoto!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>暗号化シークレットキーはBase64形式の文字列である必要があります!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>認可ロールの保存中にエラーが発生しました!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>メディアライブラリの保存に失敗しました!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>この操作を実行する権限がありません!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>指定されたリソースが見つかりませんでした!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>サムネイルがありません!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>パスリストをnullにすることはできません!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>権限リストは空にできません!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>権限リストはnullにできません!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>出版社名は最大100文字までです!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>再公開年は1から9999の間でなければなりません!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>ロールはすでに存在します!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>役割カテゴリを空にすることはできません!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>役割カテゴリは最大50文字までです!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>ロールIDは空にできません!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>役割名を空にすることはできません!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>役割名は最大50文字までです!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>ロールが見つかりません</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>ストリームIDを空にすることはできません!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>Encryption secret key must be a Base64 string!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Error persisting authorization role!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Error persisting media library!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>You are not authorized to perform this operation!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>Specified resource was not found!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>No thumbnail!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>Paths list cannot be null!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>Permissions list cannot be empty!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>Permissions list cannot be null!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Publisher must be maximum 100 characters long!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>Re-release year must be between 1 and 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Role already exists!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role category cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Role category must be maximum 50 characters long!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role Id cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Role name cannot be empty!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Role name must be maximum 50 characters long!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Role not found</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Stream Id cannot be empty!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>Cheia secretă de criptare trebuie să fie un șir Base64!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Eroare la salvarea rolului de autorizare!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Eroare la salvarea bibliotecii media!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>Nu sunteți autorizat să efectuați această operațiune!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>Resursa specificată nu a fost găsită!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>Fără pictograma!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>Lista de căi nu poate fi nulă!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>Lista de permisiuni nu poate fi goală!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>Lista de permisiuni nu poate fi nulă!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Editura trebuie să aibă maximum 100 caractere!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>Anul relansării trebuie să fie între 1 și 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Rolul există deja!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>Categoria rolului nu poate fi goală!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Categoria rolului trebuie să aibă maximum 50 caractere!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>ID-ul rolului nu poate fi gol!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Numele rolului nu poate fi gol!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Numele rolului trebuie să aibă maximum 50 caractere!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Rolul nu a fost găsit</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>ID-ul fluxului nu poate fi gol!</value>
|
||||
</data>
|
||||
+21
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>Секретный ключ шифрования должен быть строкой в формате Base64!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>Ошибка при сохранении роли авторизации!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>Ошибка при сохранении медиатеки!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>У вас нет прав для выполнения этой операции!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>Указанный ресурс не найден!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>Нет миниатюры!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>Список путей не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>Список разрешений не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>Список разрешений не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>Название издательства не должно превышать 100 символов!</value>
|
||||
</data>
|
||||
@@ -426,18 +438,27 @@
|
||||
<data name="ReReleaseYearMustBeBetween1And9999" xml:space="preserve">
|
||||
<value>Год переиздания должен быть между 1 и 9999!</value>
|
||||
</data>
|
||||
<data name="RoleAlreadyExists" xml:space="preserve">
|
||||
<value>Роль уже существует!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryCannotBeEmpty" xml:space="preserve">
|
||||
<value>Категория роли не может быть пустой!</value>
|
||||
</data>
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Категория роли не должна превышать 50 символов!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Идентификатор роли не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>Название роли не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>Название роли не должно превышать 50 символов!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>Роль не найдена</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Идентификатор потока не может быть пустым!</value>
|
||||
</data>
|
||||
+18
@@ -192,6 +192,9 @@
|
||||
<data name="EncryptionSecretKeyMustBeABase64String" xml:space="preserve">
|
||||
<value>加密密钥必须是Base64字符串!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingAuthorizationRole" xml:space="preserve">
|
||||
<value>持久化授权角色时出错!</value>
|
||||
</data>
|
||||
<data name="ErrorPersistingMediaLibrary" xml:space="preserve">
|
||||
<value>保存媒体库时出错!</value>
|
||||
</data>
|
||||
@@ -345,6 +348,9 @@
|
||||
<data name="NotAuthorized" xml:space="preserve">
|
||||
<value>您无权执行此操作!</value>
|
||||
</data>
|
||||
<data name="NotFound" xml:space="preserve">
|
||||
<value>指定的资源未找到!</value>
|
||||
</data>
|
||||
<data name="NoThumbnail" xml:space="preserve">
|
||||
<value>没有缩略图!</value>
|
||||
</data>
|
||||
@@ -390,6 +396,12 @@
|
||||
<data name="PathsListCannotBeNull" xml:space="preserve">
|
||||
<value>路径列表不能为空!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeEmpty" xml:space="preserve">
|
||||
<value>权限列表不能为空!</value>
|
||||
</data>
|
||||
<data name="PermissionsListCannotBeNull" xml:space="preserve">
|
||||
<value>权限列表不能为空!</value>
|
||||
</data>
|
||||
<data name="PublisherMustBeMaximum100CharactersLong" xml:space="preserve">
|
||||
<value>出版社名称最多只能有100个字符!</value>
|
||||
</data>
|
||||
@@ -432,12 +444,18 @@
|
||||
<data name="RoleCategoryMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>角色类别最多只能有50个字符!</value>
|
||||
</data>
|
||||
<data name="RoleIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>角色ID不能为空!</value>
|
||||
</data>
|
||||
<data name="RoleNameCannotBeEmpty" xml:space="preserve">
|
||||
<value>角色名称不能为空!</value>
|
||||
</data>
|
||||
<data name="RoleNameMustBeMaximum50CharactersLong" xml:space="preserve">
|
||||
<value>角色名称最多只能有50个字符!</value>
|
||||
</data>
|
||||
<data name="RoleNotFound" xml:space="preserve">
|
||||
<value>角色未找到</value>
|
||||
</data>
|
||||
<data name="StreamIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>流ID不能为空!</value>
|
||||
</data>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Kann Benutzer löschen</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Kann Benutzer registrieren</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Kann Benutzer anzeigen</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Rolle erstellen</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Rolle löschen</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>Die Rolle wurde erstellt!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>Die Rolle wurde gelöscht!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Rollenname</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Rollen</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>Die Rolle wurde aktualisiert!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Wählen Sie eine Rolle</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Rolle aktualisieren</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Can delete users</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Can register users</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Can view users</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Create role</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Delete role</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>The role has been created!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>The role has been deleted!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Role name</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>The role has been updated!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Select a role</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Update role</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Puede eliminar usuarios</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Puede registrar usuarios</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Puede ver usuarios</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Crear un rol</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Eliminar rol</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>¡El rol ha sido creado!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>¡El rol ha sido eliminado!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Nombre del rol</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>¡El rol ha sido actualizado!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Selecciona un rol</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Actualizar rol</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Peut supprimer des utilisateurs</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Peut enregistrer des utilisateurs</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Peut voir les utilisateurs</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Créer un rôle</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Supprimer le rôle</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>Le rôle a été créé !</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>Le rôle a été supprimé !</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Nom du rôle</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Rôles</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>Le rôle a été mis à jour !</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Sélectionnez un rôle</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Mettre à jour le rôle</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Può eliminare utenti</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Può registrare utenti</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Può visualizzare utenti</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Creare un ruolo</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Elimina ruolo</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>Il ruolo è stato creato!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>Il ruolo è stato eliminato!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Nome del ruolo</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Ruoli</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>Il ruolo è stato aggiornato!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Seleziona un ruolo</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Aggiorna ruolo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>ユーザーを削除できます</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>ユーザーを登録できます</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>ユーザーを表示できます</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>ロールを作成する</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>ロールを削除する</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>ロールが作成されました!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>ロールが削除されました!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>ロール名</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>ロール</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>ロールが更新されました!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>ロールを選択してください</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>ロールを更新する</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Can delete users</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Can register users</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Can view users</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Create role</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Delete role</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>The role has been created!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>The role has been deleted!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Role name</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>The role has been updated!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Select a role</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Update role</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Poate șterge utilizatori</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Poate înregistra utilizatori</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Poate vizualiza utilizatori</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Creare rol</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Ștergere rol</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>Rolul a fost creat!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>Rolul a fost șters!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Numele rolului</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Roluri</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>Rolul a fost actualizat!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Selectare rol</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Actualizare rol</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>Может удалять пользователей</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>Может регистрировать пользователей</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>Может просматривать пользователей</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>Создать роль</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>Удалить роль</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>Роль была создана!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>Роль была удалена!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>Название роли</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>Роли</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>Роль была обновлена!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>Выберите роль</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>Обновить роль</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CanDeleteUsers" xml:space="preserve">
|
||||
<value>可以删除用户</value>
|
||||
</data>
|
||||
<data name="CanRegisterUsers" xml:space="preserve">
|
||||
<value>可以注册用户</value>
|
||||
</data>
|
||||
<data name="CanViewUsers" xml:space="preserve">
|
||||
<value>可以查看用户</value>
|
||||
</data>
|
||||
<data name="CreateRole" xml:space="preserve">
|
||||
<value>创建角色</value>
|
||||
</data>
|
||||
<data name="DeleteRole" xml:space="preserve">
|
||||
<value>删除角色</value>
|
||||
</data>
|
||||
<data name="RoleCreated" xml:space="preserve">
|
||||
<value>角色已创建!</value>
|
||||
</data>
|
||||
<data name="RoleDeleted" xml:space="preserve">
|
||||
<value>角色已删除!</value>
|
||||
</data>
|
||||
<data name="RoleName" xml:space="preserve">
|
||||
<value>角色名称</value>
|
||||
</data>
|
||||
<data name="Roles" xml:space="preserve">
|
||||
<value>角色</value>
|
||||
</data>
|
||||
<data name="RoleUpdated" xml:space="preserve">
|
||||
<value>角色已更新!</value>
|
||||
</data>
|
||||
<data name="SelectARole" xml:space="preserve">
|
||||
<value>选择一个角色</value>
|
||||
</data>
|
||||
<data name="UpdateRole" xml:space="preserve">
|
||||
<value>更新角色</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigation fehlgeschlagen!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Vollhöhe Umschalten</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigation failed!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Toggle Full Height</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>¡Navegación fallida!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Alternar Altura Completa</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigation échouée !</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Basculer Hauteur Complète</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigazione fallita!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Attiva/Disattiva Altezza Piena</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>ナビゲーションに失敗しました!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>全高表示切替</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigation failed!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Toggle Full Height</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Navigarea a eșuat!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Comutare Înălțime Completă</value>
|
||||
</data>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NavigationFailed" xml:space="preserve">
|
||||
<value>Навигация не удалась!</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Переключить Полную Высоту</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Registrieren</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Berechtigungen verwalten</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Werkzeuge</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Schriftliche Inhalte</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Rollen verwalten</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Register</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Manage permissions</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Written Content</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Manage roles</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Registrarse</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Administrar permisos</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Herramientas</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Contenido Escrito</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Administrar roles</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>S'inscrire</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Gérer les permissions</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Outils</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Contenu Écrit</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Gérer les rôles</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Registrati</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Gestire i permessi</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Strumenti</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Contenuto Scritto</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Gestire i ruoli</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>登録</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>権限を管理する</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>ツール</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>文字コンテンツ</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>ロールを管理する</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Register</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Manage permissions</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Written Content</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Manage roles</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Înregistrare</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Gestionare permisiuni</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Unelte</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Conținut Scris</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Gestionare roluri</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Регистрация</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>Управление разрешениями</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>Инструменты</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>Письменный Контент</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>Управление ролями</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>注册</value>
|
||||
</data>
|
||||
<data name="ManagePermissions" xml:space="preserve">
|
||||
<value>管理权限</value>
|
||||
</data>
|
||||
<data name="Tools" xml:space="preserve">
|
||||
<value>工具</value>
|
||||
</data>
|
||||
@@ -201,4 +204,7 @@
|
||||
<data name="WrittenContent" xml:space="preserve">
|
||||
<value>文字内容</value>
|
||||
</data>
|
||||
<data name="ManageRoles" xml:space="preserve">
|
||||
<value>管理角色</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
@*
|
||||
/admin/manage-permissions/
|
||||
*@
|
||||
|
||||
@using Lumina.Presentation.Web.Common.Models.Authorization
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
|
||||
@{
|
||||
var roles = ViewData["roles"] as RoleModel[];
|
||||
var rolePermissions = ViewData["rolePermissions"] as PermissionModel[];
|
||||
}
|
||||
|
||||
@inject IViewLocalizer _localizer
|
||||
|
||||
<form id="rolesPermissionsForm" method="post" action="/Permissions/CreateRole">
|
||||
<input type="hidden" name="rolesRoleId" id="rolesRoleId" value="" />
|
||||
<!-- Roles dropdown row -->
|
||||
<div class="h-30px w-100 text-end">
|
||||
<label for="rolesRolesDropdown" class="text-light-one">@_localizer["Roles"]</label>
|
||||
|
||||
<div class="enlightenment-combobox w-250px inline-block" id="rolesRolesDropdown">
|
||||
<div class="shine-effect" style="top: 1px;"></div>
|
||||
<input type="checkbox" id="rolesRolesDropdownToggle" class="enlightenment-toggle-checkbox" />
|
||||
<label class="enlightenment-toggle" for="rolesRolesDropdownToggle">
|
||||
<span class="enlightenment-selected-text">@_localizer["SelectARole"]</span>
|
||||
</label>
|
||||
<div class="enlightenment-dropdown">
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">@_localizer["SelectARole"]</div>
|
||||
@if (roles is not null)
|
||||
{
|
||||
@for (int i = 0; i < roles.Length; i++)
|
||||
{
|
||||
<div class="enlightenment-option @(i == roles.Length - 1 ? "last-option" : "")" data-value="@roles[i].Id">@roles[i].RoleName</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Role name input row -->
|
||||
<div class="h-30px w-100 text-end mb-5">
|
||||
<label for="rolesRoleInput" class="text-light-one">@_localizer["RoleName"]</label>
|
||||
<input type="text" id="rolesRoleInput" name="roleName" class="enlightenment-input w-250px" />
|
||||
</div>
|
||||
|
||||
<!-- Permissions row -->
|
||||
<div class="containerRoles row panel inset">
|
||||
<div class="explorerContainer">
|
||||
<div class="explorer">
|
||||
@if (rolePermissions is not null)
|
||||
{
|
||||
@foreach (var rolePermission in rolePermissions)
|
||||
{
|
||||
<div class="e no-border transparent">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
<input type="checkbox" class="enlightenment-checkbox-hidden" name="rolePermissions" value="@rolePermission.Id">
|
||||
<span class="enlightenment-checkbox"></span>
|
||||
@_localizer[rolePermission.PermissionName.ToString()]
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button Row -->
|
||||
<div class="w-100 text-end">
|
||||
<button type="button" class="abort-button f-14 h-24px v-align-t hidden" id="rolesDeleteRoleBtn">@_localizer["DeleteRole"]</button>
|
||||
<button type="submit" class="confirm-button f-14 h-24px v-align-t" id="rolesConfirmBtn">@_localizer["CreateRole"]</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@* <div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-90 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="add-media-library-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
<div class="form-field">
|
||||
<div class="enlightenment-combobox inline-block w-100">
|
||||
<div class="shine-effect" style="top: 1px;"></div>
|
||||
<input type="checkbox" class="enlightenment-toggle-checkbox" id="library-type" />
|
||||
<label class="enlightenment-toggle" for="library-type">
|
||||
<span id="library-selected-item" class="enlightenment-selected-text" data-value="None">@_localizer["None"]</span>
|
||||
</label>
|
||||
<div class="enlightenment-dropdown">
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">@_localizer["None"]</div>
|
||||
@foreach (var item in aa!)
|
||||
{
|
||||
<div class="enlightenment-option">@_localizer[item.ToString()]</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<p>a</p>
|
||||
|
||||
</form>
|
||||
</div> *@
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
@*
|
||||
/admin/manage-roles/
|
||||
*@
|
||||
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@using Lumina.Presentation.Web.Common.Models.Authorization
|
||||
|
||||
@{
|
||||
var roles = ViewData["roles"] as RoleModel[];
|
||||
var rolePermissions = ViewData["rolePermissions"] as PermissionModel[];
|
||||
// generate a unique id for the scripts section of this view, so it can be dynamically loaded/unloaded by the global AJAX navigator handler
|
||||
var scriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
}
|
||||
|
||||
@inject IViewLocalizer _localizer
|
||||
@inject IUrlService _urlService
|
||||
|
||||
<form id="authorization-roles-form" method="post" class="w-100 h-100 mx-auto pl-10 pr-10 pt-10 pb-10">
|
||||
<div id="authorization-roles-container">
|
||||
<input type="hidden" name="authorization-roles-selected-id" id="authorization-roles-selected-id" value="" />
|
||||
<!-- Roles dropdown row -->
|
||||
<div class="h-30px w-100 text-end mb-5">
|
||||
<label for="authorization-roles-combobox" class="text-light-one">@_localizer["Roles"]</label>
|
||||
|
||||
<div class="enlightenment-combobox w-250px inline-block" id="authorization-roles-combobox">
|
||||
<div class="shine-effect" style="top: 1px;"></div>
|
||||
<input type="checkbox" id="authorization-roles-combobox-toggle" class="enlightenment-toggle-checkbox" />
|
||||
<label class="enlightenment-toggle" for="authorization-roles-combobox-toggle">
|
||||
<span class="enlightenment-selected-text">@_localizer["SelectARole"]</span>
|
||||
</label>
|
||||
<div class="enlightenment-dropdown" id="authorization-roles-combobox-dropdown">
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">@_localizer["SelectARole"]</div>
|
||||
@if (roles is not null)
|
||||
{
|
||||
@for (int i = 0; i < roles.Length; i++)
|
||||
{
|
||||
<div class="enlightenment-option @(i == roles.Length - 1 ? "last-option" : "")" data-value="@roles[i].Id">@roles[i].RoleName</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Role name input row -->
|
||||
<div class="h-30px w-100 text-end mb-5">
|
||||
<label for="txt-role-name" class="text-light-one">@_localizer["RoleName"]</label>
|
||||
<input type="text" id="txt-role-name" name="authorization-role-name" class="enlightenment-input w-250px" />
|
||||
</div>
|
||||
|
||||
<!-- Permissions row -->
|
||||
<div id="authorization-roles-permissions-container" class="">
|
||||
<div id="authorization-roles-permissions">
|
||||
<div id="authorization-roles-permissions-scroll" class="scroll-horizontal">
|
||||
<div id="authorization-roles-permissions-list" class="list" style="flex-direction: column;">
|
||||
@if (rolePermissions is not null)
|
||||
{
|
||||
@foreach (var rolePermission in rolePermissions)
|
||||
{
|
||||
<div class="e no-border transparent mt-5 mb-5">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
<input type="checkbox" class="enlightenment-checkbox-hidden" name="authorization-role-permissions" value="@rolePermission.Id">
|
||||
<span class="enlightenment-checkbox"></span>
|
||||
@_localizer[rolePermission.PermissionName.ToString()]
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button Row -->
|
||||
<div class="w-100 h-25px mt-5 text-end">
|
||||
<button id="btn-delete-role" type="button" class="abort-button f-14 h-24px v-align-t hidden">@_localizer["DeleteRole"]</button>
|
||||
<button id="btn-confirm-role" type="submit" class="confirm-button f-14 h-24px v-align-t">@_localizer["CreateRole"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
const btnDeleteRole = document.getElementById('btn-delete-role');
|
||||
const btnConfirmRole = document.getElementById('btn-confirm-role');
|
||||
const txtRoleName = document.getElementById('txt-role-name');
|
||||
const form = document.getElementById('authorization-roles-form');
|
||||
const dropdown = document.getElementById('authorization-roles-combobox-dropdown')
|
||||
// on Enter key pressed
|
||||
form.addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
await handleRoleSubmit(e.target.closest('form'));
|
||||
}
|
||||
});
|
||||
// on form submit event
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleRoleSubmit(e.target);
|
||||
});
|
||||
|
||||
// create new or update existing role
|
||||
async function handleRoleSubmit(form) {
|
||||
const formData = {
|
||||
roleId: document.getElementById('authorization-roles-selected-id').value,
|
||||
roleName: txtRoleName.value,
|
||||
permissions: Array.from(form.querySelectorAll("input[name='authorization-role-permissions']:checked"))
|
||||
.map(checkbox => checkbox.value)
|
||||
};
|
||||
|
||||
const isRoleSelected = formData.roleId !== '';
|
||||
const url = isRoleSelected ? '@_urlService.GetAbsoluteUrl("UpdateRole", "Admin")' : '@_urlService.GetAbsoluteUrl("CreateRole", "Admin")';
|
||||
|
||||
const data = await callApiPostAsync(url, formData);
|
||||
if (data) {
|
||||
await fetchRoles();
|
||||
notificationService.show(isRoleSelected ? '@_localizer["RoleUpdated"]' : '@_localizer["RoleCreated"]', NotificationType.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
btnDeleteRole.addEventListener('click', async function(e) {
|
||||
const roleId = document.getElementById('authorization-roles-selected-id').value;
|
||||
|
||||
// const confirmDelete = await showDialog(
|
||||
// translationService.Translate(Terms.ConfirmRoleDelete),
|
||||
// translationService.Translate(Terms.Confirmation),
|
||||
// 'YES_NO'
|
||||
// );
|
||||
|
||||
// if (confirmDelete) {
|
||||
const url = '@_urlService.GetAbsoluteUrl("DeleteRole", "Admin", new { roleId = default(Guid) })';
|
||||
const success = await callApiDeleteAsync(url.replace('/@(default(Guid))', `/${roleId}`)); // roleId needs to be replaced here, because GetAbsoluteUrl is server side, roleId is client side
|
||||
if (success) {
|
||||
await fetchRoles();
|
||||
notificationService.show('@_localizer["RoleDeleted"]', NotificationType.SUCCESS);
|
||||
}
|
||||
// }
|
||||
});
|
||||
|
||||
// on role dropdown change
|
||||
document.addEventListener('click', function(e) {
|
||||
if (e.target.classList.contains('enlightenment-option')) {
|
||||
const roleId = e.target.dataset.value;
|
||||
const selectedText = e.target.textContent;
|
||||
const txtRoleName = document.getElementById('txt-role-name');
|
||||
txtRoleName.value = roleId ? selectedText : '';
|
||||
|
||||
fetchRolePermissions(roleId);
|
||||
|
||||
const roleIdInput = document.getElementById('authorization-roles-selected-id');
|
||||
|
||||
if (roleId) {
|
||||
btnDeleteRole.classList.remove('hidden');
|
||||
btnDeleteRole.classList.add('inline');
|
||||
btnConfirmRole.textContent = '@_localizer["UpdateRole"]';
|
||||
roleIdInput.value = roleId;
|
||||
} else {
|
||||
roleIdInput.value = '';
|
||||
btnDeleteRole.classList.remove('inline');
|
||||
btnDeleteRole.classList.add('hidden');
|
||||
btnConfirmRole.textContent = '@_localizer["CreateRole"]';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
async function fetchRoles() {
|
||||
const url = '@_urlService.GetAbsoluteUrl("GetRoles", "Admin")';
|
||||
const data = await callApiGetAsync(url);
|
||||
if (data) {
|
||||
// clear the roles drop down list
|
||||
const rolesDropdown = document.querySelector("#authorization-roles-combobox .enlightenment-dropdown");
|
||||
rolesDropdown.innerHTML = `
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">'@_localizer["SelectARole"]'</div>
|
||||
`;
|
||||
|
||||
// populate the roles drop down
|
||||
data.forEach((role, index) => {
|
||||
const option = document.createElement('div');
|
||||
option.className = `enlightenment-option ${index === data.length - 1 ? 'last-option' : ''}`;
|
||||
option.dataset.value = role.id;
|
||||
option.textContent = role.roleName;
|
||||
rolesDropdown.appendChild(option);
|
||||
});
|
||||
|
||||
// update the text of the toggle button of the combobox
|
||||
document.querySelector('.enlightenment-selected-text').textContent = '@_localizer["SelectARole"]';
|
||||
|
||||
// all permissions should be "unchecked"
|
||||
document.querySelectorAll("input[name='authorization-role-permissions']")
|
||||
.forEach(input => input.checked = false);
|
||||
|
||||
// the delete button should be hidden
|
||||
btnDeleteRole.classList.remove('inline');
|
||||
btnDeleteRole.classList.add('hidden');
|
||||
|
||||
// the "update" button should be "create"
|
||||
btnConfirmRole.textContent = '@_localizer["CreateRole"]';
|
||||
|
||||
// the input for the role name should also have its text emptied
|
||||
txtRoleName.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchRolePermissions(roleId) {
|
||||
if (roleId) {
|
||||
const url = '@_urlService.GetAbsoluteUrl("GetPermissionsByRoleId", "Admin", new { roleId = default(Guid) })';
|
||||
const data = await callApiGetAsync(url.replace('/@(default(Guid))', `/${roleId}`)); // roleId needs to be replaced here, because GetAbsoluteUrl is server side, roleId is client side
|
||||
if (data) {
|
||||
// clear all checkboxes
|
||||
document.querySelectorAll("input[name='authorization-role-permissions']")
|
||||
.forEach(input => input.checked = false);
|
||||
|
||||
// check the checkboxes for which permissions are assigned
|
||||
data.permissions.forEach(p => {
|
||||
const checkbox = document.querySelector(
|
||||
`input[name='authorization-role-permissions'][value='${p.id}']`
|
||||
);
|
||||
if (checkbox) checkbox.checked = true;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// if no role is selected, clear checkboxes
|
||||
document.querySelectorAll("input[name='authorization-role-permissions']")
|
||||
.forEach(input => input.checked = false);
|
||||
}
|
||||
}
|
||||
// when form's height changes, adjust the roles combobox dropdown maximum height accordingly, so it doesn't cause an <article> section overflow
|
||||
const resizeObserver = new ResizeObserver(entries => {
|
||||
const formHeight = form.getBoundingClientRect().height;
|
||||
dropdown.style.maxHeight = `calc(${formHeight}px - 50px)`;
|
||||
dropdown.style.overflowY = `auto`;
|
||||
});
|
||||
resizeObserver.observe(form);
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#authorization-roles-container {
|
||||
display: flex;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
#authorization-roles-permissions-container {
|
||||
flex-grow: 1;
|
||||
min-width: 135px;
|
||||
min-height: 0px;
|
||||
}
|
||||
|
||||
#authorization-roles-permissions {
|
||||
border: 1px solid var(--border-color-light-high);
|
||||
border-top: 1px solid var(--border-color-dark);
|
||||
border-left: 1px solid var(--border-color-dark);
|
||||
margin: auto;
|
||||
padding-left: 5px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: left;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
#authorization-roles-permissions-scroll {
|
||||
background-color: #232323;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#authorization-roles-permissions-list {
|
||||
margin: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
border: 0px solid black;
|
||||
padding: 0px;
|
||||
gap: 0px 10px;
|
||||
}
|
||||
@@ -6,9 +6,12 @@
|
||||
|
||||
@inject IViewLocalizer _localizer
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-55 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<div class="text-center w-100">
|
||||
<p id="change-password-success" class="invalid-feedback f-18 w-100"><b>@_localizer["NotAllowedToAccessResource"]</b></p>
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"><!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-55 mb-10" style="min-width: 320px;">
|
||||
<div class="shine-effect"></div>
|
||||
<div class="text-center w-100">
|
||||
<p id="change-password-success" class="invalid-feedback f-18 w-100"><b>@_localizer["NotAllowedToAccessResource"]</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -16,68 +16,71 @@
|
||||
|
||||
@model ChangePasswordRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-55 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="change-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="text" name="username" autocomplete="username" value="@User.Identity!.Name" hidden />
|
||||
<div class="form-container">
|
||||
<!-- Current Password -->
|
||||
<div class="form-row" id="div-current-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="CurrentPassword">@_localizer["CurrentPassword"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"><!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-55 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="change-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="text" name="username" autocomplete="username" value="@User.Identity!.Name" hidden />
|
||||
<div class="form-container">
|
||||
<!-- Current Password -->
|
||||
<div class="form-row" id="div-current-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="CurrentPassword">@_localizer["CurrentPassword"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="CurrentPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionCurrentPassword"]</small>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="CurrentPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
<!-- New Password -->
|
||||
<div class="form-row" id="div-new-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPassword">@_localizer["NewPassword"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionNewPassword"]</small>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionCurrentPassword"]</small>
|
||||
</div>
|
||||
<!-- New Password -->
|
||||
<div class="form-row" id="div-new-password">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPassword">@_localizer["NewPassword"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<!-- New Password Confirm-->
|
||||
<div class="form-row" id="div-new-password-confirm">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPasswordConfirm">@_localizer["NewPasswordConfirm"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPasswordConfirm" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionNewPasswordConfirm"]</small>
|
||||
</div>
|
||||
<div class="form-row" id="div-change-password-submit" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px">@_localizer["ChangePasswordKey"]</button>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPassword" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionNewPassword"]</small>
|
||||
</div>
|
||||
<!-- New Password Confirm-->
|
||||
<div class="form-row" id="div-new-password-confirm">
|
||||
<div class="form-label">
|
||||
<label asp-for="NewPasswordConfirm">@_localizer["NewPasswordConfirm"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="NewPasswordConfirm" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionNewPasswordConfirm"]</small>
|
||||
</div>
|
||||
<div class="form-row" id="div-change-password-submit" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px">@_localizer["ChangePasswordKey"]</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="change-password-success" class="text-light-one w-100 hidden">@_localizer["PasswordChanged"]</p>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="change-password-success" class="text-light-one w-100 hidden">@_localizer["PasswordChanged"]</p>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
document.getElementById('change-password-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
const form = event.target.closest('form');
|
||||
document.getElementById('change-password-form').addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
const form = e.target.closest('form');
|
||||
await handleChangePassword(form);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('change-password-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
await handleChangePassword(event.target);
|
||||
document.getElementById('change-password-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleChangePassword(e.target);
|
||||
});
|
||||
|
||||
async function handleChangePassword(form) {
|
||||
|
||||
@@ -16,62 +16,65 @@
|
||||
|
||||
@model LoginRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="login-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="ReturnUrl" value="@ViewData["ReturnUrl"]" />
|
||||
<div class="form-container">
|
||||
<!-- Username -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>:
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"> <!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style ="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="login-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="ReturnUrl" value="@ViewData["ReturnUrl"]" />
|
||||
<div class="form-container">
|
||||
<!-- Username -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
<!-- Password -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Password">@_localizer["Password"]</label>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="Password" autocomplete="current-password" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btn-recover-password" type="button" class="abort-button h-22px">@_localizer["RecoverPassword"]</button>
|
||||
<button id="btn-login" type="submit" class="confirm-button h-22px">@_localizer["LoginKey"]</button>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<div class="form-row mt-10 hidden" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">@_localizer["TotpCode"]</label>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="number" asp-for="TotpCode" autocomplete="one-time-code" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px hidden">@_localizer["ValidateCode"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Password -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Password">@_localizer["Password"]</label>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="Password" autocomplete="current-password" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btn-recover-password" type="button" class="abort-button h-22px">@_localizer["RecoverPassword"]</button>
|
||||
<button id="btn-login" type="submit" class="confirm-button h-22px">@_localizer["LoginKey"]</button>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<div class="form-row mt-10 hidden" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">@_localizer["TotpCode"]</label>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="number" asp-for="TotpCode" autocomplete="one-time-code" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px hidden">@_localizer["ValidateCode"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
document.getElementById('login-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
const form = event.target.closest('form');
|
||||
document.getElementById('login-form').addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
const form = e.target.closest('form');
|
||||
await handleLogin(form);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('login-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
await handleLogin(event.target);
|
||||
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleLogin(e.target);
|
||||
});
|
||||
|
||||
async function handleLogin(form) {
|
||||
|
||||
@@ -16,56 +16,59 @@
|
||||
|
||||
@model RecoverPasswordRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="recover-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="form-container">
|
||||
<!-- Username -->
|
||||
<div class="form-row" id="div-username">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"><!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="recover-password-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="form-container">
|
||||
<!-- Username -->
|
||||
<div class="form-row" id="div-username">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
<!-- 2FA -->
|
||||
<div class="form-row" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">@_localizer["TotpCode"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="number" asp-for="TotpCode" autocomplete="one-time-code" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btn-login" type="button" class="abort-button h-22px">@_localizer["BackToLogin"]</button>
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px">@_localizer["ValidateCode"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<div class="form-row" id="div-totp-code">
|
||||
<div class="form-label">
|
||||
<label asp-for="TotpCode">@_localizer["TotpCode"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="number" asp-for="TotpCode" autocomplete="one-time-code" class="enlightenment-input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button id="btn-login" type="button" class="abort-button h-22px">@_localizer["BackToLogin"]</button>
|
||||
<button type="submit" id="btn-validate-totp" class="confirm-button h-22px">@_localizer["ValidateCode"]</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="recover-password-success" class="text-light-one w-100 hidden">@_localizer["PasswordTemporarilyReset"]</p>
|
||||
<button id="btn-redirect-login" type="submit" class="confirm-button h-22px hidden">@_localizer["Login"]</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="recover-password-success" class="text-light-one w-100 hidden">@_localizer["PasswordTemporarilyReset"]</p>
|
||||
<button id="btn-redirect-login" type="submit" class="confirm-button h-22px hidden">@_localizer["Login"]</button>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
document.getElementById('recover-password-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
const form = event.target.closest('form');
|
||||
document.getElementById('recover-password-form').addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
const form = e.target.closest('form');
|
||||
await handleRecoverPassword(form);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('recover-password-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
await handleRecoverPassword(event.target);
|
||||
document.getElementById('recover-password-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleRecoverPassword(e.target);
|
||||
});
|
||||
|
||||
async function handleRecoverPassword(form) {
|
||||
|
||||
@@ -17,97 +17,100 @@
|
||||
|
||||
@model RegisterRequestModel
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="register-account-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<!-- section for determining registration type (regular user/admin) -->
|
||||
<input type="hidden" name="RegistrationType" value="@registrationType" />
|
||||
<div class="form-container">
|
||||
@if (registrationType == "Admin")
|
||||
{
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"><!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="register-account-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<!-- section for determining registration type (regular user/admin) -->
|
||||
<input type="hidden" name="RegistrationType" value="@registrationType" />
|
||||
<div class="form-container">
|
||||
@if (registrationType == "Admin")
|
||||
{
|
||||
<div class="form-row">
|
||||
<p class="invalid-feedback w-95 text-center f-18">@_localizer["AdminAccountRegistration"]</p>
|
||||
</div>
|
||||
}
|
||||
<!-- Username -->
|
||||
<div class="form-row">
|
||||
<p class="invalid-feedback w-95 text-center f-18">@_localizer["AdminAccountRegistration"]</p>
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionUsername"]</small>
|
||||
</div>
|
||||
<!-- Password -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Password">@_localizer["Password"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="Password" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionPassword"]</small>
|
||||
</div>
|
||||
<!-- Password Confirm-->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="PasswordConfirm">@_localizer["PasswordConfirm"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="PasswordConfirm" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionPasswordConfirm"]</small>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<input type="hidden" id="hidden-use-two-fa" name="use2fa" value="true">
|
||||
<div class="form-row">
|
||||
<div class="form-field">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
<input type="checkbox" asp-for="Use2fa" class="enlightenment-checkbox-hidden" value="true" checked/>
|
||||
<span class="enlightenment-checkbox"></span>
|
||||
@_localizer["EnableTwoFactorAuthentication"]
|
||||
</label>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["Description2Fa"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<span id="register-two-fa-attention" class="invalid-feedback w-95 text-center hidden">@_localizer["DisclaimerTwoFactor"]</span>
|
||||
</div>
|
||||
<div class="form-row" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px">@_localizer["RegisterKey"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="register-success" class="text-light-one w-100 hidden">@_localizer["AccountCreated"]</p>
|
||||
<img id="totp-image" class="w-200px h-200px h-align-m mx-auto mt-10 hidden" />
|
||||
<p id="totp-message" class="text-light-one w-100 hidden">@_localizer["ScanTotpCode"]</p>
|
||||
@if (User?.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
<button id="btn-login" type="button" class="confirm-button h-22px mx-auto mt-10 hidden">@_localizer["Login"]</button>
|
||||
}
|
||||
<!-- Username -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Username">@_localizer["Username"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Username" autocomplete="username" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionUsername"]</small>
|
||||
</div>
|
||||
<!-- Password -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Password">@_localizer["Password"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="Password" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionPassword"]</small>
|
||||
</div>
|
||||
<!-- Password Confirm-->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="PasswordConfirm">@_localizer["PasswordConfirm"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="password" asp-for="PasswordConfirm" autocomplete="new-password" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionPasswordConfirm"]</small>
|
||||
</div>
|
||||
<!-- 2FA -->
|
||||
<input type="hidden" id="hidden-use-two-fa" name="use2fa" value="true">
|
||||
<div class="form-row">
|
||||
<div class="form-field">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
<input type="checkbox" asp-for="Use2fa" class="enlightenment-checkbox-hidden" value="true" checked/>
|
||||
<span class="enlightenment-checkbox"></span>
|
||||
@_localizer["EnableTwoFactorAuthentication"]
|
||||
</label>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["Description2Fa"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<span id="register-two-fa-attention" class="invalid-feedback w-95 text-center hidden">@_localizer["DisclaimerTwoFactor"]</span>
|
||||
</div>
|
||||
<div class="form-row" style="justify-content: center;">
|
||||
<button type="submit" class="confirm-button h-22px">@_localizer["RegisterKey"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section registration success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="register-success" class="text-light-one w-100 hidden">@_localizer["AccountCreated"]</p>
|
||||
<img id="totp-image" class="w-200px h-200px h-align-m mx-auto mt-10 hidden" />
|
||||
<p id="totp-message" class="text-light-one w-100 hidden">@_localizer["ScanTotpCode"]</p>
|
||||
@if (User?.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
<button id="btn-login" type="button" class="confirm-button h-22px mx-auto mt-10 hidden">@_localizer["Login"]</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script type="text/javascript" data-form="@scriptId" defer>
|
||||
const btnLogin = document.getElementById('btn-login');
|
||||
document.getElementById('register-account-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
const form = event.target.closest('form');
|
||||
document.getElementById('register-account-form').addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
const form = e.target.closest('form');
|
||||
await handleRegisterAccount(form);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('register-account-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
await handleRegisterAccount(event.target);
|
||||
document.getElementById('register-account-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleRegisterAccount(e.target);
|
||||
});
|
||||
|
||||
async function handleRegisterAccount(form) {
|
||||
|
||||
@@ -19,118 +19,121 @@
|
||||
|
||||
@await Component.InvokeAsync("FileSystemBrowser")
|
||||
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px; margin-top: 1rem;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="add-media-library-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" asp-for="Id" value="@id" />
|
||||
<input type="hidden" asp-for="UserId" value="@Model.UserId"/>
|
||||
<div class="form-row">
|
||||
<h1 class="text-light-two w-100 text-center pt-0 pb-0 engraved-title">
|
||||
@(_localizer[id is not null ? "EditLibrary" : "AddNewLibrary"])
|
||||
</h1>
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<h3 class="text-light-two">@_localizer["GeneralInformation"]</h3>
|
||||
<!-- Title -->
|
||||
<div style="display: grid; grid-template-rows: auto 1fr;"><!--container with two rows, one fixed, one filling remaining space-->
|
||||
<div style="min-height: 1rem;"></div><!--the first row is a dummy row for "margin", because setting a margin on the next row would offset the parent's position-->
|
||||
<div class="enlightenment-panel shadow-effect p-2 mx-auto panel w-50 mb-10" style="min-width: 320px;">
|
||||
<div class="shine-effect"></div>
|
||||
<form method="post" id="add-media-library-form" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" asp-for="Id" value="@id" />
|
||||
<input type="hidden" asp-for="UserId" value="@Model.UserId"/>
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Title">@_localizer["Title"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Title" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionTitle"]</small>
|
||||
<h1 class="text-light-two w-100 text-center pt-0 pb-0 engraved-title">
|
||||
@(_localizer[id is not null ? "EditLibrary" : "AddNewLibrary"])
|
||||
</h1>
|
||||
</div>
|
||||
<!-- Library Type -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="LibraryType">@_localizer["LibraryType"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<div class="form-container">
|
||||
<h3 class="text-light-two">@_localizer["GeneralInformation"]</h3>
|
||||
<!-- Title -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="Title">@_localizer["Title"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input asp-for="Title" class="enlightenment-input" />
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionTitle"]</small>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<div class="enlightenment-combobox inline-block w-100">
|
||||
<div class="shine-effect" style="top: 1px;"></div>
|
||||
<input type="checkbox" class="enlightenment-toggle-checkbox" id="library-type" />
|
||||
<label class="enlightenment-toggle" for="library-type">
|
||||
<span id="library-selected-item" class="enlightenment-selected-text" data-value="@(Model.LibraryType ?? "Book")">@(Model.LibraryType ?? _localizer["Book"].Value)</span>
|
||||
</label>
|
||||
<div class="enlightenment-dropdown">
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">@_localizer["WrittenContent"]</div>
|
||||
<div class="enlightenment-option" data-value="Book">@_localizer["Book"]</div>
|
||||
<div class="enlightenment-option" data-value="EBook">@_localizer["EBook"]</div>
|
||||
<div class="enlightenment-option" data-value="BookSeries">@_localizer["BookSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="ComicBook">@_localizer["ComicBook"]</div>
|
||||
<div class="enlightenment-option" data-value="ComicSeries">@_localizer["ComicSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="Magazine">@_localizer["Magazine"]</div>
|
||||
<div class="enlightenment-option" data-value="Manga">@_localizer["Manga"]</div>
|
||||
<div class="enlightenment-option" data-value="GraphicNovel">@_localizer["GraphicNovel"]</div>
|
||||
<div class="enlightenment-option" data-value="AcademicPaper">@_localizer["AcademicPaper"]</div>
|
||||
<div class="enlightenment-option" data-value="SheetMusic">@_localizer["SheetMusic"]</div>
|
||||
<div class="enlightenment-option" data-value="Screenplay">@_localizer["Screenplay"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["VideoContent"]</div>
|
||||
<div class="enlightenment-option" data-value="TvShow">@_localizer["TvShow"]</div>
|
||||
<div class="enlightenment-option" data-value="Movie">@_localizer["Movie"]</div>
|
||||
<div class="enlightenment-option" data-value="FilmSeries">@_localizer["FilmSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="FilmFranchise">@_localizer["FilmFranchise"]</div>
|
||||
<div class="enlightenment-option" data-value="Concert">@_localizer["Concert"]</div>
|
||||
<div class="enlightenment-option" data-value="Documentary">@_localizer["Documentary"]</div>
|
||||
<div class="enlightenment-option" data-value="Tutorial">@_localizer["Tutorial"]</div>
|
||||
<div class="enlightenment-option" data-value="Personal">@_localizer["Personal"]</div>
|
||||
<div class="enlightenment-option" data-value="Anime">@_localizer["Anime"]</div>
|
||||
<div class="enlightenment-option" data-value="Youtube">@_localizer["Youtube"]</div>
|
||||
<div class="enlightenment-option" data-value="Videoclip">@_localizer["Videoclip"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["AudioContent"]</div>
|
||||
<div class="enlightenment-option" data-value="Music">@_localizer["Music"]</div>
|
||||
<div class="enlightenment-option" data-value="AudioBook">@_localizer["AudioBook"]</div>
|
||||
<div class="enlightenment-option" data-value="LivePerformance">@_localizer["LivePerformance"]</div>
|
||||
<div class="enlightenment-option" data-value="Interview">@_localizer["Interview"]</div>
|
||||
<div class="enlightenment-option" data-value="Cover">@_localizer["Cover"]</div>
|
||||
<div class="enlightenment-option" data-value="Remix">@_localizer["Remix"]</div>
|
||||
<div class="enlightenment-option" data-value="Soundeffect">@_localizer["Soundeffect"]</div>
|
||||
<div class="enlightenment-option" data-value="Podcast">@_localizer["Podcast"]</div>
|
||||
<div class="enlightenment-option" data-value="RadioShow">@_localizer["RadioShow"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["VisualContent"]</div>
|
||||
<div class="enlightenment-option" data-value="PhotoAlbum">@_localizer["PhotoAlbum"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["MiscellaneousContent"]</div>
|
||||
<div class="enlightenment-option last-option" data-value="Other">@_localizer["Other"]</div>
|
||||
<!-- Library Type -->
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="LibraryType">@_localizer["LibraryType"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<div class="enlightenment-combobox inline-block w-100">
|
||||
<div class="shine-effect" style="top: 1px;"></div>
|
||||
<input type="checkbox" class="enlightenment-toggle-checkbox" id="library-type" />
|
||||
<label class="enlightenment-toggle" for="library-type">
|
||||
<span id="library-selected-item" class="enlightenment-selected-text" data-value="@(Model.LibraryType ?? "Book")">@(Model.LibraryType ?? _localizer["Book"].Value)</span>
|
||||
</label>
|
||||
<div class="enlightenment-dropdown">
|
||||
<div class="shine-effect" style="top: -4px;"></div>
|
||||
<div class="enlightenment-option first-option disabled">@_localizer["WrittenContent"]</div>
|
||||
<div class="enlightenment-option" data-value="Book">@_localizer["Book"]</div>
|
||||
<div class="enlightenment-option" data-value="EBook">@_localizer["EBook"]</div>
|
||||
<div class="enlightenment-option" data-value="BookSeries">@_localizer["BookSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="ComicBook">@_localizer["ComicBook"]</div>
|
||||
<div class="enlightenment-option" data-value="ComicSeries">@_localizer["ComicSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="Magazine">@_localizer["Magazine"]</div>
|
||||
<div class="enlightenment-option" data-value="Manga">@_localizer["Manga"]</div>
|
||||
<div class="enlightenment-option" data-value="GraphicNovel">@_localizer["GraphicNovel"]</div>
|
||||
<div class="enlightenment-option" data-value="AcademicPaper">@_localizer["AcademicPaper"]</div>
|
||||
<div class="enlightenment-option" data-value="SheetMusic">@_localizer["SheetMusic"]</div>
|
||||
<div class="enlightenment-option" data-value="Screenplay">@_localizer["Screenplay"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["VideoContent"]</div>
|
||||
<div class="enlightenment-option" data-value="TvShow">@_localizer["TvShow"]</div>
|
||||
<div class="enlightenment-option" data-value="Movie">@_localizer["Movie"]</div>
|
||||
<div class="enlightenment-option" data-value="FilmSeries">@_localizer["FilmSeries"]</div>
|
||||
<div class="enlightenment-option" data-value="FilmFranchise">@_localizer["FilmFranchise"]</div>
|
||||
<div class="enlightenment-option" data-value="Concert">@_localizer["Concert"]</div>
|
||||
<div class="enlightenment-option" data-value="Documentary">@_localizer["Documentary"]</div>
|
||||
<div class="enlightenment-option" data-value="Tutorial">@_localizer["Tutorial"]</div>
|
||||
<div class="enlightenment-option" data-value="Personal">@_localizer["Personal"]</div>
|
||||
<div class="enlightenment-option" data-value="Anime">@_localizer["Anime"]</div>
|
||||
<div class="enlightenment-option" data-value="Youtube">@_localizer["Youtube"]</div>
|
||||
<div class="enlightenment-option" data-value="Videoclip">@_localizer["Videoclip"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["AudioContent"]</div>
|
||||
<div class="enlightenment-option" data-value="Music">@_localizer["Music"]</div>
|
||||
<div class="enlightenment-option" data-value="AudioBook">@_localizer["AudioBook"]</div>
|
||||
<div class="enlightenment-option" data-value="LivePerformance">@_localizer["LivePerformance"]</div>
|
||||
<div class="enlightenment-option" data-value="Interview">@_localizer["Interview"]</div>
|
||||
<div class="enlightenment-option" data-value="Cover">@_localizer["Cover"]</div>
|
||||
<div class="enlightenment-option" data-value="Remix">@_localizer["Remix"]</div>
|
||||
<div class="enlightenment-option" data-value="Soundeffect">@_localizer["Soundeffect"]</div>
|
||||
<div class="enlightenment-option" data-value="Podcast">@_localizer["Podcast"]</div>
|
||||
<div class="enlightenment-option" data-value="RadioShow">@_localizer["RadioShow"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["VisualContent"]</div>
|
||||
<div class="enlightenment-option" data-value="PhotoAlbum">@_localizer["PhotoAlbum"]</div>
|
||||
<div class="enlightenment-option disabled">@_localizer["MiscellaneousContent"]</div>
|
||||
<div class="enlightenment-option last-option" data-value="Other">@_localizer["Other"]</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionLibraryType"]</small>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionLibraryType"]</small>
|
||||
</div>
|
||||
<!-- Directories -->
|
||||
<div class="form-row mt-10">
|
||||
<div class="form-label">
|
||||
<label asp-for="ContentLocations">@_localizer["Directories"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<img src="~/images/ui/add-directory.svg" alt="@_localizer["AddDirectory"]" id="add-media-directory" title="@_localizer["AddDirectory"]" class="add-form-table-row-icon ml-5" />
|
||||
<!-- Directories -->
|
||||
<div class="form-row mt-10">
|
||||
<div class="form-label">
|
||||
<label asp-for="ContentLocations">@_localizer["Directories"]</label>
|
||||
<span class="mandatory-field">*</span>:
|
||||
<img src="~/images/ui/add-directory.svg" alt="@_localizer["AddDirectory"]" id="add-media-directory" title="@_localizer["AddDirectory"]" class="add-form-table-row-icon ml-5" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-table w-100">
|
||||
@for (int i = 0; i < Model.ContentLocations.Count; i++)
|
||||
{
|
||||
<div class="form-table-row">
|
||||
<span title="@Model.ContentLocations[i]">@Model.ContentLocations[i]</span>
|
||||
<img src="~/images/ui/delete.svg" alt="@_localizer["Remove"]" title="@_localizer["Remove"]" class="remove-form-table-row-icon" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionDirectories"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button type="submit" class="confirm-button w-100px">@_localizer["Save"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-table w-100">
|
||||
@for (int i = 0; i < Model.ContentLocations.Count; i++)
|
||||
{
|
||||
<div class="form-table-row">
|
||||
<span title="@Model.ContentLocations[i]">@Model.ContentLocations[i]</span>
|
||||
<img src="~/images/ui/delete.svg" alt="@_localizer["Remove"]" title="@_localizer["Remove"]" class="remove-form-table-row-icon" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionDirectories"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<button type="submit" class="confirm-button w-100px">@_localizer["Save"]</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="save-success" class="text-light-one w-100 hidden">@_localizer["LibrarySaved"]</p>
|
||||
<button id="btn-back-to-libraries" type="button" class="abort-button h-22px w-150px mx-auto mt-10 hidden">@_localizer["BackToLibraries"]</button>
|
||||
<button id="btn-add-new-library" type="button" class="confirm-button h-22px w-150px mx-auto mt-10 hidden">@_localizer["AddNewLibrary"]</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- section success -->
|
||||
<div class="text-center w-100">
|
||||
<p id="save-success" class="text-light-one w-100 hidden">@_localizer["LibrarySaved"]</p>
|
||||
<button id="btn-back-to-libraries" type="button" class="abort-button h-22px w-150px mx-auto mt-10 hidden">@_localizer["BackToLibraries"]</button>
|
||||
<button id="btn-add-new-library" type="button" class="confirm-button h-22px w-150px mx-auto mt-10 hidden">@_localizer["AddNewLibrary"]</button>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@@ -138,18 +141,18 @@
|
||||
const saveSuccess = document.getElementById('save-success');
|
||||
const btnBackToLibraries = document.getElementById('btn-back-to-libraries');
|
||||
const btnAddNewLibrary = document.getElementById('btn-add-new-library');
|
||||
const form = document.getElementById('add-media-library-form');
|
||||
|
||||
document.getElementById('add-media-library-form').addEventListener('keypress', async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
const form = event.target.closest('form');
|
||||
await handleAddMediaLibrary(form);
|
||||
form.addEventListener('keypress', async (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
await handleAddMediaLibrary(e.target.closest('form'));
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('add-media-library-form').addEventListener('submit', async (event) => {
|
||||
event.preventDefault();
|
||||
await handleAddMediaLibrary(event.target);
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
await handleAddMediaLibrary(e.target);
|
||||
});
|
||||
|
||||
async function handleAddMediaLibrary(form) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
@await Html.PartialAsync("_NavMenu")
|
||||
</header>
|
||||
<main role="main" style="@(User?.Identity?.IsAuthenticated == false ? "bottom: 0px;" : string.Empty)">
|
||||
<article>
|
||||
<article class="h-100"> <!--needs to be 100% height so that child pages that require full height as well, can stretch-->
|
||||
@RenderBody()
|
||||
<div id="modal-background-article"></div>
|
||||
</article>
|
||||
@@ -47,6 +47,11 @@
|
||||
<!--Modal grid background-->
|
||||
<div id="modal-background-menu"></div>
|
||||
|
||||
<script>
|
||||
var jsLocalizedMessages = {
|
||||
navigationFailed: '@_localizer["NavigationFailed"]',
|
||||
};
|
||||
</script>
|
||||
<script defer src="~/js/notifications.js" asp-append-version="true"></script>
|
||||
<script defer src="~/js/site.js" asp-append-version="true"></script>
|
||||
<div data-section="scripts">
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
@using Lumina.Presentation.Web.Common.Authorization
|
||||
@using Lumina.Presentation.Web.Common.Enums.Authorization
|
||||
@using Lumina.Presentation.Web.Common.Services
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@using System.Threading
|
||||
|
||||
@inject IUrlService _urlService
|
||||
@inject IViewLocalizer _localizer
|
||||
@inject IAuthorizationService _auth
|
||||
|
||||
<input type="checkbox" id="hamburger-input" class="burger-shower" />
|
||||
<label id="hamburger-menu" for="hamburger-input">
|
||||
@@ -33,6 +37,16 @@
|
||||
</ul>
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
@if (await _auth.IsInRoleAsync("Admin", CancellationToken.None))
|
||||
{
|
||||
<div class="mobile-menu-heading">
|
||||
@_localizer["Administrator"]
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("ManageRoles", "Admin")" class="nav-link"><span>@_localizer["ManageRoles"]</span></a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("ManagePermissions", "Admin")" class="nav-link"><span>@_localizer["ManagePermissions"]</span></a></li>
|
||||
</ul>
|
||||
}
|
||||
<div class="mobile-menu-heading">
|
||||
@_localizer["Library"]
|
||||
</div>
|
||||
@@ -120,6 +134,18 @@
|
||||
</li>
|
||||
@if (User?.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
@if (await _auth.IsInRoleAsync("Admin", CancellationToken.None))
|
||||
{
|
||||
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="administrator-menu" name="menu">
|
||||
<label for="administrator-menu">@_localizer["Administrator"]</label>
|
||||
<ul>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("ManageRoles", "Admin")" class="nav-link">@_localizer["ManageRoles"]</a></li>
|
||||
<li><a href="@_urlService.GetAbsoluteUrl("ManagePermissions", "Admin")" class="nav-link">@_localizer["ManagePermissions"]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
<li tabindex="0">
|
||||
<input type="radio" id="library-menu" name="menu">
|
||||
<label for="library-menu">@_localizer["Library"]</label>
|
||||
|
||||
@@ -176,15 +176,15 @@ main {
|
||||
}
|
||||
|
||||
.transparent {
|
||||
background-color: transparent;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
border: 0px;
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
.no-underline {
|
||||
text-decoration: none;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
@@ -272,6 +272,13 @@ main {
|
||||
text-shadow: var(--highlight-color) 2px 2px 2px;
|
||||
}
|
||||
|
||||
.inset-panel {
|
||||
border-top: #000 1px solid;
|
||||
border-left: #000 1px solid;
|
||||
border-right: #777 1px solid;
|
||||
border-bottom: #999 1px solid;
|
||||
}
|
||||
|
||||
.engraved-panel {
|
||||
background-color: #00000033;
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -417,7 +417,7 @@ function renderAddressBar(pathSegments) {
|
||||
/**
|
||||
* Handle the change event for the comboboxes inside the path-segments.
|
||||
* This function is triggered when any of the comboboxes (checkboxes) in the navigation bar is toggled.
|
||||
* @param {Event} event - The change event object.
|
||||
* @param {Event} e - The change event object.
|
||||
*/
|
||||
async function handlePathSegmentComboboxChangeAsync(e) {
|
||||
// ensure the event was triggered by an element with the 'navigator-toggle-checkbox' class
|
||||
@@ -961,7 +961,7 @@ async function handleFileSystemEntityMouseUpAsync(e) {
|
||||
|
||||
/**
|
||||
* Handler for the mouse down event of file system browser dialog files and directories elements.
|
||||
* @param {any} event
|
||||
* @param {MouseEvent} e - The mouse event whose propagation is stopped.
|
||||
*/
|
||||
function handleFileSystemEntityMouseDown(e) {
|
||||
// stop the event from bubbling up to the explorer - we dont want to start selection rectangles when clicking files or directories
|
||||
|
||||
@@ -95,6 +95,110 @@ async function callApiPostAsync(url, data, options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a PUT request to the specified API endpoint.
|
||||
* @param {string} url - The API endpoint URL.
|
||||
* @param {Object} data - The data to send in the request body.
|
||||
* @param {Object} [options] - Additional options for the request.
|
||||
* @param {boolean} [options.useAntiForgery=true] - Whether to include anti-forgery token.
|
||||
* @param {Object} [options.headers] - Additional headers to include.
|
||||
* @returns {Promise<any>} The response data if successful, undefined otherwise.
|
||||
*/
|
||||
async function callApiPutAsync(url, data, options = {}) {
|
||||
const defaultOptions = {
|
||||
useAntiForgery: true,
|
||||
headers: {}
|
||||
};
|
||||
const finalOptions = { ...defaultOptions, ...options };
|
||||
try {
|
||||
// prepare headers
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
...finalOptions.headers
|
||||
};
|
||||
// add anti-forgery token if enabled
|
||||
if (finalOptions.useAntiForgery) {
|
||||
const token = document.querySelector('input[name="__RequestVerificationToken"]')?.value;
|
||||
if (token)
|
||||
headers['RequestVerificationToken'] = token;
|
||||
}
|
||||
// make the request
|
||||
const response = await fetch(url, {
|
||||
method: 'PUT',
|
||||
headers: headers,
|
||||
body: JSON.stringify(data)
|
||||
});
|
||||
if (response.redirected) // if a redirect is requested, perform it
|
||||
window.location.href = response.url;
|
||||
else {
|
||||
if (!response.ok)
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
const jsonResponse = await response.json();
|
||||
if (jsonResponse.success) {
|
||||
if (jsonResponse.message)
|
||||
notificationService.show(jsonResponse.message, NotificationType.SUCCESS);
|
||||
return jsonResponse.data;
|
||||
}
|
||||
else
|
||||
notificationService.show(jsonResponse.errorMessage, NotificationType.ERROR);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
notificationService.show(error, NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE request to the specified API endpoint.
|
||||
* @param {string} url - The API endpoint URL.
|
||||
* @param {Object} [options] - Additional options for the request.
|
||||
* @param {boolean} [options.useAntiForgery=true] - Whether to include anti-forgery token.
|
||||
* @param {Object} [options.headers] - Additional headers to include.
|
||||
* @returns {Promise<any>} The response data if successful, undefined otherwise.
|
||||
*/
|
||||
async function callApiDeleteAsync(url, options = {}) {
|
||||
const defaultOptions = {
|
||||
useAntiForgery: true,
|
||||
headers: {}
|
||||
};
|
||||
const finalOptions = { ...defaultOptions, ...options };
|
||||
try {
|
||||
// prepare headers
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
...finalOptions.headers
|
||||
};
|
||||
// add anti-forgery token if enabled
|
||||
if (finalOptions.useAntiForgery) {
|
||||
const token = document.querySelector('input[name="__RequestVerificationToken"]')?.value;
|
||||
if (token)
|
||||
headers['RequestVerificationToken'] = token;
|
||||
}
|
||||
// make the request
|
||||
const response = await fetch(url, {
|
||||
method: 'DELETE',
|
||||
headers: headers
|
||||
});
|
||||
if (response.redirected) // if a redirect is requested, perform it
|
||||
window.location.href = response.url;
|
||||
else {
|
||||
if (!response.ok)
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
const jsonResponse = await response.json();
|
||||
if (jsonResponse.success) {
|
||||
if (jsonResponse.message)
|
||||
notificationService.show(jsonResponse.message, NotificationType.SUCCESS);
|
||||
return jsonResponse.success;
|
||||
}
|
||||
else
|
||||
notificationService.show(jsonResponse.errorMessage, NotificationType.ERROR);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
notificationService.show(error, NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
//+======================================================================================+
|
||||
//| Website navigation |
|
||||
//+======================================================================================+
|
||||
@@ -224,9 +328,9 @@ async function updateContent(url, addToHistory) {
|
||||
newScript.textContent = `
|
||||
(function() {
|
||||
const safeGetElement = (id) => document.getElementById(id);
|
||||
const safeAddEventListener = (element, event, handler) => {
|
||||
const safeAddEventListener = (element, e, handler) => {
|
||||
if (element)
|
||||
element.addEventListener(event, handler);
|
||||
element.addEventListener(e, handler);
|
||||
};
|
||||
${script.textContent}
|
||||
})();
|
||||
@@ -251,7 +355,7 @@ async function updateContent(url, addToHistory) {
|
||||
history.pushState(state, title, url);
|
||||
}
|
||||
} catch (error) {
|
||||
notificationService.show('Navigation failed', NotificationType.ERROR);
|
||||
notificationService.show(jsLocalizedMessages.navigationFailed, NotificationType.ERROR);
|
||||
console.error('Navigation failed:', error);
|
||||
}
|
||||
}
|
||||
@@ -417,11 +521,11 @@ function getScrollbarWidth() {
|
||||
|
||||
/**
|
||||
* Handles the wheel event for horizontal scrolling.
|
||||
* @param {WheelEvent} event - The wheel event object.
|
||||
* @param {WheelEvent} e - The wheel event object.
|
||||
*/
|
||||
const scrollHandler = function (event) {
|
||||
event.preventDefault();
|
||||
this.scrollLeft += (event.deltaY > 0 ? 1 : -1) * 80;
|
||||
const scrollHandler = function (e) {
|
||||
e.preventDefault();
|
||||
this.scrollLeft += (e.deltaY > 0 ? 1 : -1) * 80;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user