🍱 Regenerate client templates

This commit is contained in:
Maxim Lebedev 2023-08-07 09:10:00 +06:00
parent 6baff22775
commit 91fbac5617
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
8 changed files with 74 additions and 64 deletions

View File

@ -13,7 +13,7 @@
"type": "string", "type": "string",
"underlyingType": "string", "underlyingType": "string",
"argNum": 1, "argNum": 1,
"expr": "name" "expr": "p.Client.Name"
} }
], ],
"fuzzy": true "fuzzy": true

View File

@ -13,7 +13,7 @@
"type": "string", "type": "string",
"underlyingType": "string", "underlyingType": "string",
"argNum": 1, "argNum": 1,
"expr": "name" "expr": "p.Client.Name"
} }
], ],
"fuzzy": true "fuzzy": true

View File

@ -13,7 +13,7 @@
"type": "string", "type": "string",
"underlyingType": "string", "underlyingType": "string",
"argNum": 1, "argNum": 1,
"expr": "name" "expr": "p.Client.Name"
} }
] ]
}, },

View File

@ -13,7 +13,7 @@
"type": "string", "type": "string",
"underlyingType": "string", "underlyingType": "string",
"argNum": 1, "argNum": 1,
"expr": "name" "expr": "p.Client.Name"
} }
] ]
}, },

View File

@ -17,8 +17,8 @@
} %} } %}
{% func (p *AuthorizePage) title() %} {% func (p *AuthorizePage) title() %}
{% if name := p.Client.GetName(); name != "" %} {% if p.Client.Name != "" %}
{%= p.t("Authorize %s", name) %} {%= p.t("Authorize %s", p.Client.Name) %}
{% else %} {% else %}
{%= p.t("Authorize application") %} {%= p.t("Authorize application") %}
{% endif %} {% endif %}
@ -26,7 +26,7 @@
{% func (p *AuthorizePage) body() %} {% func (p *AuthorizePage) body() %}
<header> <header>
{% if p.Client.GetLogo() != nil %} {% if p.Client.Logo != nil %}
<img class="" <img class=""
crossorigin="anonymous" crossorigin="anonymous"
decoding="async" decoding="async"
@ -34,21 +34,21 @@
importance="high" importance="high"
loading="lazy" loading="lazy"
referrerpolicy="no-referrer-when-downgrade" referrerpolicy="no-referrer-when-downgrade"
src="{%s p.Client.GetLogo().String() %}" src="{%s p.Client.Logo.String() %}"
alt="{%s p.Client.GetName() %}" alt="{%s p.Client.Name %}"
width="140"> width="140">
{% endif %} {% endif %}
<h2> <h2>
{% if p.Client.GetURL() != nil %} {% if p.Client.URL != nil %}
<a href="{%s p.Client.GetURL().String() %}"> <a href="{%s p.Client.URL.String() %}">
{% endif %} {% endif %}
{% if p.Client.GetName() != "" %} {% if p.Client.Name != "" %}
{%s p.Client.GetName() %} {%s p.Client.Name %}
{% else %} {% else %}
{%s p.Client.ID.String() %} {%s p.Client.ID.String() %}
{% endif %} {% endif %}
{% if p.Client.GetURL() != nil %} {% if p.Client.URL != nil %}
</a> </a>
{% endif %} {% endif %}
</h2> </h2>

View File

