85 lines
3.8 KiB
Plaintext
85 lines
3.8 KiB
Plaintext
@using Microsoft.AspNetCore.Hosting
|
|
@using Microsoft.AspNetCore.Mvc.ViewEngines
|
|
@using Microsoft.AspNetCore.Components.Web
|
|
@namespace WebDoorCreator.UI.Pages
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@inject IWebHostEnvironment Environment
|
|
@inject ICompositeViewEngine Engine
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>@ViewData["Title"] - WebDoorCreator.UI</title>
|
|
<link rel="stylesheet" href="~/lib/bootstrap-icons/font/bootstrap-icons.min.css" />
|
|
<link rel="stylesheet" href="~/lib/font-awesome/css/all.min.css" />
|
|
<link rel="shortcut icon" href="images/favicon.ico" />
|
|
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
|
|
<link rel="stylesheet" href="~/css/site.min.css" />
|
|
<link rel="stylesheet" href="~/WebDoorCreator.UI.styles.css" />
|
|
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
|
|
|
|
<environment include="Development">
|
|
<link rel="stylesheet" href="~/Identity/lib/bootstrap/dist/css/bootstrap.css" />
|
|
<link rel="stylesheet" href="~/Identity/css/site.css" />
|
|
</environment>
|
|
<environment exclude="Development">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"
|
|
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous"
|
|
asp-fallback-href="~/Identity/lib/bootstrap/dist/css/bootstrap.min.css"
|
|
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
|
<link rel="stylesheet" href="~/Identity/css/site.css" asp-append-version="true" />
|
|
</environment>
|
|
</head>
|
|
<body>
|
|
<div id="blazor-error-ui">
|
|
<environment include="Staging,Production">
|
|
An error has occurred. This application may no longer respond until reloaded.
|
|
</environment>
|
|
<environment include="Development">
|
|
An unhandled exception has occurred. See browser dev tools for details.
|
|
</environment>
|
|
<a href="" class="reload">Reload</a>
|
|
<a class="dismiss">🗙</a>
|
|
</div>
|
|
<div class="px-4">
|
|
@RenderBody()
|
|
</div>
|
|
|
|
<script src="~/Identity/lib/jquery/dist/jquery.min.js"></script>
|
|
<script src="~/lib/bootstrap/js/bootstrap.bundle.js"></script>
|
|
<script src="~/Identity/js/site.js" asp-append-version="true"></script>
|
|
<script src="~/lib/SiteHelper.js" asp-append-version="true"></script>
|
|
|
|
<script src="_framework/blazor.server.js" autostart="false"></script>
|
|
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
|
|
<script>
|
|
Blazor.start({
|
|
reconnectionOptions: {
|
|
maxRetries: 600,
|
|
retryIntervalMilliseconds: 1000
|
|
},
|
|
reconnectionHandler: {
|
|
onConnectionDown: (options, error) => console.error(error),
|
|
onConnectionUp: () => console.log("Client reconnected!")
|
|
}
|
|
}).then(() => {
|
|
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
|
|
get() {
|
|
return this.__reconnectionDisplay;
|
|
},
|
|
set(value) {
|
|
this.__reconnectionDisplay = {
|
|
show: () => value.show(),
|
|
update: (d) => value.update(d),
|
|
rejected: (d) => document.location.reload()
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@await RenderSectionAsync("Scripts", required: false)
|
|
</body>
|
|
</html>
|