|
|
@ -13,6 +13,7 @@ using Microsoft.Extensions.Options;
|
|
|
|
using Microsoft.Net.Http.Headers;
|
|
|
|
using Microsoft.Net.Http.Headers;
|
|
|
|
using adminBlazor.Models;
|
|
|
|
using adminBlazor.Models;
|
|
|
|
using adminBlazor;
|
|
|
|
using adminBlazor;
|
|
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -29,8 +30,6 @@ builder.Services.AddRazorPages();
|
|
|
|
builder.Services.AddScoped<IDataService, DataApiService>();
|
|
|
|
builder.Services.AddScoped<IDataService, DataApiService>();
|
|
|
|
builder.Services.AddScoped<IDataService, DataLocalService>();
|
|
|
|
builder.Services.AddScoped<IDataService, DataLocalService>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddScoped<IVocListService, VocListLocalService>();
|
|
|
|
builder.Services.AddScoped<IVocListService, VocListLocalService>();
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddOptions();
|
|
|
|
builder.Services.AddOptions();
|
|
|
@ -51,7 +50,7 @@ builder.Services.AddControllers();
|
|
|
|
// Add the localization to the app and specify the resources path
|
|
|
|
// Add the localization to the app and specify the resources path
|
|
|
|
builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; });
|
|
|
|
builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; });
|
|
|
|
|
|
|
|
|
|
|
|
// Configure the localtization
|
|
|
|
// Configure the localization
|
|
|
|
builder.Services.Configure<RequestLocalizationOptions>(options =>
|
|
|
|
builder.Services.Configure<RequestLocalizationOptions>(options =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Set the default culture of the web site
|
|
|
|
// Set the default culture of the web site
|
|
|
@ -62,13 +61,14 @@ builder.Services.AddControllers();
|
|
|
|
options.SupportedUICultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("fr-FR") };
|
|
|
|
options.SupportedUICultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("fr-FR") };
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services
|
|
|
|
builder.Services
|
|
|
|
.AddBlazorise()
|
|
|
|
.AddBlazorise()
|
|
|
|
.AddBootstrapProviders()
|
|
|
|
.AddBootstrapProviders()
|
|
|
|
.AddFontAwesomeIcons();
|
|
|
|
.AddFontAwesomeIcons();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
@ -104,4 +104,3 @@ builder.Services.AddControllers();
|
|
|
|
app.MapFallbackToPage("/_Host");
|
|
|
|
app.MapFallbackToPage("/_Host");
|
|
|
|
|
|
|
|
|
|
|
|
app.Run();
|
|
|
|
app.Run();
|
|
|
|
|
|
|
|
|
|
|
|