-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
759 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package index | ||
|
||
import "time" | ||
|
||
type Progress struct { | ||
RemainingTime time.Duration | ||
Percentage float64 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 25 additions & 27 deletions
52
internal/webserver/embedded/views/auth/edit-password.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
<div class="container mt-5 text-start"> | ||
<h2 class="pb-5">{{t .Lang "Set new password"}}</h2> | ||
<form method="post" action="/{{.Lang}}/reset-password"> | ||
<div class="mb-3"> | ||
<label for="password" class="form-label">{{t .Lang "New password"}}</label> | ||
<input type="password" name="password" | ||
class='form-control {{if ne (index .Errors "password") ""}}is-invalid{{end}}' id="password" | ||
required="required" minlength="{{.MinPasswordLength}}"> | ||
{{if ne (index .Errors "password") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.password}} | ||
</div> | ||
{{end}} | ||
<h2 class="pb-5">{{t .Lang "Set new password"}}</h2> | ||
<form method="post" action="/{{.Lang}}/reset-password"> | ||
<div class="mb-3"> | ||
<label for="password" class="form-label">{{t .Lang "New password"}}</label> | ||
<input type="password" name="password" | ||
class='form-control {{if ne (index .Errors "password") ""}}is-invalid{{end}}' id="password" | ||
required="required" minlength="{{.MinPasswordLength}}"> | ||
{{if ne (index .Errors "password") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.password}} | ||
</div> | ||
<div class="mb-3"> | ||
<label for="confirm-password" class="form-label">{{t .Lang "Confirm new password"}}</label> | ||
<input type="password" name="confirm-password" | ||
class='form-control {{if ne (index .Errors "confirmpassword") ""}}is-invalid{{end}}' | ||
id="confirm-password" required="required" minlength="{{.MinPasswordLength}}"> | ||
{{if ne (index .Errors "confirmpassword") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.confirmpassword}} | ||
</div> | ||
{{end}} | ||
{{end}} | ||
</div> | ||
<div class="mb-3"> | ||
<label for="confirm-password" class="form-label">{{t .Lang "Confirm new password"}}</label> | ||
<input type="password" name="confirm-password" | ||
class='form-control {{if ne (index .Errors "confirmpassword") ""}}is-invalid{{end}}' | ||
id="confirm-password" required="required" minlength="{{.MinPasswordLength}}"> | ||
{{if ne (index .Errors "confirmpassword") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.confirmpassword}} | ||
</div> | ||
<input type="hidden" name="id" value="{{.Uuid}}"> | ||
<button type="submit" class="btn btn-primary">{{t .Lang "Update"}}</button> | ||
</form> | ||
</div> | ||
{{end}} | ||
</div> | ||
<input type="hidden" name="id" value="{{.Uuid}}"> | ||
<button type="submit" class="btn btn-primary">{{t .Lang "Update"}}</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,17 @@ | ||
<div class="container mt-5"> | ||
{{if .Error}} | ||
<div class="row mt-5 text-start"> | ||
<div class="alert alert-danger" role="alert"> | ||
{{t .Lang .Error}} | ||
</div> | ||
</div> | ||
{{end}} | ||
<form method="post" action="/{{.Lang}}/login"> | ||
<h2 class="h3 mb-3 fw-normal">{{t .Lang "Please sign in"}}</h2> | ||
|
||
{{if .Message}} | ||
<div class="row mt-5 text-start"> | ||
<div class="alert alert-success" role="alert"> | ||
{{t .Lang .Message}} | ||
</div> | ||
<div class="form-floating"> | ||
<input type="email" class="form-control" id="floatingInput" placeholder="[email protected]" name="email"> | ||
<label for="floatingInput" class="form-label">{{t .Lang "Email"}}</label> | ||
</div> | ||
<div class="form-floating mt-3"> | ||
<input type="password" class="form-control" id="floatingPassword" placeholder="Password" name="password"> | ||
<label for="floatingPassword">{{t .Lang "Password"}}</label> | ||
{{if .EmailSendingConfigured}} | ||
<div id="passwordHelp" class="form-text text-end pb-5"><a href="/{{.Lang}}/recover">{{t .Lang "I don't remember my password"}}</a></div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
<form method="post" action="/{{.Lang}}/login"> | ||
<h2 class="h3 mb-3 fw-normal">{{t .Lang "Please sign in"}}</h2> | ||
|
||
<div class="form-floating"> | ||
<input type="email" class="form-control" id="floatingInput" placeholder="[email protected]" name="email"> | ||
<label for="floatingInput" class="form-label">{{t .Lang "Email"}}</label> | ||
</div> | ||
<div class="form-floating mt-3"> | ||
<input type="password" class="form-control" id="floatingPassword" placeholder="Password" name="password"> | ||
<label for="floatingPassword">{{t .Lang "Password"}}</label> | ||
{{if .EmailSendingConfigured}} | ||
<div id="passwordHelp" class="form-text text-end pb-5"><a href="/{{.Lang}}/recover">{{t .Lang "I don't remember my password"}}</a></div> | ||
{{end}} | ||
</div> | ||
|
||
<button class="w-100 btn btn-lg btn-primary mt-3" type="submit">{{t .Lang "Sign in"}}</button> | ||
</form> | ||
</div> | ||
<button class="w-100 btn btn-lg btn-primary mt-3" type="submit">{{t .Lang "Sign in"}}</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<div class="container mt-5 text-start"> | ||
<section class="pb-5"> | ||
<h2 class="pb-5">{{t .Lang "Recover password"}}</h2> | ||
<form method="post" action="/{{.Lang}}/recover" autocomplete="off"> | ||
<div class="mb-3"> | ||
<label for="email" class="form-label">{{t .Lang "Email"}}</label> | ||
<div class="input-group"> | ||
<input type="email" name="email" | ||
class='form-control {{if ne (index .Errors "email") ""}}is-invalid{{end}}' id="email" | ||
required value="{{.User.Email}}"> | ||
<button class="btn btn-primary" type="submit">{{t .Lang "Request"}}</button> | ||
{{if ne (index .Errors "email") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.email}} | ||
</div> | ||
{{end}} | ||
</div> | ||
</div> | ||
</form> | ||
</section> | ||
</div> | ||
<section class="pb-5"> | ||
<h2 class="pb-5">{{t .Lang "Recover password"}}</h2> | ||
<form method="post" action="/{{.Lang}}/recover" autocomplete="off"> | ||
<div class="mb-3"> | ||
<label for="email" class="form-label">{{t .Lang "Email"}}</label> | ||
<div class="input-group"> | ||
<input type="email" name="email" | ||
class='form-control {{if ne (index .Errors "email") ""}}is-invalid{{end}}' id="email" | ||
required value="{{.User.Email}}"> | ||
<button class="btn btn-primary" type="submit">{{t .Lang "Request"}}</button> | ||
{{if ne (index .Errors "email") ""}} | ||
<div class="invalid-feedback"> | ||
{{t .Lang .Errors.email}} | ||
</div> | ||
{{end}} | ||
</div> | ||
</div> | ||
</form> | ||
</section> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<div class="container mt-5 text-start"> | ||
<section class="pb-5"> | ||
<h2 class="pb-5">{{t .Lang "Recover password"}}</h2> | ||
<p>{{t .Lang "We've received your password recovery request. If the address you introduced is registered in our system, you'll receive an email with further instructions in your inbox."}}</p> | ||
<p>{{t .Lang "Check your spam folder if you don't receive the recovery email after a while."}}</p> | ||
</section> | ||
</div> | ||
<section class="pb-5"> | ||
<h2 class="pb-5">{{t .Lang "Recover password"}}</h2> | ||
<p>{{t .Lang "We've received your password recovery request. If the address you introduced is registered in our system, you'll receive an email with further instructions in your inbox."}}</p> | ||
<p>{{t .Lang "Check your spam folder if you don't receive the recovery email after a while."}}</p> | ||
</section> |
Oops, something went wrong.