@things-factory/auth-ui 7.0.0-alpha.9 → 7.0.0
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 +45 -33
- package/client/bootstrap.ts +6 -10
- package/client/components/abstract-auth-page.ts +48 -24
- package/client/components/abstract-password-reset.ts +13 -9
- package/client/components/abstract-sign.ts +105 -0
- package/client/components/change-password.ts +4 -4
- package/client/components/contact-us.ts +20 -26
- package/client/components/create-domain-popup.ts +16 -12
- package/client/components/create-role.ts +14 -16
- package/client/components/create-user.ts +15 -14
- package/client/components/credential-manager.ts +64 -0
- package/client/components/delete-user-popup.ts +4 -3
- package/client/components/domain-switch.ts +18 -15
- package/client/components/invite-customer.ts +6 -10
- package/client/components/invite-user.ts +5 -8
- package/client/components/my-login-history.ts +2 -2
- package/client/components/ownership-transfer-popup.ts +7 -7
- package/client/components/partner-info-card.ts +6 -6
- package/client/components/partner-role-editor.ts +15 -23
- package/client/components/profile-component.ts +71 -15
- package/client/components/role-edit-form.ts +3 -3
- package/client/components/role-privilege-editor.ts +19 -29
- package/client/components/role-selector.ts +7 -7
- package/client/components/user-role-editor.ts +43 -50
- package/client/entries/auth/activate.ts +20 -21
- package/client/entries/auth/checkin.ts +29 -31
- package/client/entries/auth/forgot-password.ts +15 -9
- package/client/entries/auth/result.ts +21 -18
- package/client/entries/auth/signin.ts +4 -0
- package/client/entries/auth/signup.ts +31 -14
- package/client/entries/oauth2/oauth2-decision-error-page.ts +2 -2
- package/client/entries/oauth2/oauth2-decision-page.ts +56 -55
- package/client/entries/public/home.ts +52 -28
- package/client/index.ts +93 -66
- package/client/pages/app-binding/app-binding.ts +48 -30
- package/client/pages/app-binding/app-bindings.ts +26 -7
- package/client/pages/appliance/appliance.ts +85 -26
- package/client/pages/appliance/home.ts +28 -6
- package/client/pages/appliance/register.ts +7 -7
- package/client/pages/application/application.ts +108 -76
- package/client/pages/application/applications.ts +29 -15
- package/client/pages/application/register.ts +8 -8
- package/client/pages/attribute/attribute-set-item-list.ts +13 -19
- 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/partner/partner-management.ts +2 -2
- package/client/pages/profile.ts +1 -1
- package/client/pages/role/role-management.ts +14 -12
- package/client/pages/user/user-management.ts +7 -5
- package/client/themes/auth-theme.css +7 -10
- package/dist-client/auth-style-sign.js +45 -33
- 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 +5 -4
- package/dist-client/components/abstract-auth-page.js +46 -24
- 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 +12 -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 +86 -0
- package/dist-client/components/abstract-sign.js.map +1 -1
- package/dist-client/components/change-password.js +4 -4
- 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 +19 -26
- 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 +16 -12
- 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 +14 -16
- package/dist-client/components/create-role.js.map +1 -1
- package/dist-client/components/create-user.d.ts +2 -1
- package/dist-client/components/create-user.js +14 -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 +4 -3
- 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 +20 -15
- 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 +6 -9
- package/dist-client/components/invite-customer.js.map +1 -1
- package/dist-client/components/invite-user.js +5 -8
- package/dist-client/components/invite-user.js.map +1 -1
- package/dist-client/components/my-login-history.js +2 -2
- package/dist-client/components/my-login-history.js.map +1 -1
- package/dist-client/components/ownership-transfer-popup.d.ts +1 -1
- package/dist-client/components/ownership-transfer-popup.js +7 -7
- package/dist-client/components/ownership-transfer-popup.js.map +1 -1
- package/dist-client/components/partner-info-card.js +6 -6
- package/dist-client/components/partner-info-card.js.map +1 -1
- package/dist-client/components/partner-role-editor.d.ts +2 -2
- package/dist-client/components/partner-role-editor.js +15 -23
- package/dist-client/components/partner-role-editor.js.map +1 -1
- package/dist-client/components/profile-component.d.ts +7 -0
- package/dist-client/components/profile-component.js +70 -15
- package/dist-client/components/profile-component.js.map +1 -1
- package/dist-client/components/role-edit-form.js +3 -3
- package/dist-client/components/role-edit-form.js.map +1 -1
- package/dist-client/components/role-privilege-editor.js +19 -29
- package/dist-client/components/role-privilege-editor.js.map +1 -1
- package/dist-client/components/role-selector.js +7 -7
- package/dist-client/components/role-selector.js.map +1 -1
- package/dist-client/components/user-role-editor.d.ts +2 -0
- package/dist-client/components/user-role-editor.js +42 -49
- package/dist-client/components/user-role-editor.js.map +1 -1
- package/dist-client/entries/auth/activate.d.ts +5 -4
- package/dist-client/entries/auth/activate.js +19 -21
- package/dist-client/entries/auth/activate.js.map +1 -1
- package/dist-client/entries/auth/checkin.d.ts +5 -5
- package/dist-client/entries/auth/checkin.js +27 -28
- 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 +15 -9
- package/dist-client/entries/auth/forgot-password.js.map +1 -1
- package/dist-client/entries/auth/reset-password.js.map +1 -1
- package/dist-client/entries/auth/result.d.ts +5 -5
- package/dist-client/entries/auth/result.js +20 -18
- package/dist-client/entries/auth/result.js.map +1 -1
- package/dist-client/entries/auth/signin.d.ts +1 -0
- package/dist-client/entries/auth/signin.js +3 -0
- package/dist-client/entries/auth/signin.js.map +1 -1
- package/dist-client/entries/auth/signup.js +31 -14
- package/dist-client/entries/auth/signup.js.map +1 -1
- package/dist-client/entries/auth/unlock-user.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 +55 -54
- package/dist-client/entries/oauth2/oauth2-decision-page.js.map +1 -1
- package/dist-client/entries/public/home.d.ts +6 -5
- package/dist-client/entries/public/home.js +52 -28
- 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 +47 -30
- package/dist-client/pages/app-binding/app-binding.js.map +1 -1
- package/dist-client/pages/app-binding/app-bindings.d.ts +2 -1
- package/dist-client/pages/app-binding/app-bindings.js +25 -7
- 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 +84 -26
- package/dist-client/pages/appliance/appliance.js.map +1 -1
- package/dist-client/pages/appliance/home.d.ts +2 -1
- package/dist-client/pages/appliance/home.js +27 -6
- package/dist-client/pages/appliance/home.js.map +1 -1
- package/dist-client/pages/appliance/register.js +7 -7
- 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 +107 -76
- package/dist-client/pages/application/application.js.map +1 -1
- package/dist-client/pages/application/applications.d.ts +2 -1
- package/dist-client/pages/application/applications.js +28 -15
- package/dist-client/pages/application/applications.js.map +1 -1
- package/dist-client/pages/application/register.js +8 -8
- 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 +11 -18
- 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/partner/partner-management.js +2 -2
- package/dist-client/pages/partner/partner-management.js.map +1 -1
- package/dist-client/pages/profile.js +1 -1
- package/dist-client/pages/profile.js.map +1 -1
- package/dist-client/pages/role/role-management.js +13 -10
- package/dist-client/pages/role/role-management.js.map +1 -1
- package/dist-client/pages/user/user-management.d.ts +1 -0
- package/dist-client/pages/user/user-management.js +6 -5
- package/dist-client/pages/user/user-management.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/themes/auth-theme.css +7 -10
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/password-rule.js.map +1 -1
- package/dist-server/index.d.ts +0 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -18
- package/translations/en.json +2 -0
- package/translations/ja.json +2 -0
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
- package/views/auth-page.html +5 -3
- package/views/oauth2-page.html +3 -2
|
@@ -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'
|
|
@@ -20,12 +21,14 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
20
21
|
display: flex;
|
|
21
22
|
flex-direction: column;
|
|
22
23
|
margin: auto;
|
|
23
|
-
background-color: var(--
|
|
24
|
+
background-color: var(--md-sys-color-primary);
|
|
25
|
+
color: var(--md-sys-color-on-primary);
|
|
24
26
|
height: 100vh;
|
|
25
27
|
height: 100dvh;
|
|
26
28
|
}
|
|
27
29
|
.header {
|
|
28
|
-
background-color: var(--
|
|
30
|
+
background-color: var(--md-sys-color-primary);
|
|
31
|
+
color: var(--md-sys-color-on-primary);
|
|
29
32
|
height: var(--checkin-header-height);
|
|
30
33
|
}
|
|
31
34
|
.content {
|
|
@@ -34,32 +37,32 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
.domains {
|
|
37
|
-
margin: var(--
|
|
40
|
+
margin: var(--spacing-large) 0;
|
|
38
41
|
padding: 0;
|
|
39
|
-
background-color: var(--
|
|
42
|
+
background-color: var(--md-sys-color-surface);
|
|
43
|
+
color: var(--md-sys-color-on-surface);
|
|
40
44
|
border-radius: var(--border-radius);
|
|
41
|
-
border: var(--border-
|
|
45
|
+
border: var(--border-dim-color);
|
|
42
46
|
list-style: none;
|
|
43
47
|
}
|
|
44
48
|
li {
|
|
45
|
-
border-bottom: var(--border-
|
|
49
|
+
border-bottom: var(--border-dim-color);
|
|
46
50
|
margin-bottom: -1px;
|
|
47
|
-
padding: var(--
|
|
51
|
+
padding: var(--spacing-medium) var(--spacing-large);
|
|
48
52
|
font-size: 18px;
|
|
49
|
-
color: var(--secondary-color);
|
|
50
53
|
text-align: left;
|
|
51
54
|
|
|
52
55
|
cursor: pointer;
|
|
53
56
|
}
|
|
54
57
|
li:hover {
|
|
55
|
-
background-color:
|
|
58
|
+
background-color: var(--md-sys-color-primary-container);
|
|
59
|
+
color: var(--md-sys-color-on-primary-container);
|
|
56
60
|
}
|
|
57
61
|
li span {
|
|
58
62
|
display: block;
|
|
59
63
|
font: normal var(--fontsize-default) var(--theme-font);
|
|
60
|
-
color: var(--secondary-text-color);
|
|
61
64
|
}
|
|
62
|
-
li
|
|
65
|
+
li md-icon {
|
|
63
66
|
float: right;
|
|
64
67
|
margin: 2px 0 0 0;
|
|
65
68
|
opacity: 0.5;
|
|
@@ -67,14 +70,14 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
67
70
|
.button-container {
|
|
68
71
|
text-align: center;
|
|
69
72
|
}
|
|
70
|
-
.button-container
|
|
71
|
-
margin-left: var(--
|
|
73
|
+
.button-container md-elevated-button {
|
|
74
|
+
margin-left: var(--spacing-small);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
@media (max-width: 450px) {
|
|
75
|
-
.button-container
|
|
78
|
+
.button-container md-elevated-button {
|
|
76
79
|
width: 100%;
|
|
77
|
-
margin: var(--
|
|
80
|
+
margin: var(--spacing-medium) 0 0 0;
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
`,
|
|
@@ -93,7 +96,7 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
93
96
|
var { icon, title, description } = this.applicationMeta
|
|
94
97
|
|
|
95
98
|
return html`
|
|
96
|
-
<div class="content">
|
|
99
|
+
<div class="content md-typescale-display-medium">
|
|
97
100
|
<div class="wrap">
|
|
98
101
|
<div class="auth-brand">
|
|
99
102
|
<img src=${icon || ''} />
|
|
@@ -110,11 +113,9 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
110
113
|
domain => html`
|
|
111
114
|
<li
|
|
112
115
|
@click=${() =>
|
|
113
|
-
(location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(
|
|
114
|
-
this.redirectTo || '/'
|
|
115
|
-
)}`)}
|
|
116
|
+
(location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(this.redirectTo || '/')}`)}
|
|
116
117
|
>
|
|
117
|
-
<
|
|
118
|
+
<md-icon>keyboard_arrow_right</md-icon>
|
|
118
119
|
<strong>${domain.name}</strong>
|
|
119
120
|
<span>${domain.description}</span>
|
|
120
121
|
</li>
|
|
@@ -125,18 +126,15 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
|
|
|
125
126
|
: html` <h3>${i18next.t('text.no domain available')}</h3> `}
|
|
126
127
|
|
|
127
128
|
<div class="button-container">
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
@click="${() => (location.pathname = '/auth/signout')}"
|
|
132
|
-
></mwc-button>
|
|
129
|
+
<md-elevated-button @click=${() => (location.pathname = '/auth/signout')}
|
|
130
|
+
>${String(i18next.t('button.logout'))}</md-elevated-button
|
|
131
|
+
>
|
|
133
132
|
|
|
134
133
|
${this.domainType?.toLowerCase() === 'company'
|
|
135
|
-
? html`<
|
|
136
|
-
raised
|
|
137
|
-
label=${String(i18next.t('button.register business domain'))}
|
|
134
|
+
? html`<md-elevated-button
|
|
138
135
|
@click=${e => (location.href = `/public/business-register?email=${this.user?.email}`)}
|
|
139
|
-
|
|
136
|
+
>${String(i18next.t('button.register business domain'))}</md-elevated-button
|
|
137
|
+
> `
|
|
140
138
|
: ''}
|
|
141
139
|
</div>
|
|
142
140
|
|
|
@@ -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
|
|
|
@@ -26,29 +28,33 @@ export class ForgotPassword extends AbstractAuthPage {
|
|
|
26
28
|
const email = this.data?.email || ''
|
|
27
29
|
|
|
28
30
|
return html`
|
|
29
|
-
<input id="email" name="email" type="hidden" required .value=${email} />
|
|
30
31
|
<div class="field">
|
|
31
|
-
<
|
|
32
|
+
<md-filled-text-field
|
|
32
33
|
name="email"
|
|
33
34
|
type="email"
|
|
34
35
|
label=${String(i18next.t('label.email'))}
|
|
35
36
|
.value=${email}
|
|
36
37
|
required
|
|
37
|
-
@input=${e => {
|
|
38
|
-
|
|
38
|
+
@input=${(e: Event) => {
|
|
39
|
+
const target = e.target as HTMLInputElement
|
|
40
|
+
if (target.validity.typeMismatch) {
|
|
41
|
+
target.setCustomValidity(i18next.t('text.invalid-email'))
|
|
42
|
+
} else {
|
|
43
|
+
target.setCustomValidity('')
|
|
44
|
+
}
|
|
39
45
|
}}
|
|
40
|
-
></
|
|
46
|
+
></md-filled-text-field>
|
|
41
47
|
</div>
|
|
42
|
-
<
|
|
48
|
+
<md-elevated-button id="submit-button" class="ui button" type="submit" @click=${e => this._onSubmit(e)}>
|
|
43
49
|
<ox-i18n msgid="button.submit"></ox-i18n>
|
|
44
|
-
</
|
|
50
|
+
</md-elevated-button>
|
|
45
51
|
`
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
get links() {
|
|
49
55
|
return html`
|
|
50
56
|
<a class="link" href="/auth/signin">
|
|
51
|
-
<
|
|
57
|
+
<md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
|
|
52
58
|
</a>
|
|
53
59
|
`
|
|
54
60
|
}
|
|
@@ -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'
|
|
@@ -17,7 +18,8 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
17
18
|
width: 100vw;
|
|
18
19
|
height: 100vh;
|
|
19
20
|
height: 100dvh;
|
|
20
|
-
background-color: var(--
|
|
21
|
+
background-color: var(--md-sys-color-primary);
|
|
22
|
+
color: var(--md-sys-color-on-primary);
|
|
21
23
|
}
|
|
22
24
|
.wrap {
|
|
23
25
|
display: block;
|
|
@@ -32,7 +34,7 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
32
34
|
.auth-brand img {
|
|
33
35
|
margin: 15% auto 5px auto;
|
|
34
36
|
width: 100px;
|
|
35
|
-
border: 3px solid var(--
|
|
37
|
+
border: 3px solid var(--md-sys-color-on-primary);
|
|
36
38
|
border-radius: 25px;
|
|
37
39
|
box-shadow: var(--box-shadow);
|
|
38
40
|
}
|
|
@@ -45,13 +47,13 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
45
47
|
margin: 50px 0 0 0;
|
|
46
48
|
padding: 0;
|
|
47
49
|
font-size: 24px;
|
|
48
|
-
color: var(--auth-title-color);
|
|
50
|
+
color: var(--auth-title-color, var(--md-sys-color-on-primary));
|
|
49
51
|
}
|
|
50
52
|
p {
|
|
51
53
|
margin: 0;
|
|
52
54
|
padding: var(--auth-description-padding);
|
|
53
55
|
font: var(--auth-description-font);
|
|
54
|
-
color: var(--auth-description-color);
|
|
56
|
+
color: var(--auth-description-color, var(--md-sys-color-on-secondary));
|
|
55
57
|
}
|
|
56
58
|
:host *:focus {
|
|
57
59
|
outline: none;
|
|
@@ -60,25 +62,26 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
60
62
|
background: url(/assets/images/icon-profile.png) center top no-repeat;
|
|
61
63
|
margin: var(--profile-icon-margin);
|
|
62
64
|
padding: 180px 20px 20px 20px;
|
|
63
|
-
color: var(--
|
|
65
|
+
color: var(--md-sys-color-secondary);
|
|
64
66
|
font: var(--header-bar-title);
|
|
65
67
|
text-align: center;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
label {
|
|
69
71
|
font: bold 14px var(--theme-font);
|
|
70
|
-
color: var(--
|
|
72
|
+
color: var(--md-sys-color-primary);
|
|
71
73
|
}
|
|
74
|
+
|
|
72
75
|
#button-area {
|
|
73
76
|
border-top: 1px dashed rgba(0, 0, 0, 0.1);
|
|
74
77
|
padding-top: 10px;
|
|
75
78
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--mdc-button-ink-color: var(--primary-color);
|
|
79
|
+
|
|
80
|
+
md-elevated-button {
|
|
81
|
+
--md-button-horizontal-padding: var(--spacing-medium);
|
|
82
|
+
--md-button-ink-color: var(--md-sys-color-primary);
|
|
81
83
|
}
|
|
84
|
+
|
|
82
85
|
.lottie-container {
|
|
83
86
|
width: 100%;
|
|
84
87
|
height: 300px;
|
|
@@ -151,14 +154,14 @@ export class AuthResult extends localize(i18next)(LitElement) {
|
|
|
151
154
|
<p></p>
|
|
152
155
|
</div>
|
|
153
156
|
<div id="button-area">
|
|
154
|
-
<
|
|
155
|
-
icon="home"
|
|
156
|
-
raised
|
|
157
|
-
label="${i18next.t('button.go to home')}"
|
|
157
|
+
<md-elevated-button
|
|
158
158
|
@click=${e => {
|
|
159
159
|
window.location.replace('/auth/signin')
|
|
160
160
|
}}
|
|
161
|
-
|
|
161
|
+
>
|
|
162
|
+
<md-icon slot="icon">home</md-icon>
|
|
163
|
+
${i18next.t('button.go to home')}
|
|
164
|
+
</md-elevated-button>
|
|
162
165
|
</div>
|
|
163
166
|
|
|
164
167
|
${isSafari()
|
|
@@ -26,28 +26,41 @@ 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
|
-
<
|
|
34
|
+
<md-filled-text-field
|
|
32
35
|
name="name"
|
|
33
36
|
type="text"
|
|
34
37
|
label=${String(i18next.t('field.name'))}
|
|
35
38
|
.value=${name}
|
|
36
39
|
required
|
|
37
|
-
></
|
|
40
|
+
></md-filled-text-field>
|
|
38
41
|
</div>
|
|
39
42
|
<div class="field">
|
|
40
|
-
<
|
|
43
|
+
<md-filled-text-field
|
|
41
44
|
name="email"
|
|
42
45
|
type="email"
|
|
43
46
|
label=${String(i18next.t('field.email'))}
|
|
44
47
|
required
|
|
45
48
|
.value=${email}
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
autocapitalize="off"
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
@input=${(e: Event) => {
|
|
52
|
+
const target = e.target as HTMLInputElement
|
|
53
|
+
if (target.validity.typeMismatch) {
|
|
54
|
+
target.setCustomValidity(i18next.t('text.invalid-email'))
|
|
55
|
+
} else {
|
|
56
|
+
target.setCustomValidity('')
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
><md-icon slot="leading-icon">mail</md-icon></md-filled-text-field
|
|
60
|
+
>
|
|
48
61
|
</div>
|
|
49
62
|
<div class="field">
|
|
50
|
-
<
|
|
63
|
+
<md-filled-text-field
|
|
51
64
|
name="password"
|
|
52
65
|
type="password"
|
|
53
66
|
label=${String(i18next.t('field.password'))}
|
|
@@ -55,26 +68,30 @@ export class AuthSignup extends AbstractSign {
|
|
|
55
68
|
helper=${this.passwordHelp || ''}
|
|
56
69
|
helperPersistent
|
|
57
70
|
required
|
|
71
|
+
autocomplete="off"
|
|
58
72
|
@input=${e => {
|
|
59
73
|
var val = e.target.value
|
|
60
74
|
this.confirmPass.setAttribute('pattern', val.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '[$&]'))
|
|
61
75
|
}}
|
|
62
|
-
|
|
63
|
-
|
|
76
|
+
>
|
|
77
|
+
></md-filled-text-field
|
|
78
|
+
>
|
|
64
79
|
</div>
|
|
65
80
|
<div class="field">
|
|
66
|
-
<
|
|
81
|
+
<md-filled-text-field
|
|
67
82
|
id="confirm-password"
|
|
68
83
|
name="confirm-password"
|
|
69
84
|
type="password"
|
|
85
|
+
autocomplete="off"
|
|
70
86
|
label=${String(i18next.t('field.confirm password'))}
|
|
71
87
|
required
|
|
72
|
-
|
|
73
|
-
|
|
88
|
+
>
|
|
89
|
+
></md-filled-text-field
|
|
90
|
+
>
|
|
74
91
|
</div>
|
|
75
|
-
<
|
|
92
|
+
<md-elevated-button class="ui button" @click=${e => this._onSubmit(e)}>
|
|
76
93
|
<ox-i18n msgid="field.${this.pageName}"></ox-i18n>
|
|
77
|
-
</
|
|
94
|
+
</md-elevated-button>
|
|
78
95
|
`
|
|
79
96
|
}
|
|
80
97
|
|
|
@@ -86,7 +103,7 @@ export class AuthSignup extends AbstractSign {
|
|
|
86
103
|
get links() {
|
|
87
104
|
return html`
|
|
88
105
|
<a class="link" href="/auth/signin">
|
|
89
|
-
<
|
|
106
|
+
<md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
|
|
90
107
|
</a>
|
|
91
108
|
`
|
|
92
109
|
}
|
|
@@ -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,61 @@ 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(--md-sys-color-primary);
|
|
23
|
+
margin: var(--spacing-medium);
|
|
24
|
+
padding: var(--spacing-medium);
|
|
25
|
+
font: normal 15px var(--theme-font);
|
|
26
|
+
color: var(--md-sys-color-secondary);
|
|
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(--spacing-medium);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input {
|
|
45
|
+
border: var(--border-dim-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, var(--md-sys-color-on-surface));
|
|
58
|
+
text-transform: var(--label-text-transform);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
md-elevated-button {
|
|
62
|
+
margin-right: var(--spacing-small);
|
|
63
|
+
}
|
|
64
|
+
`
|
|
65
|
+
]
|
|
65
66
|
|
|
66
67
|
@property({ type: Object }) data: any = {}
|
|
67
68
|
@property({ type: Object }) user: any = {}
|
|
@@ -109,9 +110,9 @@ class OAuth2DecisionPage extends LitElement {
|
|
|
109
110
|
|
|
110
111
|
<role-selector .roleCategory="${this.domain.name}" .roles="${this.roles}"></role-selector>
|
|
111
112
|
|
|
112
|
-
<div
|
|
113
|
-
<
|
|
114
|
-
<
|
|
113
|
+
<div class="button-container">
|
|
114
|
+
<md-elevated-button @click="${() => this.decision(true)}" raised label="Allow"></md-elevated-button>
|
|
115
|
+
<md-elevated-button @click="${() => this.decision(false)}" raised danger label="Deny"></md-elevated-button>
|
|
115
116
|
</div>
|
|
116
117
|
`
|
|
117
118
|
}
|