From 7171f2728e6ebf7226d3878d6208312b9f9023c3 Mon Sep 17 00:00:00 2001 From: KristofferStrube Date: Sun, 24 Sep 2023 16:25:23 +0200 Subject: [PATCH] Added link to source code from demo. --- Blazor.WebAuthentication.sln | 2 +- .../Shared/MainLayout.razor | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Blazor.WebAuthentication.sln b/Blazor.WebAuthentication.sln index 0d33ecd..af1b295 100644 --- a/Blazor.WebAuthentication.sln +++ b/Blazor.WebAuthentication.sln @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KristofferStrube.Blazor.Cre EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KristofferStrube.Blazor.WebAuthentication", "src\KristofferStrube.Blazor.WebAuthentication\KristofferStrube.Blazor.WebAuthentication.csproj", "{A696790A-5532-4C70-9FE0-57892698BDAF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KristofferStrube.Blazor.WebAuthentication.BlazorExample", "samples\KristofferStrube.Blazor.WebAuthentication.BlazorExample\KristofferStrube.Blazor.WebAuthentication.BlazorExample.csproj", "{9811E16F-3101-45B3-B3AA-304A1391F0A0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KristofferStrube.Blazor.WebAuthentication.WasmExample", "samples\KristofferStrube.Blazor.WebAuthentication.WasmExample\KristofferStrube.Blazor.WebAuthentication.WasmExample.csproj", "{9811E16F-3101-45B3-B3AA-304A1391F0A0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Shared/MainLayout.razor b/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Shared/MainLayout.razor index 7cd63fe..6a2a91a 100644 --- a/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Shared/MainLayout.razor +++ b/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Shared/MainLayout.razor @@ -1,4 +1,5 @@ @inherits LayoutComponentBase +@inject NavigationManager NavigationManager
+ +@code { + private string relativeUri => NavigationManager.ToBaseRelativePath(NavigationManager.Uri); + + protected string page => (string.IsNullOrEmpty(relativeUri) ? "Index" : relativeUri) + ".razor"; +} \ No newline at end of file