@ -43,12 +43,12 @@ func (p *AuthorizePage) streamtitle(qw422016 *qt422016.Writer) {
qw422016.N().S(` qw422016.N().S(`
`) `)
//line web/authorize.qtpl:20 //line web/authorize.qtpl:20
if name := p.Client.GetName(); name != "" { if p.Client.Name != "" {
//line web/authorize.qtpl:20 //line web/authorize.qtpl:20
qw422016.N().S(` qw422016.N().S(`
`) `)
//line web/authorize.qtpl:21 //line web/authorize.qtpl:21
p.streamt(qw422016, "Authorize %s", name) p.streamt(qw422016, "Authorize %s", p.Client.Name)
//line web/authorize.qtpl:21 //line web/authorize.qtpl:21
qw422016.N().S(` qw422016.N().S(`
`) `)
@ -103,7 +103,7 @@ func (p *AuthorizePage) streambody(qw422016 *qt422016.Writer) {
<header> <header>
`) `)
//line web/authorize.qtpl:29 //line web/authorize.qtpl:29
if p.Client.GetLogo() != nil { if p.Client.Logo != nil {
//line web/authorize.qtpl:29 //line web/authorize.qtpl:29
qw422016.N().S(` qw422016.N().S(`
<img class="" <img class=""
@ -115,12 +115,12 @@ func (p *AuthorizePage) streambody(qw422016 *qt422016.Writer) {
referrerpolicy="no-referrer-when-downgrade" referrerpolicy="no-referrer-when-downgrade"
src="`) src="`)
//line web/authorize.qtpl:37 //line web/authorize.qtpl:37
qw422016.E().S(p.Client.GetLogo().String()) qw422016.E().S(p.Client.Logo.String())
//line web/authorize.qtpl:37 //line web/authorize.qtpl:37
qw422016.N().S(`" qw422016.N().S(`"
alt="`) alt="`)
//line web/authorize.qtpl:38 //line web/authorize.qtpl:38
qw422016.E().S(p.Client.GetName()) qw422016.E().S(p.Client.Name)
//line web/authorize.qtpl:38 //line web/authorize.qtpl:38
qw422016.N().S(`" qw422016.N().S(`"
width="140"> width="140">
@ -133,12 +133,12 @@ func (p *AuthorizePage) streambody(qw422016 *qt422016.Writer) {
<h2> <h2>
`) `)
//line web/authorize.qtpl:43 //line web/authorize.qtpl:43
if p.Client.GetURL() != nil { if p.Client.URL != nil {
//line web/authorize.qtpl:43 //line web/authorize.qtpl:43
qw422016.N().S(` qw422016.N().S(`
<a href="`) <a href="`)
//line web/authorize.qtpl:44 //line web/authorize.qtpl:44
qw422016.E().S(p.Client.GetURL().String()) qw422016.E().S(p.Client.URL.String())
//line web/authorize.qtpl:44 //line web/authorize.qtpl:44
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
@ -148,12 +148,12 @@ func (p *AuthorizePage) streambody(qw422016 *qt422016.Writer) {
qw422016.N().S(` qw422016.N().S(`
`) `)
//line web/authorize.qtpl:46 //line web/authorize.qtpl:46
if p.Client.GetName() != "" { if p.Client.Name != "" {
//line web/authorize.qtpl:46 //line web/authorize.qtpl:46
qw422016.N().S(` qw422016.N().S(`
`) `)
//line web/authorize.qtpl:47 //line web/authorize.qtpl:47
qw422016.E().S(p.Client.GetName()) qw422016.E().S(p.Client.Name)
//line web/authorize.qtpl:47 //line web/authorize.qtpl:47
qw422016.N().S(` qw422016.N().S(`
`) `)
@ -173,7 +173,7 @@ func (p *AuthorizePage) streambody(qw422016 *qt422016.Writer) {
qw422016.N().S(` qw422016.N().S(`
`) `)
//line web/authorize.qtpl:51 //line web/authorize.qtpl:51
if p.Client.GetURL() != nil { if p.Client.URL != nil {
//line web/authorize.qtpl:51 //line web/authorize.qtpl:51
qw422016.N().S(` qw422016.N().S(`
</a> </a>

View File

@ -19,21 +19,23 @@
{% func (p *HomePage) body() %} {% func (p *HomePage) body() %}
<header class="h-app h-x-app"> <header class="h-app h-x-app">
{% if p.Client.Logo != nil %}
<img class="u-logo" <img class="u-logo"
src="{%s p.Client.GetLogo().String() %}" src="{%s p.Client.Logo.String() %}"
alt="{%s p.Client.GetName() %}" alt="{%s p.Client.Name %}"
crossorigin="anonymous" crossorigin="anonymous"
decoding="async" decoding="async"
height="140" height="140"
importance="high" importance="high"
referrerpolicy="no-referrer-when-downgrade" referrerpolicy="no-referrer-when-downgrade"
width="140"> width="140">
{% endif %}
<h1> <h1>
<a class="p-name u-url" <a class="p-name u-url"
href="{%s p.Client.GetURL().String() %}"> href="{%s p.Client.URL.String() %}">
{%s p.Client.GetName() %} {%s p.Client.Name %}
</a> </a>
</h1> </h1>
</header> </header>

View File

@ -81,24 +81,32 @@ func (p *HomePage) head() string {
//line web/home.qtpl:20 //line web/home.qtpl:20
func (p *HomePage) streambody(qw422016 *qt422016.Writer) { func (p *HomePage) streambody(qw422016 *qt422016.Writer) {
//line web/home.qtpl:20 //line web/home.qtpl:20
qw422016.N().S(` <header class="h-app h-x-app"> <img class="u-logo" src="`) qw422016.N().S(` <header class="h-app h-x-app"> `)
//line web/home.qtpl:23 //line web/home.qtpl:22
qw422016.E().S(p.Client.GetLogo().String()) if p.Client.Logo != nil {
//line web/home.qtpl:23 //line web/home.qtpl:22
qw422016.N().S(`" alt="`) qw422016.N().S(` <img class="u-logo" src="`)
//line web/home.qtpl:24 //line web/home.qtpl:24
qw422016.E().S(p.Client.GetName()) qw422016.E().S(p.Client.Logo.String())
//line web/home.qtpl:24 //line web/home.qtpl:24
qw422016.N().S(`" crossorigin="anonymous" decoding="async" height="140" importance="high" referrerpolicy="no-referrer-when-downgrade" width="140"> <h1> <a class="p-name u-url" href="`) qw422016.N().S(`" alt="`)
//line web/home.qtpl:34 //line web/home.qtpl:25
qw422016.E().S(p.Client.GetURL().String()) qw422016.E().S(p.Client.Name)
//line web/home.qtpl:34 //line web/home.qtpl:25
qw422016.N().S(`" crossorigin="anonymous" decoding="async" height="140" importance="high" referrerpolicy="no-referrer-when-downgrade" width="140"> `)
//line web/home.qtpl:32
}
//line web/home.qtpl:32
qw422016.N().S(` <h1> <a class="p-name u-url" href="`)
//line web/home.qtpl:36
qw422016.E().S(p.Client.URL.String())
//line web/home.qtpl:36
qw422016.N().S(`"> `) qw422016.N().S(`"> `)
//line web/home.qtpl:36 //line web/home.qtpl:38
qw422016.E().S(p.Client.GetName()) qw422016.E().S(p.Client.Name)
//line web/home.qtpl:36 //line web/home.qtpl:38
qw422016.N().S(` </a> </h1> </header> <main> <form class="" method="get" action="/authorize" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" target="_self"> `) qw422016.N().S(` </a> </h1> </header> <main> <form class="" method="get" action="/authorize" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" target="_self"> `)
//line web/home.qtpl:49 //line web/home.qtpl:51
for name, value := range map[string]string{ for name, value := range map[string]string{
"client_id": p.Client.ID.String(), "client_id": p.Client.ID.String(),
"redirect_uri": p.Client.RedirectURI[0].String(), "redirect_uri": p.Client.RedirectURI[0].String(),
@ -106,49 +114,49 @@ func (p *HomePage) streambody(qw422016 *qt422016.Writer) {
"scope": domain.Scopes{domain.ScopeEmail, domain.ScopeProfile}.String(), "scope": domain.Scopes{domain.ScopeEmail, domain.ScopeProfile}.String(),
"state": p.State, "state": p.State,
} { } {
//line web/home.qtpl:55 //line web/home.qtpl:57
qw422016.N().S(` <input type="hidden" name="`) qw422016.N().S(` <input type="hidden" name="`)
//line web/home.qtpl:57 //line web/home.qtpl:59
qw422016.E().S(name) qw422016.E().S(name)
//line web/home.qtpl:57 //line web/home.qtpl:59
qw422016.N().S(`" value="`) qw422016.N().S(`" value="`)
//line web/home.qtpl:58 //line web/home.qtpl:60
qw422016.E().S(value) qw422016.E().S(value)
//line web/home.qtpl:58 //line web/home.qtpl:60
qw422016.N().S(`"> `) qw422016.N().S(`"> `)
//line web/home.qtpl:59 //line web/home.qtpl:61
} }
//line web/home.qtpl:59 //line web/home.qtpl:61
qw422016.N().S(` <input type="url" name="me" placeholder="https://example.com/" inputmode="url" autocomplete="url" required> <button type="submit">`) qw422016.N().S(` <input type="url" name="me" placeholder="https://example.com/" inputmode="url" autocomplete="url" required> <button type="submit">`)
//line web/home.qtpl:68 //line web/home.qtpl:70
p.streamt(qw422016, "Sign In") p.streamt(qw422016, "Sign In")
//line web/home.qtpl:68 //line web/home.qtpl:70
qw422016.N().S(`</button> </form> </main> `) qw422016.N().S(`</button> </form> </main> `)
//line web/home.qtpl:71 //line web/home.qtpl:73
} }
//line web/home.qtpl:71 //line web/home.qtpl:73
func (p *HomePage) writebody(qq422016 qtio422016.Writer) { func (p *HomePage) writebody(qq422016 qtio422016.Writer) {
//line web/home.qtpl:71 //line web/home.qtpl:73
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line web/home.qtpl:71 //line web/home.qtpl:73
p.streambody(qw422016) p.streambody(qw422016)
//line web/home.qtpl:71 //line web/home.qtpl:73
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line web/home.qtpl:71 //line web/home.qtpl:73
} }
//line web/home.qtpl:71 //line web/home.qtpl:73
func (p *HomePage) body() string { func (p *HomePage) body() string {
//line web/home.qtpl:71 //line web/home.qtpl:73
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line web/home.qtpl:71 //line web/home.qtpl:73
p.writebody(qb422016) p.writebody(qb422016)
//line web/home.qtpl:71 //line web/home.qtpl:73
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line web/home.qtpl:71 //line web/home.qtpl:73
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line web/home.qtpl:71 //line web/home.qtpl:73
return qs422016 return qs422016
//line web/home.qtpl:71 //line web/home.qtpl:73
} }