Skip to content

Commit

Permalink
feat(blazor): confgure html element identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 10, 2022
1 parent 70e3279 commit c6ebaa9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/Aguacongas.TheIdServer.BlazorApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) 2022 @Olivier Lefebvre
using Aguacongas.TheIdServer.BlazorApp;
using Aguacongas.TheIdServer.BlazorApp.Models;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.JSInterop;
using System.Globalization;
Expand All @@ -12,7 +13,9 @@
var settings = configuration.Get<Settings>();
if (settings?.Prerendered == false)
{
builder.RootComponents.Add<App>("app");
var rootComponents = builder.RootComponents;
rootComponents.Add<App>(settings.HostElementIdentifier);
rootComponents.Add<HeadOutlet>("head::after");
}

var host = builder.Build();
Expand Down
4 changes: 0 additions & 4 deletions src/Aguacongas.TheIdServer/Models/HostModelOptions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Project: Aguafrommars/TheIdServer
// Copyright (c) 2022 @Olivier Lefebvre
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Aguacongas.TheIdServer.Models
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class Settings
public string AdministratorEmail { get; set; }
public string WelcomeContenUrl { get; set; }
public bool Prerendered { get; set; }

public string HostElementIdentifier { get; set; } = "app";
}

public class LoggingOptions
Expand Down

0 comments on commit c6ebaa9

Please sign in to comment.