@things-factory/auth-ui 7.0.1-alpha.9 → 7.0.1-alpha.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/auth-style-sign.ts +29 -18
- package/client/bootstrap.ts +6 -10
- package/client/components/abstract-auth-page.ts +41 -22
- package/client/components/abstract-password-reset.ts +11 -9
- package/client/components/abstract-sign.ts +138 -0
- package/client/components/change-password.ts +3 -3
- package/client/components/contact-us.ts +19 -23
- package/client/components/create-domain-popup.ts +11 -7
- package/client/components/create-role.ts +8 -20
- package/client/components/create-user.ts +8 -16
- package/client/components/credential-manager.ts +64 -0
- package/client/components/delete-user-popup.ts +1 -1
- package/client/components/domain-switch.ts +7 -4
- package/client/components/invite-customer.ts +7 -14
- package/client/components/invite-user.ts +2 -7
- package/client/components/ownership-transfer-popup.ts +3 -3
- package/client/components/partner-role-editor.ts +11 -17
- package/client/components/profile-component.ts +124 -7
- package/client/components/role-privilege-editor.ts +10 -17
- package/client/components/user-role-editor.ts +27 -38
- package/client/entries/auth/activate.ts +17 -17
- package/client/entries/auth/checkin.ts +15 -19
- package/client/entries/auth/forgot-password.ts +8 -6
- package/client/entries/auth/result.ts +13 -12
- package/client/entries/auth/signup.ts +20 -24
- package/client/entries/oauth2/oauth2-decision-error-page.ts +2 -2
- package/client/entries/oauth2/oauth2-decision-page.ts +60 -55
- package/client/entries/public/home.ts +40 -18
- package/client/index.ts +93 -66
- package/client/pages/app-binding/app-binding.ts +5 -9
- package/client/pages/app-binding/app-bindings.ts +2 -2
- package/client/pages/appliance/appliance.ts +6 -9
- package/client/pages/appliance/home.ts +3 -3
- package/client/pages/appliance/register.ts +1 -1
- package/client/pages/application/application.ts +29 -50
- package/client/pages/application/applications.ts +4 -12
- package/client/pages/application/register.ts +1 -1
- package/client/pages/attribute/attribute-set-item-list.ts +8 -22
- package/client/pages/attribute/attribute-set-management.ts +14 -20
- package/client/pages/auth-provider/auth-provider-management.ts +10 -16
- package/client/pages/domain/domain-management.ts +4 -9
- package/client/pages/user/user-management.ts +5 -5
- package/dist-client/auth-style-sign.js +29 -18
- package/dist-client/auth-style-sign.js.map +1 -1
- package/dist-client/bootstrap.d.ts +1 -1
- package/dist-client/bootstrap.js +5 -5
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/abstract-auth-page.d.ts +4 -4
- package/dist-client/components/abstract-auth-page.js +40 -22
- package/dist-client/components/abstract-auth-page.js.map +1 -1
- package/dist-client/components/abstract-password-reset.d.ts +3 -2
- package/dist-client/components/abstract-password-reset.js +10 -9
- package/dist-client/components/abstract-password-reset.js.map +1 -1
- package/dist-client/components/abstract-sign.d.ts +3 -0
- package/dist-client/components/abstract-sign.js +110 -0
- package/dist-client/components/abstract-sign.js.map +1 -1
- package/dist-client/components/change-password.js +3 -3
- package/dist-client/components/change-password.js.map +1 -1
- package/dist-client/components/contact-us.d.ts +4 -4
- package/dist-client/components/contact-us.js +18 -23
- package/dist-client/components/contact-us.js.map +1 -1
- package/dist-client/components/create-domain-popup.d.ts +1 -1
- package/dist-client/components/create-domain-popup.js +11 -7
- package/dist-client/components/create-domain-popup.js.map +1 -1
- package/dist-client/components/create-role.d.ts +1 -1
- package/dist-client/components/create-role.js +7 -19
- package/dist-client/components/create-role.js.map +1 -1
- package/dist-client/components/create-user.js +6 -14
- package/dist-client/components/create-user.js.map +1 -1
- package/dist-client/components/credential-manager.d.ts +11 -0
- package/dist-client/components/credential-manager.js +64 -0
- package/dist-client/components/credential-manager.js.map +1 -0
- package/dist-client/components/delete-user-popup.js +1 -1
- package/dist-client/components/delete-user-popup.js.map +1 -1
- package/dist-client/components/domain-switch.d.ts +2 -0
- package/dist-client/components/domain-switch.js +9 -4
- package/dist-client/components/domain-switch.js.map +1 -1
- package/dist-client/components/invite-customer.d.ts +1 -1
- package/dist-client/components/invite-customer.js +5 -8
- package/dist-client/components/invite-customer.js.map +1 -1
- package/dist-client/components/invite-user.js +2 -7
- package/dist-client/components/invite-user.js.map +1 -1
- package/dist-client/components/ownership-transfer-popup.d.ts +1 -1
- package/dist-client/components/ownership-transfer-popup.js +3 -3
- package/dist-client/components/ownership-transfer-popup.js.map +1 -1
- package/dist-client/components/partner-role-editor.d.ts +2 -2
- package/dist-client/components/partner-role-editor.js +11 -17
- package/dist-client/components/partner-role-editor.js.map +1 -1
- package/dist-client/components/profile-component.d.ts +6 -0
- package/dist-client/components/profile-component.js +111 -7
- package/dist-client/components/profile-component.js.map +1 -1
- package/dist-client/components/role-privilege-editor.js +10 -17
- package/dist-client/components/role-privilege-editor.js.map +1 -1
- package/dist-client/components/user-role-editor.d.ts +2 -0
- package/dist-client/components/user-role-editor.js +26 -37
- package/dist-client/components/user-role-editor.js.map +1 -1
- package/dist-client/entries/auth/activate.d.ts +2 -1
- package/dist-client/entries/auth/activate.js +16 -17
- package/dist-client/entries/auth/activate.js.map +1 -1
- package/dist-client/entries/auth/checkin.d.ts +2 -2
- package/dist-client/entries/auth/checkin.js +13 -16
- package/dist-client/entries/auth/checkin.js.map +1 -1
- package/dist-client/entries/auth/forgot-password.d.ts +2 -1
- package/dist-client/entries/auth/forgot-password.js +7 -6
- package/dist-client/entries/auth/forgot-password.js.map +1 -1
- package/dist-client/entries/auth/result.d.ts +2 -2
- package/dist-client/entries/auth/result.js +12 -12
- package/dist-client/entries/auth/result.js.map +1 -1
- package/dist-client/entries/auth/signup.js +19 -24
- package/dist-client/entries/auth/signup.js.map +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-error-page.d.ts +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-error-page.js +2 -2
- package/dist-client/entries/oauth2/oauth2-decision-error-page.js.map +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-page.d.ts +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-page.js +59 -54
- package/dist-client/entries/oauth2/oauth2-decision-page.js.map +1 -1
- package/dist-client/entries/public/home.d.ts +3 -2
- package/dist-client/entries/public/home.js +40 -18
- package/dist-client/entries/public/home.js.map +1 -1
- package/dist-client/index.d.ts +11 -2
- package/dist-client/index.js +74 -66
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/app-binding/app-binding.d.ts +1 -1
- package/dist-client/pages/app-binding/app-binding.js +4 -9
- package/dist-client/pages/app-binding/app-binding.js.map +1 -1
- package/dist-client/pages/app-binding/app-bindings.js +2 -2
- package/dist-client/pages/app-binding/app-bindings.js.map +1 -1
- package/dist-client/pages/appliance/appliance.d.ts +1 -1
- package/dist-client/pages/appliance/appliance.js +5 -9
- package/dist-client/pages/appliance/appliance.js.map +1 -1
- package/dist-client/pages/appliance/home.js +3 -3
- package/dist-client/pages/appliance/home.js.map +1 -1
- package/dist-client/pages/appliance/register.js +1 -1
- package/dist-client/pages/appliance/register.js.map +1 -1
- package/dist-client/pages/application/application.d.ts +1 -1
- package/dist-client/pages/application/application.js +28 -50
- package/dist-client/pages/application/application.js.map +1 -1
- package/dist-client/pages/application/applications.js +4 -12
- package/dist-client/pages/application/applications.js.map +1 -1
- package/dist-client/pages/application/register.js +1 -1
- package/dist-client/pages/application/register.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-item-list.d.ts +1 -1
- package/dist-client/pages/attribute/attribute-set-item-list.js +6 -22
- package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-management.d.ts +11 -2
- package/dist-client/pages/attribute/attribute-set-management.js +7 -11
- package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
- package/dist-client/pages/auth-provider/auth-provider-management.d.ts +11 -2
- package/dist-client/pages/auth-provider/auth-provider-management.js +8 -11
- package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
- package/dist-client/pages/domain/domain-management.d.ts +1 -0
- package/dist-client/pages/domain/domain-management.js +3 -7
- package/dist-client/pages/domain/domain-management.js.map +1 -1
- package/dist-client/pages/user/user-management.d.ts +1 -0
- package/dist-client/pages/user/user-management.js +4 -5
- package/dist-client/pages/user/user-management.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -12
- package/translations/en.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
- package/views/auth-page.html +3 -2
- package/views/oauth2-page.html +3 -2
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/elevated-button.js'
|
|
3
|
+
|
|
1
4
|
import './ownership-transfer-popup'
|
|
2
5
|
import './role-selector'
|
|
3
6
|
|
|
@@ -11,12 +14,13 @@ import { i18next } from '@operato/i18n'
|
|
|
11
14
|
import { openPopup } from '@operato/layout'
|
|
12
15
|
import { store } from '@operato/shell'
|
|
13
16
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
14
|
-
|
|
17
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
15
18
|
import { RoleSelector } from './role-selector'
|
|
16
19
|
|
|
17
20
|
@customElement('user-role-editor')
|
|
18
21
|
class UserRoleEditor extends connect(store)(LitElement) {
|
|
19
22
|
static styles = [
|
|
23
|
+
ButtonContainerStyles,
|
|
20
24
|
css`
|
|
21
25
|
:host {
|
|
22
26
|
display: flex;
|
|
@@ -51,9 +55,9 @@ class UserRoleEditor extends connect(store)(LitElement) {
|
|
|
51
55
|
[detail] {
|
|
52
56
|
background-color: rgba(var(--primary-color-rgb), 0.05);
|
|
53
57
|
}
|
|
54
|
-
[detail]
|
|
58
|
+
[detail] md-icon {
|
|
59
|
+
--md-icon-size: var(--fontsize-default);
|
|
55
60
|
vertical-align: middle;
|
|
56
|
-
--mdc-icon-size: var(--fontsize-default);
|
|
57
61
|
color: var(--primary-color);
|
|
58
62
|
}
|
|
59
63
|
[detail] li {
|
|
@@ -63,20 +67,15 @@ class UserRoleEditor extends connect(store)(LitElement) {
|
|
|
63
67
|
flex: 1;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
margin: 0;
|
|
68
|
-
padding: 5px;
|
|
69
|
-
background-color: rgba(var(--primary-color-rgb), 0.2);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
mwc-button {
|
|
70
|
+
md-elevated-button {
|
|
73
71
|
margin: 5px;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
[danger] {
|
|
77
|
-
--
|
|
75
|
+
--md-theme-primary: var(--md-danger-button-primary-color);
|
|
78
76
|
}
|
|
79
|
-
|
|
77
|
+
|
|
78
|
+
md-outlined-button {
|
|
80
79
|
background-color: var(--theme-white-color);
|
|
81
80
|
}
|
|
82
81
|
|
|
@@ -117,7 +116,7 @@ class UserRoleEditor extends connect(store)(LitElement) {
|
|
|
117
116
|
? html`
|
|
118
117
|
<li>
|
|
119
118
|
<span>
|
|
120
|
-
<
|
|
119
|
+
<md-icon>email</md-icon>
|
|
121
120
|
${user.email}
|
|
122
121
|
</span>
|
|
123
122
|
</li>
|
|
@@ -141,10 +140,9 @@ class UserRoleEditor extends connect(store)(LitElement) {
|
|
|
141
140
|
`
|
|
142
141
|
: ''}
|
|
143
142
|
|
|
144
|
-
<div
|
|
143
|
+
<div class="button-container">
|
|
145
144
|
${this.isRoleEditable()
|
|
146
|
-
? html` <
|
|
147
|
-
raised
|
|
145
|
+
? html` <md-elevated-button
|
|
148
146
|
@click=${() => {
|
|
149
147
|
const { availableRoles, selectedRoles } = Array.from(
|
|
150
148
|
this.renderRoot.querySelectorAll('role-selector') as NodeListOf<RoleSelector>
|
|
@@ -169,46 +167,37 @@ class UserRoleEditor extends connect(store)(LitElement) {
|
|
|
169
167
|
)
|
|
170
168
|
this.onSave(user, availableRoles, selectedRoles)
|
|
171
169
|
}}
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
>${String(i18next.t('button.save'))}</md-elevated-button
|
|
171
|
+
>`
|
|
174
172
|
: ''}
|
|
175
173
|
${user.userType === 'user'
|
|
176
174
|
? html`
|
|
177
175
|
${this.isTransferable(user)
|
|
178
176
|
? html`
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
@click=${() => this.onTransfer(user)}
|
|
183
|
-
label=${String(i18next.t('button.transfer owner'))}
|
|
184
|
-
></mwc-button>
|
|
177
|
+
<md-elevated-button danger @click=${() => this.onTransfer(user)}
|
|
178
|
+
>${String(i18next.t('button.transfer owner'))}</md-elevated-button
|
|
179
|
+
>
|
|
185
180
|
`
|
|
186
181
|
: ''}
|
|
187
182
|
${this.isPasswordResettable(user)
|
|
188
|
-
? html`<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
@click="${() => this.onResetPassword(user)}"
|
|
192
|
-
label=${String(i18next.t('title.reset password'))}
|
|
193
|
-
></mwc-button>`
|
|
183
|
+
? html`<md-elevated-button danger @click=${() => this.onResetPassword(user)}
|
|
184
|
+
>${String(i18next.t('title.reset password'))}</md-elevated-button
|
|
185
|
+
>`
|
|
194
186
|
: ''}
|
|
195
187
|
`
|
|
196
188
|
: ''}
|
|
197
189
|
${this.isRemovable(user)
|
|
198
190
|
? html`
|
|
199
|
-
<
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
label=${String(i18next.t('button.delete user'))}
|
|
203
|
-
@click=${() => this.onDelete(user)}
|
|
204
|
-
></mwc-button>
|
|
191
|
+
<md-elevated-button danger @click=${() => this.onDelete(user)}
|
|
192
|
+
>${String(i18next.t('button.delete user'))}</md-elevated-button
|
|
193
|
+
>
|
|
205
194
|
`
|
|
206
195
|
: ''}
|
|
207
196
|
${this.isActivatable(user)
|
|
208
|
-
? html`<
|
|
197
|
+
? html`<md-elevated-button danger @click=${() => this.onActivate(user)}>activate</md-elevated-button>`
|
|
209
198
|
: ''}
|
|
210
199
|
${this.isInactivatable(user)
|
|
211
|
-
? html`<
|
|
200
|
+
? html`<md-elevated-button danger @click=${() => this.onInactivate(user)}>inactivate</md-elevated-button>`
|
|
212
201
|
: ''}
|
|
213
202
|
</div>
|
|
214
203
|
`
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/elevated-button.js'
|
|
3
|
+
|
|
2
4
|
import '@operato/i18n/ox-i18n.js'
|
|
3
5
|
import '@operato/layout/ox-snack-bar.js'
|
|
4
6
|
import '@operato/lottie-player'
|
|
@@ -66,11 +68,11 @@ export class AuthActivate extends localize(i18next)(LitElement) {
|
|
|
66
68
|
padding-top: 10px;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
71
|
+
md-elevated-button {
|
|
72
|
+
--md-theme-primary: var(--auth-button-background-color);
|
|
73
|
+
--md-theme-on-primary: var(--primary-color);
|
|
74
|
+
--md-button-horizontal-padding: var(--padding-default);
|
|
75
|
+
--md-button-ink-color: var(--primary-color);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
contact-us {
|
|
@@ -162,20 +164,18 @@ export class AuthActivate extends localize(i18next)(LitElement) {
|
|
|
162
164
|
</form>
|
|
163
165
|
|
|
164
166
|
<div id="button-area">
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
></mwc-button>
|
|
171
|
-
<mwc-button
|
|
172
|
-
raised
|
|
173
|
-
icon="home"
|
|
174
|
-
label=${i18next.t('button.go to home')}
|
|
167
|
+
<md-elevated-button @click=${e => this.requestResend(e)}>
|
|
168
|
+
<md-icon slot="icon">mail_outline</md-icon>
|
|
169
|
+
${i18next.t('label.send activation email')}
|
|
170
|
+
</md-elevated-button>
|
|
171
|
+
<md-elevated-button
|
|
175
172
|
@click=${e => {
|
|
176
173
|
window.location.replace('/auth/signin')
|
|
177
174
|
}}
|
|
178
|
-
|
|
175
|
+
>
|
|
176
|
+
<md-icon slot="icon">home</md-icon>
|
|
177
|
+
${i18next.t('button.go to home')}
|
|
178
|
+
</md-elevated-button>
|
|
179
179
|
</div>
|
|
180
180
|
<contact-us></contact-us>
|
|
181
181
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import '@material/
|
|
2
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/elevated-button.js'
|
|
3
|
+
|
|
3
4
|
import '@operato/lottie-player'
|
|
4
5
|
|
|
5
6
|
import { css, html, LitElement } from 'lit'
|
|
@@ -59,7 +60,7 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
59
60
|
font: normal var(--fontsize-default) var(--theme-font);
|
|
60
61
|
color: var(--secondary-text-color);
|
|
61
62
|
}
|
|
62
|
-
li
|
|
63
|
+
li md-icon {
|
|
63
64
|
float: right;
|
|
64
65
|
margin: 2px 0 0 0;
|
|
65
66
|
opacity: 0.5;
|
|
@@ -67,12 +68,12 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
67
68
|
.button-container {
|
|
68
69
|
text-align: center;
|
|
69
70
|
}
|
|
70
|
-
.button-container
|
|
71
|
+
.button-container md-elevated-button {
|
|
71
72
|
margin-left: var(--margin-narrow);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
@media (max-width: 450px) {
|
|
75
|
-
.button-container
|
|
76
|
+
.button-container md-elevated-button {
|
|
76
77
|
width: 100%;
|
|
77
78
|
margin: var(--margin-default) 0 0 0;
|
|
78
79
|
}
|
|
@@ -93,7 +94,7 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
93
94
|
var { icon, title, description } = this.applicationMeta
|
|
94
95
|
|
|
95
96
|
return html`
|
|
96
|
-
<div class="content">
|
|
97
|
+
<div class="content md-typescale-display-medium">
|
|
97
98
|
<div class="wrap">
|
|
98
99
|
<div class="auth-brand">
|
|
99
100
|
<img src=${icon || ''} />
|
|
@@ -110,11 +111,9 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
110
111
|
domain => html`
|
|
111
112
|
<li
|
|
112
113
|
@click=${() =>
|
|
113
|
-
(location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(
|
|
114
|
-
this.redirectTo || '/'
|
|
115
|
-
)}`)}
|
|
114
|
+
(location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(this.redirectTo || '/')}`)}
|
|
116
115
|
>
|
|
117
|
-
<
|
|
116
|
+
<md-icon>keyboard_arrow_right</md-icon>
|
|
118
117
|
<strong>${domain.name}</strong>
|
|
119
118
|
<span>${domain.description}</span>
|
|
120
119
|
</li>
|
|
@@ -125,18 +124,15 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
125
124
|
: html` <h3>${i18next.t('text.no domain available')}</h3> `}
|
|
126
125
|
|
|
127
126
|
<div class="button-container">
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
@click="${() => (location.pathname = '/auth/signout')}"
|
|
132
|
-
></mwc-button>
|
|
127
|
+
<md-elevated-button @click=${() => (location.pathname = '/auth/signout')}
|
|
128
|
+
>${String(i18next.t('button.logout'))}</md-elevated-button
|
|
129
|
+
>
|
|
133
130
|
|
|
134
131
|
${this.domainType?.toLowerCase() === 'company'
|
|
135
|
-
? html`<
|
|
136
|
-
raised
|
|
137
|
-
label=${String(i18next.t('button.register business domain'))}
|
|
132
|
+
? html`<md-elevated-button
|
|
138
133
|
@click=${e => (location.href = `/public/business-register?email=${this.user?.email}`)}
|
|
139
|
-
|
|
134
|
+
>${String(i18next.t('button.register business domain'))}</md-elevated-button
|
|
135
|
+
> `
|
|
140
136
|
: ''}
|
|
141
137
|
</div>
|
|
142
138
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
import '@material/web/button/text-button.js'
|
|
3
|
+
|
|
2
4
|
import '@operato/i18n/ox-i18n.js'
|
|
3
5
|
import '../../components/profile-component'
|
|
4
6
|
|
|
@@ -28,7 +30,7 @@ export class ForgotPassword extends AbstractAuthPage {
|
|
|
28
30
|
return html`
|
|
29
31
|
<input id="email" name="email" type="hidden" required .value=${email} />
|
|
30
32
|
<div class="field">
|
|
31
|
-
<
|
|
33
|
+
<md-filled-text-field
|
|
32
34
|
name="email"
|
|
33
35
|
type="email"
|
|
34
36
|
label=${String(i18next.t('label.email'))}
|
|
@@ -37,18 +39,18 @@ export class ForgotPassword extends AbstractAuthPage {
|
|
|
37
39
|
@input=${e => {
|
|
38
40
|
this.emailInput.value = e.target.value
|
|
39
41
|
}}
|
|
40
|
-
></
|
|
42
|
+
></md-filled-text-field>
|
|
41
43
|
</div>
|
|
42
|
-
<
|
|
44
|
+
<md-elevated-button id="submit-button" class="ui button" type="submit" @click=${e => this._onSubmit(e)}>
|
|
43
45
|
<ox-i18n msgid="button.submit"></ox-i18n>
|
|
44
|
-
</
|
|
46
|
+
</md-elevated-button>
|
|
45
47
|
`
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
get links() {
|
|
49
51
|
return html`
|
|
50
52
|
<a class="link" href="/auth/signin">
|
|
51
|
-
<
|
|
53
|
+
<md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
|
|
52
54
|
</a>
|
|
53
55
|
`
|
|
54
56
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import '@material/
|
|
2
|
-
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
|
|
3
3
|
import '@operato/lottie-player'
|
|
4
|
+
import '../../components/profile-component'
|
|
4
5
|
|
|
5
6
|
import { css, html, LitElement } from 'lit'
|
|
6
7
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -73,11 +74,11 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
73
74
|
border-top: 1px dashed rgba(0, 0, 0, 0.1);
|
|
74
75
|
padding-top: 10px;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
77
|
+
md-elevated-button {
|
|
78
|
+
--md-theme-primary: var(--auth-button-background-color);
|
|
79
|
+
--md-theme-on-primary: var(--primary-color);
|
|
80
|
+
--md-button-horizontal-padding: var(--padding-default);
|
|
81
|
+
--md-button-ink-color: var(--primary-color);
|
|
81
82
|
}
|
|
82
83
|
.lottie-container {
|
|
83
84
|
width: 100%;
|
|
@@ -151,14 +152,14 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
151
152
|
<p></p>
|
|
152
153
|
</div>
|
|
153
154
|
<div id="button-area">
|
|
154
|
-
<
|
|
155
|
-
icon="home"
|
|
156
|
-
raised
|
|
157
|
-
label="${i18next.t('button.go to home')}"
|
|
155
|
+
<md-elevated-button
|
|
158
156
|
@click=${e => {
|
|
159
157
|
window.location.replace('/auth/signin')
|
|
160
158
|
}}
|
|
161
|
-
|
|
159
|
+
>
|
|
160
|
+
<md-icon slot="icon">home</md-icon>
|
|
161
|
+
${i18next.t('button.go to home')}
|
|
162
|
+
</md-elevated-button>
|
|
162
163
|
</div>
|
|
163
164
|
|
|
164
165
|
${isSafari()
|
|
@@ -26,28 +26,28 @@ export class AuthSignup extends AbstractSign {
|
|
|
26
26
|
get formfields() {
|
|
27
27
|
const { name = '', email = '' } = this.data || {}
|
|
28
28
|
|
|
29
|
+
// .validationMessage=${this.passwordHelp || ''}
|
|
30
|
+
// .validationMessage=${String(i18next.t('text.passwords do not match'))}
|
|
31
|
+
|
|
29
32
|
return html`
|
|
30
33
|
<div class="field">
|
|
31
|
-
<
|
|
32
|
-
name="name"
|
|
33
|
-
type="text"
|
|
34
|
-
label=${String(i18next.t('field.name'))}
|
|
35
|
-
.value=${name}
|
|
36
|
-
required
|
|
37
|
-
></mwc-textfield>
|
|
34
|
+
<md-filled-text-field name="name" type="text" label=${String(i18next.t('field.name'))} .value=${name} required></md-filled-text-field>
|
|
38
35
|
</div>
|
|
39
36
|
<div class="field">
|
|
40
|
-
<
|
|
37
|
+
<md-filled-text-field
|
|
41
38
|
name="email"
|
|
42
39
|
type="email"
|
|
43
40
|
label=${String(i18next.t('field.email'))}
|
|
44
41
|
required
|
|
45
42
|
.value=${email}
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
@input=${(e: Event) => {
|
|
44
|
+
const target = e.target as HTMLFormElement
|
|
45
|
+
target.setCustomValidity(i18next.t('text.invalid-email'))
|
|
46
|
+
}}
|
|
47
|
+
></md-filled-text-field>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="field">
|
|
50
|
-
<
|
|
50
|
+
<md-filled-text-field
|
|
51
51
|
name="password"
|
|
52
52
|
type="password"
|
|
53
53
|
label=${String(i18next.t('field.password'))}
|
|
@@ -59,22 +59,18 @@ export class AuthSignup extends AbstractSign {
|
|
|
59
59
|
var val = e.target.value
|
|
60
60
|
this.confirmPass.setAttribute('pattern', val.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '[$&]'))
|
|
61
61
|
}}
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
>
|
|
63
|
+
></md-filled-text-field
|
|
64
|
+
>
|
|
64
65
|
</div>
|
|
65
66
|
<div class="field">
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type="password"
|
|
70
|
-
label=${String(i18next.t('field.confirm password'))}
|
|
71
|
-
required
|
|
72
|
-
.validationMessage=${String(i18next.t('text.passwords do not match'))}
|
|
73
|
-
></mwc-textfield>
|
|
67
|
+
<md-filled-text-field id="confirm-password" name="confirm-password" type="password" label=${String(i18next.t('field.confirm password'))} required>
|
|
68
|
+
></md-filled-text-field
|
|
69
|
+
>
|
|
74
70
|
</div>
|
|
75
|
-
<
|
|
71
|
+
<md-elevated-button class="ui button" @click=${e => this._onSubmit(e)}>
|
|
76
72
|
<ox-i18n msgid="field.${this.pageName}"></ox-i18n>
|
|
77
|
-
</
|
|
73
|
+
</md-elevated-button>
|
|
78
74
|
`
|
|
79
75
|
}
|
|
80
76
|
|
|
@@ -86,7 +82,7 @@ export class AuthSignup extends AbstractSign {
|
|
|
86
82
|
get links() {
|
|
87
83
|
return html`
|
|
88
84
|
<a class="link" href="/auth/signin">
|
|
89
|
-
<
|
|
85
|
+
<md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
|
|
90
86
|
</a>
|
|
91
87
|
`
|
|
92
88
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
2
|
|
|
3
3
|
import { html, LitElement } from 'lit'
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -33,7 +33,7 @@ class OAuth2DecisionErrorPage extends LitElement {
|
|
|
33
33
|
<input name="state" type="text" value="${this.req.state}" hidden />
|
|
34
34
|
<input name="email" type="text" value="${this.user.email}" hidden />
|
|
35
35
|
|
|
36
|
-
<
|
|
36
|
+
<md-elevated-button raised @click="${() => history.back()}">Move back</md-elevated-button>
|
|
37
37
|
</form>
|
|
38
38
|
`
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
2
|
import '../../components/role-selector'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
@@ -8,60 +8,65 @@ import { customElement, property, query } from 'lit/decorators.js'
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next } from '@operato/i18n'
|
|
10
10
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
11
12
|
|
|
12
13
|
@customElement('oauth2-decision')
|
|
13
14
|
class OAuth2DecisionPage extends LitElement {
|
|
14
|
-
static styles =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
15
|
+
static styles = [
|
|
16
|
+
ButtonContainerStyles,
|
|
17
|
+
css`
|
|
18
|
+
:host {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
|
|
22
|
+
border: 1px solid var(--primary-color);
|
|
23
|
+
margin: var(--margin-default);
|
|
24
|
+
padding: var(--padding-default);
|
|
25
|
+
font: normal 15px var(--theme-font);
|
|
26
|
+
color: var(--secondary-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[field-2column] {
|
|
30
|
+
border-radius: var(--border-radius);
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: 1fr 1fr;
|
|
33
|
+
gap: 5px 15px;
|
|
34
|
+
clear: both;
|
|
35
|
+
max-width: var(--input-container-max-width);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[field] {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
padding-bottom: var(--padding-default);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input {
|
|
45
|
+
border: var(--border-dark-color);
|
|
46
|
+
border-radius: var(--border-radius);
|
|
47
|
+
margin: var(--input-margin);
|
|
48
|
+
padding: var(--input-padding);
|
|
49
|
+
min-width: 250px;
|
|
50
|
+
font: var(--input-font);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
label {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
font: var(--label-font);
|
|
57
|
+
color: var(--label-color);
|
|
58
|
+
text-transform: var(--label-text-transform);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
md-elevated-button {
|
|
62
|
+
margin-right: var(--padding-narrow);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[danger] {
|
|
66
|
+
--md-theme-primary: var(--md-danger-button-primary-color);
|
|
67
|
+
}
|
|
68
|
+
`
|
|
69
|
+
]
|
|
65
70
|
|
|
66
71
|
@property({ type: Object }) data: any = {}
|
|
67
72
|
@property({ type: Object }) user: any = {}
|
|
@@ -109,9 +114,9 @@ class OAuth2DecisionPage extends LitElement {
|
|
|
109
114
|
|
|
110
115
|
<role-selector .roleCategory="${this.domain.name}" .roles="${this.roles}"></role-selector>
|
|
111
116
|
|
|
112
|
-
<div
|
|
113
|
-
<
|
|
114
|
-
<
|
|
117
|
+
<div class="button-container">
|
|
118
|
+
<md-elevated-button @click="${() => this.decision(true)}" raised label="Allow"></md-elevated-button>
|
|
119
|
+
<md-elevated-button @click="${() => this.decision(false)}" raised danger label="Deny"></md-elevated-button>
|
|
115
120
|
</div>
|
|
116
121
|
`
|
|
117
122
|
}
|