Implement Appsettings
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<nav class="flex-column">
|
||||
<div class="nav-logo"></div>
|
||||
<div class="d-flex px-3 justify-content-center text-center font-weight-bold">
|
||||
Einarbeitungen<br />
|
||||
@(AppSettings.SidebarTitle ?? AppSettings.Title)
|
||||
</div>
|
||||
<div class="row px-3">
|
||||
<div class="col">
|
||||
<div class="nav-item">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using FoodsharingSiegen.Contracts.Model;
|
||||
using FoodsharingSiegen.Server.Auth;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Shared
|
||||
{
|
||||
@@ -11,10 +13,11 @@ namespace FoodsharingSiegen.Server.Shared
|
||||
{
|
||||
#region Dependencies
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the auth service (ab)
|
||||
/// </summary>
|
||||
[Inject] protected AuthService AuthService { get; set; } = null!;
|
||||
[Inject]
|
||||
private IOptions<AppSettings> AppSettingsContainer { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected AuthService AuthService { get; set; } = null!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -27,6 +30,14 @@ namespace FoodsharingSiegen.Server.Shared
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// Provides application-specific settings used to configure the behavior and display of the application.
|
||||
/// The AppSettings class encapsulates information such as the application title and other configurable parameters.
|
||||
protected AppSettings AppSettings => AppSettingsContainer.Value;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnInitializedAsync
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user