@things-factory/auth-ui 7.0.1-alpha.1 → 7.0.1-alpha.100
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 +12 -8
- 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/my-login-history.ts +1 -1
- package/client/components/ownership-transfer-popup.ts +4 -4
- package/client/components/partner-role-editor.ts +11 -17
- package/client/components/profile-component.ts +127 -8
- 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 +49 -25
- package/client/index.ts +93 -66
- package/client/pages/app-binding/app-binding.ts +4 -2
- package/client/pages/app-binding/app-bindings.ts +3 -3
- package/client/pages/appliance/appliance.ts +4 -2
- package/client/pages/appliance/home.ts +2 -2
- package/client/pages/appliance/register.ts +2 -2
- package/client/pages/application/application.ts +30 -51
- package/client/pages/application/applications.ts +6 -10
- package/client/pages/application/register.ts +2 -2
- 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/partner/partner-management.ts +1 -1
- package/client/pages/profile.ts +1 -1
- package/client/pages/role/role-management.ts +4 -5
- package/client/pages/user/user-management.ts +5 -3
- package/client/themes/auth-theme.css +1 -1
- 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 +7 -7
- 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 +4 -3
- 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.d.ts +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 +5 -5
- 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 +12 -8
- 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.d.ts +1 -1
- 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 +3 -1
- 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/my-login-history.js +1 -1
- 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 +4 -4
- package/dist-client/components/ownership-transfer-popup.js.map +1 -1
- package/dist-client/components/partner-info-card.d.ts +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 +8 -1
- package/dist-client/components/profile-component.js +117 -8
- 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/role-selector.d.ts +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 +3 -2
- 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 +3 -3
- 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 +4 -3
- 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 +3 -3
- 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.d.ts +2 -2
- 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 +4 -3
- package/dist-client/entries/public/home.js +49 -25
- 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 +3 -2
- package/dist-client/pages/app-binding/app-binding.js.map +1 -1
- package/dist-client/pages/app-binding/app-bindings.js +3 -3
- 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 +3 -2
- package/dist-client/pages/appliance/appliance.js.map +1 -1
- package/dist-client/pages/appliance/home.js +2 -2
- package/dist-client/pages/appliance/home.js.map +1 -1
- package/dist-client/pages/appliance/register.js +2 -2
- 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 +29 -51
- package/dist-client/pages/application/application.js.map +1 -1
- package/dist-client/pages/application/applications.js +6 -10
- package/dist-client/pages/application/applications.js.map +1 -1
- package/dist-client/pages/application/register.js +2 -2
- 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 +12 -3
- 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 +12 -3
- 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 +2 -1
- 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 +1 -1
- package/dist-client/pages/partner/partner-management.js.map +1 -1
- package/dist-client/pages/profile.d.ts +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 +3 -3
- 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 +4 -3
- package/dist-client/pages/user/user-management.js.map +1 -1
- package/dist-client/themes/auth-theme.css +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,8 +1,10 @@
|
|
|
1
|
-
import '@material/
|
|
2
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/text-button.js'
|
|
3
|
+
import '@material/web/button/elevated-button.js'
|
|
3
4
|
|
|
4
5
|
import { css, html, LitElement } from 'lit'
|
|
5
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
|
+
import { ifDefined } from 'lit/directives/if-defined.js'
|
|
6
8
|
|
|
7
9
|
import { i18next, localize } from '@operato/i18n'
|
|
8
10
|
|
|
@@ -15,25 +17,41 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
15
17
|
position: relative;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
.signin {
|
|
19
21
|
position: absolute;
|
|
20
|
-
|
|
22
|
+
right: 20px;
|
|
21
23
|
top: 10px;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
display: inline-block;
|
|
25
|
+
padding: 12px 24px;
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
29
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
30
|
+
border: none;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
transition:
|
|
35
|
+
background-color 0.3s,
|
|
36
|
+
transform 0.3s;
|
|
24
37
|
}
|
|
25
38
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
.signin:hover {
|
|
40
|
+
color: var(--md-sys-color-tertiary-container);
|
|
41
|
+
background-color: var(--md-sys-color-on-tertiary-container);
|
|
42
|
+
transform: translateY(-2px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.signin:active {
|
|
46
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
47
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
48
|
+
transform: translateY(0);
|
|
31
49
|
}
|
|
32
50
|
|
|
33
51
|
[message] {
|
|
34
|
-
background-color: var(--
|
|
52
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
35
53
|
padding: 60px 50px 0 50px;
|
|
36
|
-
color: var(--secondary-
|
|
54
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
37
55
|
text-align: center;
|
|
38
56
|
font-size: 20px;
|
|
39
57
|
}
|
|
@@ -66,15 +84,15 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
66
84
|
align-items: center;
|
|
67
85
|
border-radius: 12px;
|
|
68
86
|
overflow: hidden;
|
|
69
|
-
background-color: var(--
|
|
87
|
+
background-color: var(--md-sys-color-primary);
|
|
70
88
|
box-shadow: var(--box-shadow);
|
|
71
|
-
border-right: 3px dotted var(--
|
|
89
|
+
border-right: 3px dotted var(--md-sys-color-secondary-container);
|
|
72
90
|
text-align: center;
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
[ticket] [content] {
|
|
76
94
|
border-radius: 12px;
|
|
77
|
-
background-color: var(--
|
|
95
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
78
96
|
padding: var(--padding-default) var(--padding-wide);
|
|
79
97
|
box-shadow: var(--box-shadow);
|
|
80
98
|
}
|
|
@@ -94,9 +112,9 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
94
112
|
}
|
|
95
113
|
|
|
96
114
|
input {
|
|
97
|
-
border: var(--
|
|
115
|
+
border: var(--md-sys-color-outline);
|
|
98
116
|
border-radius: var(--border-radius);
|
|
99
|
-
padding: var(--
|
|
117
|
+
padding: var(--padding-default);
|
|
100
118
|
font: var(--input-font);
|
|
101
119
|
}
|
|
102
120
|
|
|
@@ -139,7 +157,7 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
139
157
|
border: 0;
|
|
140
158
|
}
|
|
141
159
|
[content] {
|
|
142
|
-
border: 1px solid var(--
|
|
160
|
+
border: 1px solid var(--md-sys-color-primary);
|
|
143
161
|
}
|
|
144
162
|
|
|
145
163
|
fieldset {
|
|
@@ -150,7 +168,7 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
150
168
|
margin: var(--margin-narrow) 0 var(--margin-default) 0;
|
|
151
169
|
text-align: center;
|
|
152
170
|
}
|
|
153
|
-
fieldset
|
|
171
|
+
fieldset md-text-button {
|
|
154
172
|
width: 100%;
|
|
155
173
|
}
|
|
156
174
|
}
|
|
@@ -171,8 +189,15 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
171
189
|
const explanation2 = this.explanation2 || 'Everything you need to go from where you are, to where you want to be.'
|
|
172
190
|
|
|
173
191
|
return html`
|
|
174
|
-
<
|
|
175
|
-
|
|
192
|
+
<a
|
|
193
|
+
class="signin"
|
|
194
|
+
@click=${e => {
|
|
195
|
+
e.preventDefault()
|
|
196
|
+
window.location.href = '/auth/signin'
|
|
197
|
+
}}
|
|
198
|
+
>
|
|
199
|
+
${i18next.t('button.sign_in')}</a
|
|
200
|
+
>
|
|
176
201
|
|
|
177
202
|
<div message>
|
|
178
203
|
<strong>${tagline}</strong> ${explanation1} <br />
|
|
@@ -181,14 +206,13 @@ export class HomePage extends localize(i18next)(LitElement) {
|
|
|
181
206
|
</div>
|
|
182
207
|
|
|
183
208
|
<div ticket>
|
|
184
|
-
<div brand><img src=${icon} /></div>
|
|
209
|
+
<div brand><img src=${ifDefined(icon)} /></div>
|
|
185
210
|
<div content>
|
|
186
|
-
<form action="/auth/join" accept-charset="utf-8" name="join" method="
|
|
211
|
+
<form action="/auth/join" accept-charset="utf-8" name="join" method="post">
|
|
187
212
|
<fieldset>
|
|
188
213
|
<legend>${title} invitation ticket</legend>
|
|
189
214
|
<input type="text" name="email" placeholder="Enter your email address" />
|
|
190
215
|
<input type="submit" value="join now" />
|
|
191
|
-
<!-- help this button, pls <mwc-button raised label="join now"></mwc-button> -->
|
|
192
216
|
</fieldset>
|
|
193
217
|
</form>
|
|
194
218
|
</div>
|
package/client/index.ts
CHANGED
|
@@ -1,97 +1,124 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
3
|
|
|
4
4
|
import { html } from 'lit-html'
|
|
5
5
|
|
|
6
6
|
import { navigate, store } from '@operato/shell'
|
|
7
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
7
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
8
8
|
import { hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
9
9
|
|
|
10
10
|
export * from './components/role-selector.js'
|
|
11
11
|
export * from './components/domain-switch.js'
|
|
12
12
|
export * from './components/invite-user.js'
|
|
13
13
|
|
|
14
|
-
export
|
|
14
|
+
export type AuthManagementMenuOptions = {
|
|
15
|
+
role?: boolean
|
|
16
|
+
appliance?: boolean
|
|
17
|
+
application?: boolean
|
|
18
|
+
user?: boolean
|
|
19
|
+
authProvider?: boolean
|
|
20
|
+
domain?: boolean
|
|
21
|
+
attribute?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function setAuthManagementMenus(options?: any) {
|
|
25
|
+
const {
|
|
26
|
+
role = true,
|
|
27
|
+
appliance = true,
|
|
28
|
+
application = true,
|
|
29
|
+
user = true,
|
|
30
|
+
authProvider = true,
|
|
31
|
+
domain = true,
|
|
32
|
+
attribute = true
|
|
33
|
+
} = options || {}
|
|
34
|
+
|
|
15
35
|
if (
|
|
16
36
|
await hasPrivilege({ privilege: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })
|
|
17
37
|
) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
38
|
+
role &&
|
|
39
|
+
store.dispatch({
|
|
40
|
+
type: ADD_MORENDA,
|
|
41
|
+
morenda: {
|
|
42
|
+
icon: html` <md-icon>how_to_reg</md-icon> `,
|
|
43
|
+
name: html` <ox-i18n msgid="text.role_management"></ox-i18n> `,
|
|
44
|
+
action: () => {
|
|
45
|
+
navigate('roles')
|
|
46
|
+
}
|
|
25
47
|
}
|
|
26
|
-
}
|
|
27
|
-
})
|
|
48
|
+
})
|
|
28
49
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
appliance &&
|
|
51
|
+
store.dispatch({
|
|
52
|
+
type: ADD_MORENDA,
|
|
53
|
+
morenda: {
|
|
54
|
+
icon: html` <md-icon>devices</md-icon> `,
|
|
55
|
+
name: html` <ox-i18n msgid="text.appliance"></ox-i18n> `,
|
|
56
|
+
action: () => {
|
|
57
|
+
navigate('appliance-home')
|
|
58
|
+
}
|
|
36
59
|
}
|
|
37
|
-
}
|
|
38
|
-
})
|
|
60
|
+
})
|
|
39
61
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
application &&
|
|
63
|
+
store.dispatch({
|
|
64
|
+
type: ADD_MORENDA,
|
|
65
|
+
morenda: {
|
|
66
|
+
icon: html` <md-icon>apps</md-icon> `,
|
|
67
|
+
name: html` <ox-i18n msgid="text.application management"></ox-i18n> `,
|
|
68
|
+
action: () => {
|
|
69
|
+
navigate('applications')
|
|
70
|
+
}
|
|
47
71
|
}
|
|
48
|
-
}
|
|
49
|
-
})
|
|
72
|
+
})
|
|
50
73
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
74
|
+
user &&
|
|
75
|
+
store.dispatch({
|
|
76
|
+
type: ADD_MORENDA,
|
|
77
|
+
morenda: {
|
|
78
|
+
icon: html` <md-icon>people</md-icon> `,
|
|
79
|
+
name: html` <ox-i18n msgid="text.user management"></ox-i18n> `,
|
|
80
|
+
action: () => {
|
|
81
|
+
navigate('users')
|
|
82
|
+
}
|
|
58
83
|
}
|
|
59
|
-
}
|
|
60
|
-
})
|
|
84
|
+
})
|
|
61
85
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
86
|
+
authProvider &&
|
|
87
|
+
store.dispatch({
|
|
88
|
+
type: ADD_MORENDA,
|
|
89
|
+
morenda: {
|
|
90
|
+
icon: html` <md-icon>badge</md-icon> `,
|
|
91
|
+
name: html` <ox-i18n msgid="text.auth-provider management"></ox-i18n> `,
|
|
92
|
+
action: () => {
|
|
93
|
+
navigate('auth-providers')
|
|
94
|
+
}
|
|
69
95
|
}
|
|
70
|
-
}
|
|
71
|
-
})
|
|
96
|
+
})
|
|
72
97
|
}
|
|
73
98
|
|
|
74
99
|
if (await hasPrivilege({ superUserGranted: true })) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
domain &&
|
|
101
|
+
store.dispatch({
|
|
102
|
+
type: ADD_MORENDA,
|
|
103
|
+
morenda: {
|
|
104
|
+
icon: html` <md-icon>business</md-icon> `,
|
|
105
|
+
name: html` <ox-i18n msgid="text.domain management"></ox-i18n> `,
|
|
106
|
+
action: () => {
|
|
107
|
+
navigate('domains')
|
|
108
|
+
}
|
|
82
109
|
}
|
|
83
|
-
}
|
|
84
|
-
})
|
|
110
|
+
})
|
|
85
111
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
112
|
+
attribute &&
|
|
113
|
+
store.dispatch({
|
|
114
|
+
type: ADD_MORENDA,
|
|
115
|
+
morenda: {
|
|
116
|
+
icon: html` <md-icon>dataset</md-icon> `,
|
|
117
|
+
name: html` <ox-i18n msgid="text.attribute management"></ox-i18n> `,
|
|
118
|
+
action: () => {
|
|
119
|
+
navigate('attributes')
|
|
120
|
+
}
|
|
93
121
|
}
|
|
94
|
-
}
|
|
95
|
-
})
|
|
122
|
+
})
|
|
96
123
|
}
|
|
97
124
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import Clipboard from 'clipboard'
|
|
2
4
|
import gql from 'graphql-tag'
|
|
3
5
|
import { css, html } from 'lit'
|
|
@@ -20,7 +22,7 @@ class AppBinding extends connect(store)(PageView) {
|
|
|
20
22
|
|
|
21
23
|
position: relative;
|
|
22
24
|
|
|
23
|
-
background-color: var(--
|
|
25
|
+
background-color: var(--md-sys-color-background);
|
|
24
26
|
padding: var(--padding-wide);
|
|
25
27
|
}
|
|
26
28
|
h2 {
|
|
@@ -164,7 +166,7 @@ class AppBinding extends connect(store)(PageView) {
|
|
|
164
166
|
|
|
165
167
|
return html`
|
|
166
168
|
<div>
|
|
167
|
-
<h2><
|
|
169
|
+
<h2><md-icon>link</md-icon> ${app.name}</h2>
|
|
168
170
|
<p page-description>${app.description}</p>
|
|
169
171
|
</div>
|
|
170
172
|
|
|
@@ -11,12 +11,12 @@ class AppBindings extends connect(store)(PageView) {
|
|
|
11
11
|
static styles = [
|
|
12
12
|
css`
|
|
13
13
|
:host {
|
|
14
|
-
background-color: var(--
|
|
14
|
+
background-color: var(--md-sys-color-background);
|
|
15
15
|
padding: var(--padding-wide);
|
|
16
16
|
|
|
17
17
|
overflow: auto;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
md-elevated-button {
|
|
20
20
|
margin-right: 0;
|
|
21
21
|
float: right;
|
|
22
22
|
}
|
|
@@ -114,7 +114,7 @@ class AppBindings extends connect(store)(PageView) {
|
|
|
114
114
|
`
|
|
115
115
|
)}
|
|
116
116
|
</table>
|
|
117
|
-
<
|
|
117
|
+
<md-elevated-button @click=${e => navigate('applications')}>registered applications ..</md-elevated-button>
|
|
118
118
|
`
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import Clipboard from 'clipboard'
|
|
2
4
|
import gql from 'graphql-tag'
|
|
3
5
|
import { css, html } from 'lit'
|
|
@@ -19,7 +21,7 @@ class Appliance extends connect(store)(PageView) {
|
|
|
19
21
|
flex-direction: column;
|
|
20
22
|
overflow-y: auto;
|
|
21
23
|
|
|
22
|
-
background-color: var(--
|
|
24
|
+
background-color: var(--md-sys-color-background);
|
|
23
25
|
padding: var(--padding-wide);
|
|
24
26
|
}
|
|
25
27
|
h2 {
|
|
@@ -150,7 +152,7 @@ class Appliance extends connect(store)(PageView) {
|
|
|
150
152
|
|
|
151
153
|
return html`
|
|
152
154
|
<div>
|
|
153
|
-
<h2><
|
|
155
|
+
<h2><md-icon>devices</md-icon> ${appliance.name}</h2>
|
|
154
156
|
<p page-description>${appliance.description}</p>
|
|
155
157
|
</div>
|
|
156
158
|
|
|
@@ -11,7 +11,7 @@ class Appliances extends connect(store)(PageView) {
|
|
|
11
11
|
static styles = [
|
|
12
12
|
css`
|
|
13
13
|
:host {
|
|
14
|
-
background-color: var(--
|
|
14
|
+
background-color: var(--md-sys-color-background);
|
|
15
15
|
padding: var(--padding-wide);
|
|
16
16
|
|
|
17
17
|
overflow: auto;
|
|
@@ -99,7 +99,7 @@ class Appliances extends connect(store)(PageView) {
|
|
|
99
99
|
What type of appliance are you building?<br />Choose the app type that best suits the audience you’re building
|
|
100
100
|
for. The appliance type can’t be changed after it’s created.
|
|
101
101
|
</p>
|
|
102
|
-
<
|
|
102
|
+
<md-elevated-button @click=${e => navigate('appliance-register')}>register new appliance</md-elevated-button>
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<table>
|
|
@@ -12,7 +12,7 @@ class ApplianceRegister extends connect(store)(PageView) {
|
|
|
12
12
|
return [
|
|
13
13
|
css`
|
|
14
14
|
:host {
|
|
15
|
-
background-color: var(--
|
|
15
|
+
background-color: var(--md-sys-color-background);
|
|
16
16
|
padding: var(--padding-wide);
|
|
17
17
|
|
|
18
18
|
display: flex;
|
|
@@ -136,7 +136,7 @@ class ApplianceRegister extends connect(store)(PageView) {
|
|
|
136
136
|
<input id="netmask" type="text" name="netmask" />
|
|
137
137
|
</div>
|
|
138
138
|
|
|
139
|
-
<
|
|
139
|
+
<md-elevated-button grid-span @click=${this.createAppliance.bind(this)}>register</md-elevated-button>
|
|
140
140
|
</div>
|
|
141
141
|
</form>
|
|
142
142
|
</div>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import Clipboard from 'clipboard'
|
|
2
4
|
import gql from 'graphql-tag'
|
|
3
5
|
import { css, html } from 'lit'
|
|
@@ -8,17 +10,19 @@ import { APPLICATION_TYPES } from '../../constants/application'
|
|
|
8
10
|
|
|
9
11
|
import { client } from '@operato/graphql'
|
|
10
12
|
import { navigate, PageView, store } from '@operato/shell'
|
|
13
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
11
14
|
|
|
12
15
|
@customElement('application-page')
|
|
13
16
|
class Application extends connect(store)(PageView) {
|
|
14
17
|
static styles = [
|
|
18
|
+
ButtonContainerStyles,
|
|
15
19
|
css`
|
|
16
20
|
:host {
|
|
17
21
|
display: flex;
|
|
18
22
|
flex-direction: column;
|
|
19
23
|
overflow-y: auto;
|
|
20
24
|
position: relative;
|
|
21
|
-
background-color: var(--
|
|
25
|
+
background-color: var(--md-sys-color-background);
|
|
22
26
|
padding: var(--padding-wide);
|
|
23
27
|
}
|
|
24
28
|
h2 {
|
|
@@ -53,15 +57,12 @@ class Application extends connect(store)(PageView) {
|
|
|
53
57
|
border: var(--border-dark-color);
|
|
54
58
|
border-radius: var(--border-radius);
|
|
55
59
|
margin: var(--input-margin);
|
|
56
|
-
padding:
|
|
60
|
+
padding: 9px;
|
|
57
61
|
font: var(--input-font);
|
|
58
62
|
flex: 1;
|
|
59
63
|
}
|
|
60
64
|
select:focus,
|
|
61
65
|
input:focus,
|
|
62
|
-
button {
|
|
63
|
-
outline: none;
|
|
64
|
-
}
|
|
65
66
|
form {
|
|
66
67
|
max-width: var(--content-container-max-width);
|
|
67
68
|
}
|
|
@@ -102,23 +103,19 @@ class Application extends connect(store)(PageView) {
|
|
|
102
103
|
}
|
|
103
104
|
[button-in-field] {
|
|
104
105
|
position: absolute;
|
|
105
|
-
top:
|
|
106
|
-
right:
|
|
106
|
+
top: 16px;
|
|
107
|
+
right: 2px;
|
|
108
|
+
padding: 0;
|
|
109
|
+
border-radius: 0;
|
|
107
110
|
}
|
|
108
111
|
[input-hint] {
|
|
109
112
|
font: var(--input-hint-font);
|
|
110
113
|
color: var(--input-hint-color);
|
|
111
114
|
}
|
|
112
115
|
[danger] {
|
|
113
|
-
--
|
|
114
|
-
}
|
|
115
|
-
.button-container {
|
|
116
|
-
margin-top: var(--margin-wide);
|
|
117
|
-
text-align: right;
|
|
118
|
-
}
|
|
119
|
-
.button-container mwc-button {
|
|
120
|
-
margin-left: var(--margin-narrow);
|
|
116
|
+
--md-theme-primary: var(--md-danger-button-primary-color);
|
|
121
117
|
}
|
|
118
|
+
|
|
122
119
|
@media screen and (max-width: 480px) {
|
|
123
120
|
[field] {
|
|
124
121
|
grid-column: span 2;
|
|
@@ -145,7 +142,7 @@ class Application extends connect(store)(PageView) {
|
|
|
145
142
|
|
|
146
143
|
return html`
|
|
147
144
|
<div>
|
|
148
|
-
<h2><
|
|
145
|
+
<h2><md-icon>apps</md-icon> ${app.name}</h2>
|
|
149
146
|
<p page-description>${app.description}</p>
|
|
150
147
|
</div>
|
|
151
148
|
|
|
@@ -211,28 +208,18 @@ class Application extends connect(store)(PageView) {
|
|
|
211
208
|
<div field grid-span>
|
|
212
209
|
<label for="auth-url">auth URL</label>
|
|
213
210
|
<input id="auth-url" type="text" .value=${app.authUrl} readonly />
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
button-in-field
|
|
218
|
-
clipboard-copy
|
|
219
|
-
@click=${e => e.preventDefault()}
|
|
220
|
-
label="copy"
|
|
221
|
-
></mwc-button>
|
|
211
|
+
<md-text-button dense button-in-field clipboard-copy @click=${e => e.preventDefault()}
|
|
212
|
+
>copy</md-text-button
|
|
213
|
+
>
|
|
222
214
|
The endpoint for authorization server. This is used to get the authorization code.
|
|
223
215
|
</div>
|
|
224
216
|
|
|
225
217
|
<div field grid-span>
|
|
226
218
|
<label for="access-token-url">access token URL</label>
|
|
227
219
|
<input id="access-token-url" type="text" .value=${app.accessTokenUrl} readonly />
|
|
228
|
-
<
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
button-in-field
|
|
232
|
-
clipboard-copy
|
|
233
|
-
@click=${e => e.preventDefault()}
|
|
234
|
-
label="copy"
|
|
235
|
-
></mwc-button>
|
|
220
|
+
<md-text-button dense button-in-field clipboard-copy @click=${e => e.preventDefault()}
|
|
221
|
+
>copy</md-text-button
|
|
222
|
+
>
|
|
236
223
|
The endpoint for authentication server. This is used to exchange the authorization code for an access
|
|
237
224
|
token.
|
|
238
225
|
</div>
|
|
@@ -247,36 +234,28 @@ class Application extends connect(store)(PageView) {
|
|
|
247
234
|
<div field grid-span>
|
|
248
235
|
<label for="app-key">appKey</label>
|
|
249
236
|
<input id="app-key" type="text" .value=${app.appKey} readonly />
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
button-in-field
|
|
254
|
-
clipboard-copy
|
|
255
|
-
@click=${e => e.preventDefault()}
|
|
256
|
-
label="copy"
|
|
257
|
-
></mwc-button>
|
|
237
|
+
<md-text-button dense button-in-field clipboard-copy @click=${e => e.preventDefault()}
|
|
238
|
+
>copy</md-text-button
|
|
239
|
+
>
|
|
258
240
|
</div>
|
|
259
241
|
|
|
260
242
|
<div field grid-span>
|
|
261
243
|
<label for="app-secret">appSecret</label>
|
|
262
244
|
<input id="app-secret" type="text" .value=${app.appSecret} readonly />
|
|
263
|
-
<
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
button-in-field
|
|
267
|
-
clipboard-copy
|
|
268
|
-
@click=${e => e.preventDefault()}
|
|
269
|
-
label="copy"
|
|
270
|
-
></mwc-button>
|
|
245
|
+
<md-text-button dense button-in-field clipboard-copy @click=${e => e.preventDefault()}
|
|
246
|
+
>copy</md-text-button
|
|
247
|
+
>
|
|
271
248
|
</div>
|
|
272
249
|
</div>
|
|
273
250
|
</fieldset>
|
|
274
251
|
</div>
|
|
275
252
|
|
|
276
253
|
<div class="button-container">
|
|
277
|
-
<
|
|
278
|
-
|
|
279
|
-
|
|
254
|
+
<button danger @click=${this.deleteApplication.bind(this)}>
|
|
255
|
+
<md-icon>delete_forever</md-icon>delete this app
|
|
256
|
+
</button>
|
|
257
|
+
<button @click=${this.updateApplication.bind(this)}><md-icon>save</md-icon>update</button>
|
|
258
|
+
<button><md-icon>passkey</md-icon>generate new secret</button>
|
|
280
259
|
</div>
|
|
281
260
|
</form>
|
|
282
261
|
`
|
|
@@ -11,13 +11,13 @@ class Applications extends connect(store)(PageView) {
|
|
|
11
11
|
static styles = [
|
|
12
12
|
css`
|
|
13
13
|
:host {
|
|
14
|
-
background-color: var(--
|
|
14
|
+
background-color: var(--md-sys-color-background);
|
|
15
15
|
padding: var(--padding-wide);
|
|
16
16
|
|
|
17
17
|
overflow: auto;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
md-outlined-button {
|
|
21
21
|
float: right;
|
|
22
22
|
margin-top: var(--margin-default);
|
|
23
23
|
}
|
|
@@ -102,14 +102,11 @@ class Applications extends connect(store)(PageView) {
|
|
|
102
102
|
<p page-description>
|
|
103
103
|
What type of app are you building?<br />Choose the app type that best suits the audience you’re building for.
|
|
104
104
|
</p>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
label="register new application"
|
|
109
|
-
></mwc-button>
|
|
105
|
+
<md-elevated-button @click=${e => navigate('application-register')}
|
|
106
|
+
>register new application</md-elevated-button
|
|
107
|
+
>
|
|
110
108
|
</div>
|
|
111
109
|
|
|
112
|
-
<!-- <div> -->
|
|
113
110
|
<table>
|
|
114
111
|
<tr>
|
|
115
112
|
<th>app name</th>
|
|
@@ -134,8 +131,7 @@ class Applications extends connect(store)(PageView) {
|
|
|
134
131
|
)}
|
|
135
132
|
</table>
|
|
136
133
|
|
|
137
|
-
<
|
|
138
|
-
<!-- </div> -->
|
|
134
|
+
<md-outlined-button @click=${e => navigate('app-bindings')}>bound applications ..</md-outlined-button>
|
|
139
135
|
`
|
|
140
136
|
}
|
|
141
137
|
|