// Code generated by qtc from "auth.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line views/auth.qtpl:1 package views //line views/auth.qtpl:1 import "net/http" //line views/auth.qtpl:2 import "github.com/bouncepaw/mycorrhiza/cfg" //line views/auth.qtpl:3 import "github.com/bouncepaw/mycorrhiza/l18n" //line views/auth.qtpl:5 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/auth.qtpl:5 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/auth.qtpl:5 func StreamRegister(qw422016 *qt422016.Writer, rq *http.Request) { //line views/auth.qtpl:5 qw422016.N().S(` `) //line views/auth.qtpl:7 lc := l18n.FromRequest(rq) //line views/auth.qtpl:8 qw422016.N().S(`
`) //line views/auth.qtpl:12 if cfg.AllowRegistration { //line views/auth.qtpl:12 qw422016.N().S(` `) //line views/auth.qtpl:30 streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:30 qw422016.N().S(` `) //line views/auth.qtpl:31 } else if cfg.UseAuth { //line views/auth.qtpl:31 qw422016.N().S(`

`) //line views/auth.qtpl:32 qw422016.E().S(lc.Get("auth.noregister")) //line views/auth.qtpl:32 qw422016.N().S(`

← `) //line views/auth.qtpl:33 qw422016.E().S(lc.Get("auth.go_back")) //line views/auth.qtpl:33 qw422016.N().S(`

`) //line views/auth.qtpl:34 } else { //line views/auth.qtpl:34 qw422016.N().S(`

`) //line views/auth.qtpl:35 qw422016.E().S(lc.Get("auth.noauth")) //line views/auth.qtpl:35 qw422016.N().S(`

← `) //line views/auth.qtpl:36 qw422016.E().S(lc.Get("auth.go_back")) //line views/auth.qtpl:36 qw422016.N().S(`

`) //line views/auth.qtpl:37 } //line views/auth.qtpl:37 qw422016.N().S(`
`) //line views/auth.qtpl:41 } //line views/auth.qtpl:41 func WriteRegister(qq422016 qtio422016.Writer, rq *http.Request) { //line views/auth.qtpl:41 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:41 StreamRegister(qw422016, rq) //line views/auth.qtpl:41 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:41 } //line views/auth.qtpl:41 func Register(rq *http.Request) string { //line views/auth.qtpl:41 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:41 WriteRegister(qb422016, rq) //line views/auth.qtpl:41 qs422016 := string(qb422016.B) //line views/auth.qtpl:41 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:41 return qs422016 //line views/auth.qtpl:41 } //line views/auth.qtpl:43 func StreamLogin(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:43 qw422016.N().S(`
`) //line views/auth.qtpl:47 if cfg.UseAuth { //line views/auth.qtpl:47 qw422016.N().S(` `) //line views/auth.qtpl:63 streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:63 qw422016.N().S(` `) //line views/auth.qtpl:64 } else { //line views/auth.qtpl:64 qw422016.N().S(`

`) //line views/auth.qtpl:65 qw422016.E().S(lc.Get("auth.noauth")) //line views/auth.qtpl:65 qw422016.N().S(`

← `) //line views/auth.qtpl:66 qw422016.E().S(lc.Get("auth.go_home")) //line views/auth.qtpl:66 qw422016.N().S(`

`) //line views/auth.qtpl:67 } //line views/auth.qtpl:67 qw422016.N().S(`
`) //line views/auth.qtpl:71 } //line views/auth.qtpl:71 func WriteLogin(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:71 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:71 StreamLogin(qw422016, lc) //line views/auth.qtpl:71 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:71 } //line views/auth.qtpl:71 func Login(lc *l18n.Localizer) string { //line views/auth.qtpl:71 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:71 WriteLogin(qb422016, lc) //line views/auth.qtpl:71 qs422016 := string(qb422016.B) //line views/auth.qtpl:71 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:71 return qs422016 //line views/auth.qtpl:71 } // 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:74 func streamtelegramWidget(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:74 qw422016.N().S(` `) //line views/auth.qtpl:75 if cfg.TelegramEnabled { //line views/auth.qtpl:75 qw422016.N().S(`

`) //line views/auth.qtpl:76 qw422016.E().S(lc.Get("auth.telegram_tip")) //line views/auth.qtpl:76 qw422016.N().S(`

`) //line views/auth.qtpl:78 } //line views/auth.qtpl:78 qw422016.N().S(` `) //line views/auth.qtpl:79 } //line views/auth.qtpl:79 func writetelegramWidget(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:79 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:79 streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:79 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:79 } //line views/auth.qtpl:79 func telegramWidget(lc *l18n.Localizer) string { //line views/auth.qtpl:79 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:79 writetelegramWidget(qb422016, lc) //line views/auth.qtpl:79 qs422016 := string(qb422016.B) //line views/auth.qtpl:79 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:79 return qs422016 //line views/auth.qtpl:79 } //line views/auth.qtpl:81 func StreamLoginError(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) { //line views/auth.qtpl:81 qw422016.N().S(`
`) //line views/auth.qtpl:85 switch err { //line views/auth.qtpl:86 case "unknown username": //line views/auth.qtpl:86 qw422016.N().S(`

