Skip to content

Commit

Permalink
Merge pull request #680 from neozhu/fixpubliclayou
Browse files Browse the repository at this point in the history
Update PublicLayout.razor
  • Loading branch information
neozhu committed May 3, 2024
2 parents 8a46014 + b499d70 commit 7966f86
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions src/Server.UI/Components/Shared/Layout/PublicLayout.razor
Expand Up @@ -60,13 +60,31 @@
</MudHidden>
<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
<LanguageSelector/>
<MudTooltip Text="@L["Login"]">
<MudButton Variant="Variant.Text" Href="/pages/authentication/login"
StartIcon="@Icons.Material.Rounded.Login"
Style="text-transform:none">
@L["Login"]
</MudButton>
</MudTooltip>
<AuthorizeView>
<Authorized>
<form action="@IdentityComponentsEndpointRouteBuilderExtensions.Logout" method="post">
<AntiforgeryToken />
<input type="hidden" name="ReturnUrl" value="/" />
<MudTooltip Text="@L["Logout"]">
<MudButton Style="text-transform:none"
ButtonType="ButtonType.Submit"
Variant="Variant.Text"
StartIcon="@Icons.Material.Filled.Logout">
@L["Logout"]
</MudButton>
</MudTooltip>
</form>
</Authorized>
<NotAuthorized>
<MudTooltip Text="@L["Login"]">
<MudButton Variant="Variant.Text" Href="/pages/authentication/login"
StartIcon="@Icons.Material.Rounded.Login"
Style="text-transform:none">
@L["Login"]
</MudButton>
</MudTooltip>
</NotAuthorized>
</AuthorizeView>
</MudHidden>
</MudAppBar>
<MudMainContent>
Expand Down

0 comments on commit 7966f86

Please sign in to comment.