Browse Source

wip to Core

pull/1/head
Rob Colbert 3 years ago
parent
commit
7ccc129b84
  1. 1
      app/views/layouts/focused.pug
  2. 37
      app/views/oauth2/authorize-dialog.pug
  3. 15
      client/less/site/main.less

1
app/views/layouts/focused.pug

@ -1,6 +1,5 @@
extends main extends main
block content-container block content-container
h1 FOCUS
block content block content
block page-footer block page-footer

37
app/views/oauth2/authorize-dialog.pug

@ -2,7 +2,7 @@ extends ../layouts/focused
block content block content
section.uk-section.uk-section-default section.uk-section.uk-section-default
.uk-container .uk-container(style="max-width: 720px;")
form(method="POST", action="/oauth2/authorize/decision").uk-form form(method="POST", action="/oauth2/authorize/decision").uk-form
@ -26,10 +26,6 @@ block content
h4.uk-margin-remove= oauth2.client.site.name h4.uk-margin-remove= oauth2.client.site.name
.uk-text-small.uk-text-muted= oauth2.client.site.domainKey .uk-text-small.uk-text-muted= oauth2.client.site.domainKey
div(class="uk-width-1-1 uk-width-auto@m").uk-text-center
span
i.fas.fa-link
div(class="uk-width-1-1 uk-width-auto@m") div(class="uk-width-1-1 uk-width-auto@m")
div(uk-grid).uk-grid-small div(uk-grid).uk-grid-small
.uk-width-auto .uk-width-auto
@ -38,23 +34,22 @@ block content
h4.uk-margin-remove= oauth2.user.displayName h4.uk-margin-remove= oauth2.user.displayName
.uk-text-small.uk-text-muted @#{oauth2.user.username} .uk-text-small.uk-text-muted @#{oauth2.user.username}
.uk-margin -
- var scopeMap = {
var scopeMap = { 'account-read': 'Read account information (not email)',
'account-read': 'Read account information (not email)', 'event-write': 'Write events to your timelines',
'event-write': 'Write events to your timelines', };
}; var scopes = oauth2.client.scopes.map((scope) => {
var scopes = oauth2.client.scopes.map((scope) => { return scopeMap[scope] || scope;
return scopeMap[scope] || scope; });
});
.uk-text-bold Permissions requested:
.uk-text-bold Permissions requested: ul.uk-list.uk-list-square
ul.uk-list.uk-list-square each scope in scopes
each scope in scopes li= scope
li= scope
.uk-card-footer .uk-card-footer
div(uk-grid) div(uk-grid).uk-grid-small
.uk-width-expand .uk-width-expand
+renderBackButton() +renderBackButton()
.uk-width-auto .uk-width-auto
@ -62,4 +57,4 @@ block content
.uk-width-auto .uk-width-auto
button(id="allow", type="submit", value="Allow").uk-button.uk-button-primary Allow button(id="allow", type="submit", value="Allow").uk-button.uk-button-primary Allow
pre= JSON.stringify(oauth2, null, 2) //- pre= JSON.stringify(oauth2, null, 2)

15
client/less/site/main.less

@ -6,6 +6,21 @@ html, body {
body { body {
padding-top: @site-navbar-height; padding-top: @site-navbar-height;
&[data-current-view="oauth2-authorize-dialog"] {
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
} }
.no-select { .no-select {

Loading…
Cancel
Save