Update launchSettings with boolean launchBrowser, add LayoutLib namespace for MainLayout, fix app initialization

This commit is contained in:
2026-08-08 18:04:53 +03:00
parent 06972a5764
commit aef74182ff
2 changed files with 21 additions and 28 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
@using LayoutLib
@if (_isLoaded)
{
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] {
typeof(ECommerce.Module.Components.Pages.Shop.Shop).Assembly
}">
}">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
@@ -16,7 +18,7 @@
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
<div class="p-4 text-white">404 - Page not found at @DateTime.Now</div>
</LayoutView>
</NotFound>
</Router>
@@ -24,8 +26,8 @@
}
else
{
<div>Loading translations...</div>
}
<div class="text-white">Loading translations... @DateTime.Now</div>
}
@code {
private bool _isLoaded;
+15 -24
View File
@@ -1,25 +1,16 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:2004",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7062;http://localhost:5055",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"UI": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "http://localhost:2004",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:2004",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}