`) //line views/auth.qtpl:87 qw422016.E().S(lc.Get("auth.error_username")) //line views/auth.qtpl:87 qw422016.N().S(`

`) //line views/auth.qtpl:88 case "wrong password": //line views/auth.qtpl:88 qw422016.N().S(`

`) //line views/auth.qtpl:89 qw422016.E().S(lc.Get("auth.error_password")) //line views/auth.qtpl:89 qw422016.N().S(`

`) //line views/auth.qtpl:90 default: //line views/auth.qtpl:90 qw422016.N().S(`

`) //line views/auth.qtpl:91 qw422016.E().S(err) //line views/auth.qtpl:91 qw422016.N().S(`

`) //line views/auth.qtpl:92 } //line views/auth.qtpl:92 qw422016.N().S(`

← `) //line views/auth.qtpl:93 qw422016.E().S(lc.Get("auth.try_again")) //line views/auth.qtpl:93 qw422016.N().S(`

`) //line views/auth.qtpl:97 } //line views/auth.qtpl:97 func WriteLoginError(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) { //line views/auth.qtpl:97 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:97 StreamLoginError(qw422016, err, lc) //line views/auth.qtpl:97 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:97 } //line views/auth.qtpl:97 func LoginError(err string, lc *l18n.Localizer) string { //line views/auth.qtpl:97 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:97 WriteLoginError(qb422016, err, lc) //line views/auth.qtpl:97 qs422016 := string(qb422016.B) //line views/auth.qtpl:97 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:97 return qs422016 //line views/auth.qtpl:97 } //line views/auth.qtpl:99 func StreamLogout(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) { //line views/auth.qtpl:99 qw422016.N().S(`
`) //line views/auth.qtpl:103 if can { //line views/auth.qtpl:103 qw422016.N().S(`

`) //line views/auth.qtpl:104 qw422016.E().S(lc.Get("auth.logout_header")) //line views/auth.qtpl:104 qw422016.N().S(`

`) //line views/auth.qtpl:107 qw422016.E().S(lc.Get("auth.go_home")) //line views/auth.qtpl:107 qw422016.N().S(`
`) //line views/auth.qtpl:109 } else { //line views/auth.qtpl:109 qw422016.N().S(`

`) //line views/auth.qtpl:110 qw422016.E().S(lc.Get("auth.logout_anon")) //line views/auth.qtpl:110 qw422016.N().S(`

`) //line views/auth.qtpl:111 qw422016.E().S(lc.Get("auth.login_title")) //line views/auth.qtpl:111 qw422016.N().S(`

← `) //line views/auth.qtpl:112 qw422016.E().S(lc.Get("auth.go_home")) //line views/auth.qtpl:112 qw422016.N().S(`

`) //line views/auth.qtpl:113 } //line views/auth.qtpl:113 qw422016.N().S(`
`) //line views/auth.qtpl:117 } //line views/auth.qtpl:117 func WriteLogout(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) { //line views/auth.qtpl:117 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:117 StreamLogout(qw422016, can, lc) //line views/auth.qtpl:117 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:117 } //line views/auth.qtpl:117 func Logout(can bool, lc *l18n.Localizer) string { //line views/auth.qtpl:117 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:117 WriteLogout(qb422016, can, lc) //line views/auth.qtpl:117 qs422016 := string(qb422016.B) //line views/auth.qtpl:117 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:117 return qs422016 //line views/auth.qtpl:117 } //line views/auth.qtpl:119 func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:119 qw422016.N().S(` 🔒 `) //line views/auth.qtpl:125 qw422016.E().S(lc.Get("auth.lock_title")) //line views/auth.qtpl:125 qw422016.N().S(`

🔒

`) //line views/auth.qtpl:133 qw422016.E().S(lc.Get("auth.lock_title")) //line views/auth.qtpl:133 qw422016.N().S(`

`) //line views/auth.qtpl:145 streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:145 qw422016.N().S(`
`) //line views/auth.qtpl:150 } //line views/auth.qtpl:150 func WriteLock(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:150 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:150 StreamLock(qw422016, lc) //line views/auth.qtpl:150 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:150 } //line views/auth.qtpl:150 func Lock(lc *l18n.Localizer) string { //line views/auth.qtpl:150 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:150 WriteLock(qb422016, lc) //line views/auth.qtpl:150 qs422016 := string(qb422016.B) //line views/auth.qtpl:150 qt422016.ReleaseByteBuffer(qb422016) //line views/auth.qtpl:150 return qs422016 //line views/auth.qtpl:150 }