Add translator web ui

This commit is contained in:
2025-05-16 22:16:11 +02:00
parent f39d936024
commit 218389ae06
18 changed files with 455 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
using MudBlazor.Services;
using PoyoLang.Translator;
using PoyoLang.Translator.Web.Components;
var builder = WebApplication.CreateBuilder(args);
// Add MudBlazor services
builder.Services.AddMudServices();
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddSingleton<PoyoLangTranslator>();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseAntiforgery();
app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();