Skip to content

Commit

Permalink
add logout button to login 2fa page
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Nov 3, 2023
1 parent 4503fdc commit 24a258d
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions KratosSelfService/Views/Login/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@
@{
ViewData["Title"] = OryTranslator.Get("login.title");
Layout = "_CardLayout";
var is2Fa = Model.flow.Ui.Messages?.All(text => text.Id == 1010004) ?? false;
}

<h1 class="title has-text-centered">@OryTranslator.Get("login.title")</h1>
<p class="has-text-centered">
@OryTranslator.Get("login.registration-label")
<a href="@Model.signupUrl">
@OryTranslator.Get("login.registration-button")
</a>
</p>
@if (is2Fa)
{
<p class="has-text-centered mt-3">
@OryTranslator.Get("login.logout-label") <a href="">@OryTranslator.Get("login.logout-button")</a>
</p>
} else
{
<p class="has-text-centered">
@OryTranslator.Get("login.registration-label")
<a href="@Model.signupUrl">
@OryTranslator.Get("login.registration-button")
</a>
</p>
}
<hr/>
<div class="mb-5">
<div class="mb-2">
@await Component.InvokeAsync("KratosUiTextMessages", Model.flow.Ui.Messages)

@await Component.InvokeAsync("KratosUi", new KratosUiModel(
Expand All @@ -21,19 +30,22 @@
Model.forgotPasswordUrl))
</div>

<!--<div class="field separator">Or sign in with</div>
<div class="field">
<div class="columns is-mobile is-multiline">
@for (var i = 0; i < 1; i++)
{
<div class="column is-one-third">
<a class="button is-fullwidth">
<span class="icon">
<i class="fab fa-google"></i>
</span>
<span>Google</span>
</a>
</div>
}
</div>
</div>-->
@if (!is2Fa)
{
<!--<div class="field separator">Or sign in with</div>
<div class="field">
<div class="columns is-mobile is-multiline">
@for (var i = 0; i < 1; i++)
{
<div class="column is-one-third">
<a class="button is-fullwidth">
<span class="icon">
<i class="fab fa-google"></i>
</span>
<span>Google</span>
</a>
</div>
}
</div>
</div>-->
}

0 comments on commit 24a258d

Please sign in to comment.