2020-11-14 13:03:06 +00:00
|
|
|
// Code generated by qtc from "auth.qtpl". DO NOT EDIT.
|
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
2021-02-23 14:25:07 +00:00
|
|
|
//line views/auth.qtpl:1
|
|
|
|
package views
|
2020-11-14 13:03:06 +00:00
|
|
|
|
2021-02-23 14:25:07 +00:00
|
|
|
//line views/auth.qtpl:1
|
2021-04-12 17:40:43 +00:00
|
|
|
import "net/http"
|
2020-11-14 13:03:06 +00:00
|
|
|
|
2021-02-23 14:36:12 +00:00
|
|
|
//line views/auth.qtpl:2
|
2021-05-09 09:36:39 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
2021-02-23 14:36:12 +00:00
|
|
|
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:4
|
2020-11-14 13:03:06 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:4
|
2020-11-14 13:03:06 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:4
|
2021-04-12 17:40:43 +00:00
|
|
|
func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) {
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:4
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="layout">
|
|
|
|
<main class="main-width">
|
|
|
|
<section>
|
|
|
|
`)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:8
|
|
|
|
if cfg.AllowRegistration {
|
|
|
|
//line views/auth.qtpl:8
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<form class="modal" method="post" action="/register?`)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:9
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.E().S(rq.URL.RawQuery)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:9
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`" id="register-form" enctype="multipart/form-data" autocomplete="off">
|
|
|
|
<fieldset class="modal__fieldset">
|
2021-06-06 14:21:21 +00:00
|
|
|
<legend class="modal__title">Register on `)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:11
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.E().S(cfg.WikiName)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:11
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`</legend>
|
|
|
|
|
|
|
|
<label for="register-form__username">Username</label>
|
|
|
|
<br>
|
|
|
|
<input type="text" required autofocus id="login-form__username" name="username">
|
|
|
|
<br>
|
|
|
|
<label for="login-form__password">Password</label>
|
|
|
|
<br>
|
|
|
|
<input type="password" required name="password">
|
|
|
|
<p>The server stores your password in an encrypted form; even administrators cannot read it.</p>
|
|
|
|
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
|
2021-05-16 08:37:35 +00:00
|
|
|
<input class="btn" type="submit" value="Register">
|
|
|
|
<a class="btn btn_weak" href="/`)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:23
|
2021-05-16 08:37:35 +00:00
|
|
|
qw422016.E().S(rq.URL.RawQuery)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:23
|
2021-05-16 08:37:35 +00:00
|
|
|
qw422016.N().S(`">Cancel</a>
|
2021-04-12 17:40:43 +00:00
|
|
|
</fieldset>
|
|
|
|
</form>
|
2021-07-14 19:51:55 +00:00
|
|
|
`)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:26
|
2021-07-14 19:51:55 +00:00
|
|
|
streamtelegramWidgetHTML(qw422016)
|
2021-07-02 08:20:03 +00:00
|
|
|
//line views/auth.qtpl:26
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`
|
2021-07-14 19:51:55 +00:00
|
|
|
`)
|
|
|
|
//line views/auth.qtpl:27
|
|
|
|
} else if cfg.UseAuth {
|
|
|
|
//line views/auth.qtpl:27
|
|
|
|
qw422016.N().S(`
|
2021-07-02 08:20:03 +00:00
|
|
|
<p>Registrations are currently closed. Administrators can make an account for you by hand; contact them.</p>
|
2021-05-16 08:37:35 +00:00
|
|
|
<p><a href="/`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:29
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.E().S(rq.URL.RawQuery)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:29
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`">← Go back</a></p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:30
|
2021-04-12 17:40:43 +00:00
|
|
|
} else {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:30
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`
|
2021-07-02 08:20:03 +00:00
|
|
|
<p>Authentication is disabled. You can make edits anonymously.</p>
|
2021-05-16 08:37:35 +00:00
|
|
|
<p><a href="/`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:32
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.E().S(rq.URL.RawQuery)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:32
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`">← Go back</a></p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:33
|
2021-04-12 17:40:43 +00:00
|
|
|
}
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:33
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
func WriteRegisterHTML(qq422016 qtio422016.Writer, rq *http.Request) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
StreamRegisterHTML(qw422016, rq)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
func RegisterHTML(rq *http.Request) string {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
WriteRegisterHTML(qb422016, rq)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
return qs422016
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:37
|
2021-04-12 17:40:43 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:39
|
2020-11-14 13:03:06 +00:00
|
|
|
func StreamLoginHTML(qw422016 *qt422016.Writer) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:39
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-26 05:41:57 +00:00
|
|
|
<div class="layout">
|
|
|
|
<main class="main-width">
|
2020-11-14 13:03:06 +00:00
|
|
|
<section>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:43
|
2021-07-02 08:20:03 +00:00
|
|
|
if cfg.UseAuth {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:43
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
2021-02-23 14:36:12 +00:00
|
|
|
<form class="modal" method="post" action="/login-data" id="login-form" enctype="multipart/form-data" autocomplete="on">
|
|
|
|
<fieldset class="modal__fieldset">
|
|
|
|
<legend class="modal__title">Log in to `)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:46
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.E().S(cfg.WikiName)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:46
|
2021-02-23 14:36:12 +00:00
|
|
|
qw422016.N().S(`</legend>
|
|
|
|
<label for="login-form__username">Username</label>
|
|
|
|
<br>
|
|
|
|
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
|
|
|
|
<br>
|
|
|
|
<label for="login-form__password">Password</label>
|
|
|
|
<br>
|
|
|
|
<input type="password" required name="password" autocomplete="current-password">
|
|
|
|
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
|
2021-05-16 08:37:35 +00:00
|
|
|
<input class="btn" type="submit" value="Log in">
|
|
|
|
<a class="btn btn_weak" href="/">Cancel</a>
|
2020-11-14 13:03:06 +00:00
|
|
|
</fieldset>
|
|
|
|
</form>
|
2021-07-14 19:51:55 +00:00
|
|
|
`)
|
|
|
|
//line views/auth.qtpl:59
|
|
|
|
streamtelegramWidgetHTML(qw422016)
|
|
|
|
//line views/auth.qtpl:59
|
|
|
|
qw422016.N().S(`
|
2020-11-14 13:03:06 +00:00
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:60
|
2020-11-14 13:03:06 +00:00
|
|
|
} else {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:60
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
2021-07-02 08:20:03 +00:00
|
|
|
<p>Authentication is disabled. You can make edits anonymously.</p>
|
2021-07-09 11:47:50 +00:00
|
|
|
<p><a class="btn btn_weak" href="/">← Go home</a></p>
|
2020-11-14 13:03:06 +00:00
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:63
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:63
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</section>
|
|
|
|
</main>
|
2021-01-26 05:41:57 +00:00
|
|
|
</div>
|
2020-11-14 13:03:06 +00:00
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
func WriteLoginHTML(qq422016 qtio422016.Writer) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
StreamLoginHTML(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
func LoginHTML() string {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
WriteLoginHTML(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
return qs422016
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:67
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
// Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
|
|
|
|
|
|
|
|
//line views/auth.qtpl:70
|
|
|
|
func streamtelegramWidgetHTML(qw422016 *qt422016.Writer) {
|
|
|
|
//line views/auth.qtpl:70
|
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
|
|
|
//line views/auth.qtpl:71
|
|
|
|
if cfg.TelegramEnabled {
|
|
|
|
//line views/auth.qtpl:71
|
|
|
|
qw422016.N().S(`
|
|
|
|
<script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-login="`)
|
|
|
|
//line views/auth.qtpl:72
|
|
|
|
qw422016.E().S(cfg.TelegramBotName)
|
|
|
|
//line views/auth.qtpl:72
|
|
|
|
qw422016.N().S(`" data-size="medium" data-userpic="false" data-auth-url="`)
|
|
|
|
//line views/auth.qtpl:72
|
|
|
|
qw422016.E().S(cfg.URL)
|
|
|
|
//line views/auth.qtpl:72
|
|
|
|
qw422016.N().S(`/telegram-login"></script>
|
|
|
|
`)
|
|
|
|
//line views/auth.qtpl:73
|
|
|
|
}
|
|
|
|
//line views/auth.qtpl:73
|
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
func writetelegramWidgetHTML(qq422016 qtio422016.Writer) {
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
streamtelegramWidgetHTML(qw422016)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
func telegramWidgetHTML() string {
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
writetelegramWidgetHTML(qb422016)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
return qs422016
|
|
|
|
//line views/auth.qtpl:74
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/auth.qtpl:76
|
2020-11-14 13:03:06 +00:00
|
|
|
func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:76
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-26 05:41:57 +00:00
|
|
|
<div class="layout">
|
|
|
|
<main class="main-width">
|
2020-11-14 13:03:06 +00:00
|
|
|
<section>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:80
|
2020-11-14 13:03:06 +00:00
|
|
|
switch err {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:81
|
2020-11-14 13:03:06 +00:00
|
|
|
case "unknown username":
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:81
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p class="error">Unknown username.</p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:83
|
2020-11-14 13:03:06 +00:00
|
|
|
case "wrong password":
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:83
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p class="error">Wrong password.</p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:85
|
2020-11-14 13:03:06 +00:00
|
|
|
default:
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:85
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p class="error">`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:86
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.E().S(err)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:86
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`</p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:87
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:87
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p><a href="/login">← Try again</a></p>
|
|
|
|
</section>
|
|
|
|
</main>
|
2021-01-26 05:41:57 +00:00
|
|
|
</div>
|
2020-11-14 13:03:06 +00:00
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
StreamLoginErrorHTML(qw422016, err)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
func LoginErrorHTML(err string) string {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
WriteLoginErrorHTML(qb422016, err)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
return qs422016
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:92
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:94
|
2020-11-14 13:03:06 +00:00
|
|
|
func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:94
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-26 05:41:57 +00:00
|
|
|
<div class="layout">
|
|
|
|
<main class="main-width">
|
2020-11-14 13:03:06 +00:00
|
|
|
<section>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:98
|
2020-11-14 13:03:06 +00:00
|
|
|
if can {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:98
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<h1>Log out?</h1>
|
|
|
|
<p><a href="/logout-confirm"><strong>Confirm</strong></a></p>
|
|
|
|
<p><a href="/">Cancel</a></p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:102
|
2020-11-14 13:03:06 +00:00
|
|
|
} else {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:102
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p>You cannot log out because you are not logged in.</p>
|
|
|
|
<p><a href="/login">Login</a></p>
|
|
|
|
<p><a href="/login">← Home</a></p>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:106
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:106
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</section>
|
|
|
|
</main>
|
2021-01-26 05:41:57 +00:00
|
|
|
</div>
|
2020-11-14 13:03:06 +00:00
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
StreamLogoutHTML(qw422016, can)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
func LogoutHTML(can bool) string {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
WriteLogoutHTML(qb422016, can)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
return qs422016
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:110
|
2020-11-14 13:03:06 +00:00
|
|
|
}
|
2021-07-09 11:47:50 +00:00
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:112
|
2021-07-09 11:47:50 +00:00
|
|
|
func StreamLockHTML(qw422016 *qt422016.Writer) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:112
|
2021-07-09 11:47:50 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>🔒 Locked</title>
|
|
|
|
<link rel="shortcut icon" href="/static/favicon.ico">
|
|
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<main class="locked-notice">
|
|
|
|
<section class="locked-notice__message">
|
|
|
|
<p class="locked-notice__lock">🔒</p>
|
|
|
|
<h1 class="locked-notice__title">Locked</h1>
|
|
|
|
<form class="locked-notice__login-form" method="post" action="/login-data" id="login-form" enctype="multipart/form-data" autocomplete="on">
|
|
|
|
<label for="login-form__username">Username</label>
|
|
|
|
<br>
|
|
|
|
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
|
|
|
|
<br>
|
|
|
|
<label for="login-form__password">Password</label>
|
|
|
|
<br>
|
|
|
|
<input type="password" required name="password" autocomplete="current-password">
|
|
|
|
<br>
|
|
|
|
<input class="btn" type="submit" value="Log in">
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
`)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
func WriteLockHTML(qq422016 qtio422016.Writer) {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
StreamLockHTML(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
func LockHTML() string {
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
WriteLockHTML(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
return qs422016
|
2021-07-14 19:51:55 +00:00
|
|
|
//line views/auth.qtpl:142
|
2021-07-09 11:47:50 +00:00
|
|
|
}
|