LearnChineseSimplified/LearningChineseFixed/Client/Program.cs

31 lines
1.1 KiB
C#
Raw Normal View History

2023-06-28 22:03:48 +02:00
using LearningChineseFixed;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor;
using Blazored.LocalStorage;
using MudBlazor.Services;
namespace LearningChineseFixed
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddMudServices(config =>
{
config.SnackbarConfiguration.ShowTransitionDuration = 100;
config.SnackbarConfiguration.HideTransitionDuration = 100;
2023-06-29 10:28:51 +02:00
config.SnackbarConfiguration.VisibleStateDuration = 3000;
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
2023-06-28 22:03:48 +02:00
});
builder.Services.AddBlazoredLocalStorage();
await builder.Build().RunAsync();
}
}
}