Translate login and logout pages

This commit is contained in:
jvyden 2022-07-26 17:01:48 -04:00
commit 443b285253
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
9 changed files with 132 additions and 13 deletions

View file

@ -1,10 +1,11 @@
@page "/login"
@using LBPUnion.ProjectLighthouse.Configuration
@using LBPUnion.ProjectLighthouse.Localization.StringLists
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.LoginForm
@{
Layout = "Layouts/BaseLayout";
Model.Title = "Log in";
Model.Title = Model.Translate(GeneralStrings.LogIn);
}
<script src="https://geraintluff.github.io/sha256/sha256.min.js"></script>
@ -29,7 +30,7 @@
{
<div class="ui negative message">
<div class="header">
Uh oh!
@Model.Translate(GeneralStrings.Error)
</div>
<p style="white-space: pre-line">@Model.Error</p>
</div>
@ -40,17 +41,17 @@
<input type="hidden" id="redirect" name="redirect">
<div class="field">
<label>Username</label>
<label>@Model.Translate(GeneralStrings.Username)</label>
<div class="ui left icon input">
<input type="text" name="username" id="text" placeholder="Username">
<input type="text" name="username" id="text" placeholder="@Model.Translate(GeneralStrings.Username)">
<i class="user icon"></i>
</div>
</div>
<div class="field">
<label>Password</label>
<label>@Model.Translate(GeneralStrings.Password)</label>
<div class="ui left icon input">
<input type="password" id="password" placeholder="Password">
<input type="password" id="password" placeholder="@Model.Translate(GeneralStrings.Password)">
<input type="hidden" id="password-submit" name="password">
<i class="lock icon"></i>
</div>
@ -62,13 +63,13 @@
}
<div class="row">
<input type="submit" value="Log in" id="submit" class="ui blue button">
<input type="submit" value="@Model.Translate(GeneralStrings.LogIn)" id="submit" class="ui blue button">
@if (ServerConfiguration.Instance.Authentication.RegistrationEnabled)
{
<a href="/register">
<div class="ui button">
<i class="user alternate add icon"></i>
Register
@Model.Translate(GeneralStrings.Register)
</div>
</a>
}
@ -76,7 +77,7 @@
<br/>
<a href="/passwordResetRequest">
<div class="ui button">
Forgot Password?
@Model.Translate(GeneralStrings.ForgotPassword)
</div>
</a>
</form>

View file

@ -1,10 +1,16 @@
@page "/logout"
@using LBPUnion.ProjectLighthouse.Localization.StringLists
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.LogoutPage
@{
Layout = "Layouts/BaseLayout";
Model.Title = "Logged out";
Model.Title = Model.Translate(LoggedOutStrings.LoggedOut);
}
<p>You have been successfully logged out. You will be redirected in 5 seconds, or you may click <a href="/">here</a> to do so manually.</p>
<p>@Model.Translate(LoggedOutStrings.LoggedOutInfo)</p>
<a href="/" class="ui blue button">
@Model.Translate(LoggedOutStrings.Redirect)
</a>
<meta http-equiv="refresh" content="5; url=/"/>