diff --git a/DiunaBI.UI.Shared/MainLayout.razor b/DiunaBI.UI.Shared/MainLayout.razor index 07317b6..f3fe399 100644 --- a/DiunaBI.UI.Shared/MainLayout.razor +++ b/DiunaBI.UI.Shared/MainLayout.razor @@ -1,4 +1,6 @@ @using MudBlazor +@using DiunaBI.UI.Shared.Services +@inject AppConfig AppConfig @inherits LayoutComponentBase @@ -16,7 +18,7 @@ OnClick="ToggleDrawer" Class="mud-hidden-md-up"/> - DiunaBI + @AppConfig.AppName () ?? new AppConfig(); +builder.Services.AddSingleton(appConfig); + builder.Services.AddScoped(); var app = builder.Build(); diff --git a/DiunaBI.UI.Web/appsettings.Production.json b/DiunaBI.UI.Web/appsettings.Production.json index 43538aa..2ce55b3 100644 --- a/DiunaBI.UI.Web/appsettings.Production.json +++ b/DiunaBI.UI.Web/appsettings.Production.json @@ -12,5 +12,8 @@ "Url": "http://0.0.0.0:7143" } } + }, + "App": { + "AppName": "DiunaBI" } } \ No newline at end of file diff --git a/DiunaBI.UI.Web/appsettings.json b/DiunaBI.UI.Web/appsettings.json index 0b4b50d..1ef5b0f 100644 --- a/DiunaBI.UI.Web/appsettings.json +++ b/DiunaBI.UI.Web/appsettings.json @@ -6,5 +6,8 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "App": { + "AppName": "DiunaBI" + } } \ No newline at end of file