@things-factory/board-ui 7.0.1-alpha.60 → 7.0.1-alpha.69
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/apptools/favorite-tool.ts +8 -7
- package/client/board-list/board-tile-list.ts +38 -34
- package/client/board-list/group-bar-styles.ts +4 -0
- package/client/board-list/group-bar.ts +7 -8
- package/client/board-list/play-group-bar.ts +4 -4
- package/client/data-grist/board-renderer.ts +6 -6
- package/client/pages/board-list-page.ts +20 -6
- package/client/setting-let/board-view-setting-let.ts +10 -6
- package/client/viewparts/board-basic-info.ts +192 -214
- package/client/viewparts/board-info-link.ts +1 -1
- package/client/viewparts/board-info.ts +3 -3
- package/client/viewparts/board-template-builder.ts +0 -1
- package/client/viewparts/board-versions.ts +20 -12
- package/client/viewparts/group-info-basic.ts +48 -36
- package/client/viewparts/group-info-import.ts +8 -11
- package/client/viewparts/group-info.ts +1 -1
- package/client/viewparts/link-builder.ts +8 -8
- package/client/viewparts/play-group-info-basic.ts +38 -34
- package/client/viewparts/play-group-info-link.ts +1 -1
- package/client/viewparts/play-group-info.ts +1 -1
- package/dist-client/apptools/favorite-tool.d.ts +3 -3
- package/dist-client/apptools/favorite-tool.js +6 -6
- package/dist-client/apptools/favorite-tool.js.map +1 -1
- package/dist-client/board-list/board-tile-list.d.ts +1 -1
- package/dist-client/board-list/board-tile-list.js +30 -26
- package/dist-client/board-list/board-tile-list.js.map +1 -1
- package/dist-client/board-list/group-bar-styles.js +4 -0
- package/dist-client/board-list/group-bar-styles.js.map +1 -1
- package/dist-client/board-list/group-bar.d.ts +1 -1
- package/dist-client/board-list/group-bar.js +6 -6
- package/dist-client/board-list/group-bar.js.map +1 -1
- package/dist-client/board-list/play-group-bar.d.ts +1 -1
- package/dist-client/board-list/play-group-bar.js +3 -3
- package/dist-client/board-list/play-group-bar.js.map +1 -1
- package/dist-client/data-grist/board-renderer.d.ts +1 -1
- package/dist-client/data-grist/board-renderer.js +6 -6
- package/dist-client/data-grist/board-renderer.js.map +1 -1
- package/dist-client/pages/board-list-page.d.ts +0 -1
- package/dist-client/pages/board-list-page.js +17 -5
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/setting-let/board-view-setting-let.d.ts +2 -3
- package/dist-client/setting-let/board-view-setting-let.js +10 -6
- package/dist-client/setting-let/board-view-setting-let.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/board-basic-info.d.ts +7 -1
- package/dist-client/viewparts/board-basic-info.js +188 -209
- package/dist-client/viewparts/board-basic-info.js.map +1 -1
- package/dist-client/viewparts/board-info-link.js +1 -1
- package/dist-client/viewparts/board-info-link.js.map +1 -1
- package/dist-client/viewparts/board-info.js +1 -1
- package/dist-client/viewparts/board-info.js.map +1 -1
- package/dist-client/viewparts/board-template-builder.d.ts +0 -1
- package/dist-client/viewparts/board-template-builder.js +0 -1
- package/dist-client/viewparts/board-template-builder.js.map +1 -1
- package/dist-client/viewparts/board-versions.d.ts +2 -1
- package/dist-client/viewparts/board-versions.js +19 -12
- package/dist-client/viewparts/board-versions.js.map +1 -1
- package/dist-client/viewparts/group-info-basic.d.ts +3 -1
- package/dist-client/viewparts/group-info-basic.js +48 -36
- package/dist-client/viewparts/group-info-basic.js.map +1 -1
- package/dist-client/viewparts/group-info-import.d.ts +2 -1
- package/dist-client/viewparts/group-info-import.js +8 -11
- package/dist-client/viewparts/group-info-import.js.map +1 -1
- package/dist-client/viewparts/group-info.js +1 -1
- package/dist-client/viewparts/group-info.js.map +1 -1
- package/dist-client/viewparts/link-builder.d.ts +1 -1
- package/dist-client/viewparts/link-builder.js +6 -6
- package/dist-client/viewparts/link-builder.js.map +1 -1
- package/dist-client/viewparts/play-group-info-basic.d.ts +3 -1
- package/dist-client/viewparts/play-group-info-basic.js +34 -34
- package/dist-client/viewparts/play-group-info-basic.js.map +1 -1
- package/dist-client/viewparts/play-group-info-link.js +1 -1
- package/dist-client/viewparts/play-group-info-link.js.map +1 -1
- package/dist-client/viewparts/play-group-info.js +1 -1
- package/dist-client/viewparts/play-group-info.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -8
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/textfield/filled-text-field.js'
|
|
3
|
+
import '@material/web/select/outlined-select'
|
|
4
|
+
import '@material/web/button/elevated-button.js'
|
|
5
|
+
import '@material/web/chips/chip-set.js'
|
|
6
|
+
import '@material/web/chips/assist-chip.js'
|
|
7
|
+
import '@material/web/chips/filter-chip.js'
|
|
2
8
|
|
|
3
9
|
import gql from 'graphql-tag'
|
|
4
10
|
import { css, html, LitElement, nothing } from 'lit'
|
|
@@ -11,25 +17,32 @@ import { navigate, store } from '@operato/shell'
|
|
|
11
17
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
12
18
|
import { hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
13
19
|
|
|
20
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
21
|
+
|
|
14
22
|
@customElement('board-basic-info')
|
|
15
23
|
export class BoardInfo extends connect(store)(LitElement) {
|
|
16
24
|
static styles = [
|
|
25
|
+
MDTypeScaleStyles,
|
|
17
26
|
css`
|
|
18
27
|
:host {
|
|
19
|
-
display: block;
|
|
20
|
-
background-color: var(--main-section-background-color);
|
|
21
28
|
position: relative;
|
|
22
|
-
|
|
23
|
-
--
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
--
|
|
29
|
+
display: block;
|
|
30
|
+
background-color: var(--md-sys-color-surface);
|
|
31
|
+
color: var(--md-sys-color-on-surface);
|
|
32
|
+
|
|
33
|
+
--md-filled-field-top-space: 12px;
|
|
34
|
+
--md-filled-field-bottom-space: 12px;
|
|
35
|
+
--md-filled-field-leading-space: 12px;
|
|
36
|
+
--md-filled-field-trailing-space: 12px;
|
|
37
|
+
|
|
38
|
+
--md-outlined-field-top-space: 12px;
|
|
39
|
+
--md-outlined-field-bottom-space: 12px;
|
|
40
|
+
--md-outlined-field-leading-space: 12px;
|
|
41
|
+
--md-outlined-field-trailing-space: 12px;
|
|
27
42
|
}
|
|
28
43
|
|
|
29
44
|
img {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
margin: auto;
|
|
45
|
+
object-fit: contain;
|
|
33
46
|
max-width: 100%;
|
|
34
47
|
max-height: 100%;
|
|
35
48
|
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
|
|
@@ -38,26 +51,23 @@ export class BoardInfo extends connect(store)(LitElement) {
|
|
|
38
51
|
form {
|
|
39
52
|
display: grid;
|
|
40
53
|
grid-template-columns: repeat(12, 1fr);
|
|
41
|
-
grid-gap:
|
|
54
|
+
grid-gap: 10px 0;
|
|
42
55
|
grid-auto-rows: minmax(24px, auto);
|
|
43
56
|
padding: var(--padding-wide);
|
|
44
57
|
align-items: center;
|
|
45
58
|
}
|
|
46
59
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
[buttons] * {
|
|
54
|
-
margin: 0 0 0 var(--margin-narrow);
|
|
60
|
+
md-outlined-select,
|
|
61
|
+
md-filled-text-field {
|
|
62
|
+
flex: 1;
|
|
63
|
+
padding: 4px 0;
|
|
64
|
+
min-width: unset;
|
|
55
65
|
}
|
|
56
66
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
md-chip-set {
|
|
68
|
+
flex: 1;
|
|
69
|
+
display: flex;
|
|
70
|
+
gap: 4px;
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
fieldset {
|
|
@@ -67,108 +77,54 @@ export class BoardInfo extends connect(store)(LitElement) {
|
|
|
67
77
|
legend {
|
|
68
78
|
grid-column: span 12;
|
|
69
79
|
padding: var(--legend-padding);
|
|
70
|
-
|
|
71
|
-
color: var(--legend-text-color);
|
|
80
|
+
color: var(--md-sys-color-primary);
|
|
72
81
|
text-transform: capitalize;
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
label {
|
|
76
|
-
grid-column: span 12;
|
|
77
85
|
text-transform: capitalize;
|
|
78
|
-
color: var(--label-color);
|
|
79
|
-
font: var(--label-font);
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
padding-bottom: var(--padding-narrow);
|
|
87
|
-
font: var(--input-field-font);
|
|
88
|
+
md-icon[dim] {
|
|
89
|
+
font-variation-settings: 'FILL' 1;
|
|
90
|
+
--md-icon-size: 14px;
|
|
91
|
+
color: var(--md-sys-color-outline-variant);
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
[name] {
|
|
95
|
+
max-width: 70px;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
text-overflow: ellipsis;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
color: var(--
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
input,
|
|
103
|
-
table,
|
|
104
|
-
select,
|
|
105
|
-
textarea,
|
|
106
|
-
[custom-input] {
|
|
107
|
-
grid-column: span 12;
|
|
108
|
-
|
|
109
|
-
border: var(--input-field-border);
|
|
110
|
-
border-radius: var(--input-field-border-radius);
|
|
111
|
-
margin-bottom: var(--margin-default);
|
|
112
|
-
padding: var(--input-field-padding);
|
|
113
|
-
font: var(--input-field-font);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
mwc-icon[tail] {
|
|
117
|
-
margin-bottom: var(--margin-default);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
input[type='checkbox'],
|
|
121
|
-
input[type='radio'] {
|
|
122
|
-
place-self: center;
|
|
123
|
-
margin: 0;
|
|
124
|
-
grid-column: 1;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
input[type='checkbox'] + label,
|
|
128
|
-
input[type='radio'] + label {
|
|
129
|
-
text-align: left;
|
|
130
|
-
grid-column: span 11 / auto;
|
|
131
|
-
|
|
132
|
-
font: var(--form-sublabel-font);
|
|
133
|
-
color: var(--form-sublabel-color);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
input:focus {
|
|
137
|
-
outline: none;
|
|
138
|
-
border: 1px solid var(--focus-background-color);
|
|
101
|
+
[danger] {
|
|
102
|
+
--md-assist-chip-elevated-container-color: var(--md-sys-color-error);
|
|
103
|
+
--md-assist-chip-label-text-color: var(--md-sys-color-on-error);
|
|
104
|
+
--md-assist-chip-leading-icon-color: var(--md-sys-color-on-error);
|
|
139
105
|
}
|
|
140
106
|
|
|
141
|
-
|
|
107
|
+
[fullwidth] {
|
|
142
108
|
grid-column: span 12 / auto;
|
|
143
|
-
border-bottom: var(--border-dark-color);
|
|
144
|
-
|
|
145
109
|
display: flex;
|
|
146
110
|
flex-direction: column;
|
|
147
|
-
|
|
148
|
-
gap: var(--margin-default);
|
|
111
|
+
gap: 4px;
|
|
149
112
|
}
|
|
150
113
|
|
|
151
|
-
|
|
114
|
+
[oneline] {
|
|
152
115
|
grid-column: span 12 / auto;
|
|
153
|
-
|
|
154
116
|
display: flex;
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
gap: 4px;
|
|
155
119
|
align-items: center;
|
|
156
|
-
gap: var(--margin-default);
|
|
157
120
|
}
|
|
158
121
|
|
|
159
|
-
|
|
122
|
+
[oneline] md-filled-text-field,
|
|
123
|
+
[oneline] select {
|
|
160
124
|
flex: 1;
|
|
161
125
|
}
|
|
162
126
|
|
|
163
|
-
|
|
164
|
-
flex: 1;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
div[oneline] mwc-button {
|
|
168
|
-
margin-bottom: var(--margin-default);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
mwc-button[right] {
|
|
127
|
+
[right] {
|
|
172
128
|
margin-left: auto;
|
|
173
129
|
}
|
|
174
130
|
|
|
@@ -216,25 +172,26 @@ export class BoardInfo extends connect(store)(LitElement) {
|
|
|
216
172
|
return html`
|
|
217
173
|
${board.thumbnail ? html` <img src=${board.thumbnail} /> ` : html``}
|
|
218
174
|
|
|
219
|
-
<form>
|
|
175
|
+
<form class="md-typescale-body-medium">
|
|
220
176
|
<fieldset>
|
|
221
|
-
<legend>${i18next.t('label.information')}</legend>
|
|
222
|
-
<label>${i18next.t('label.name')}</label>
|
|
177
|
+
<legend class="md-typescale-label-large-prominent">${i18next.t('label.information')}</legend>
|
|
223
178
|
<div oneline>
|
|
224
|
-
<
|
|
179
|
+
<md-filled-text-field
|
|
180
|
+
label=${String(i18next.t('label.name'))}
|
|
225
181
|
type="text"
|
|
226
182
|
.value=${board.name}
|
|
227
183
|
@change=${e => (this.board = { ...this.board, name: e.target.value })}
|
|
228
184
|
?disabled=${!this.enableModeller}
|
|
229
|
-
|
|
185
|
+
></md-filled-text-field>
|
|
186
|
+
|
|
230
187
|
${this.enableModeller
|
|
231
188
|
? html`
|
|
232
|
-
<
|
|
189
|
+
<md-icon
|
|
233
190
|
@click=${() => {
|
|
234
191
|
this.showTarget = !this.showTarget
|
|
235
192
|
}}
|
|
236
193
|
tail
|
|
237
|
-
>${this.showTarget ? 'arrow_drop_up' : 'arrow_drop_down'}</
|
|
194
|
+
>${this.showTarget ? 'arrow_drop_up' : 'arrow_drop_down'}</md-icon
|
|
238
195
|
>
|
|
239
196
|
`
|
|
240
197
|
: nothing}
|
|
@@ -242,49 +199,50 @@ export class BoardInfo extends connect(store)(LitElement) {
|
|
|
242
199
|
${this.showTarget
|
|
243
200
|
? html`
|
|
244
201
|
<div fullwidth target>
|
|
245
|
-
<label>${i18next.t('label.board-copy')}</label>
|
|
202
|
+
<label class="md-typescale-label-meium-prominent">${i18next.t('label.board-copy')}</label>
|
|
246
203
|
<div oneline>
|
|
247
|
-
<select
|
|
204
|
+
<md-outlined-select
|
|
205
|
+
label=${String(i18next.t('label.domain'))}
|
|
248
206
|
@change=${e => {
|
|
249
207
|
this.targetSubdomain = e.target.value
|
|
250
208
|
this.getGroupsByDomain(this.targetSubdomain)
|
|
251
209
|
}}
|
|
252
|
-
|
|
253
|
-
.value=${this.targetSubdomain}
|
|
210
|
+
.value=${this.targetSubdomain || ''}
|
|
254
211
|
?disabled=${!this.enableModeller}
|
|
255
212
|
>
|
|
256
|
-
<option
|
|
213
|
+
<md-select-option aria-label="blank"></md-select-option>
|
|
257
214
|
${this.targetDomains.map(
|
|
258
|
-
domain =>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
215
|
+
domain => html`
|
|
216
|
+
<md-select-option
|
|
217
|
+
value=${domain.subdomain}
|
|
218
|
+
?selected=${domain.subdomain == this.targetSubdomain}
|
|
219
|
+
>
|
|
220
|
+
<div slot="headline">${domain.name}</div>
|
|
221
|
+
</md-select-option>
|
|
222
|
+
`
|
|
264
223
|
)}
|
|
265
|
-
</select>
|
|
224
|
+
</md-outlined-select>
|
|
266
225
|
|
|
267
|
-
<select
|
|
226
|
+
<md-outlined-select
|
|
227
|
+
label=${String(i18next.t('label.group'))}
|
|
268
228
|
@change=${e => (this.targetGroupId = e.target.value)}
|
|
269
|
-
|
|
270
|
-
.value=${this.targetGroupId}
|
|
229
|
+
.value=${this.targetGroupId || ''}
|
|
271
230
|
?disabled=${!this.enableModeller}
|
|
272
231
|
>
|
|
273
|
-
<option
|
|
232
|
+
<md-select-option aria-label="blank"></md-select-option>
|
|
274
233
|
${this.targetGroups.map(
|
|
275
|
-
group =>
|
|
276
|
-
|
|
277
|
-
<
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
`
|
|
234
|
+
group => html`
|
|
235
|
+
<md-select-option value=${group.id} ?selected=${group.id == this.targetGroupId}>
|
|
236
|
+
<div slot="headline">${group.name}</div>
|
|
237
|
+
</md-select-option>
|
|
238
|
+
`
|
|
281
239
|
)}
|
|
282
|
-
</select>
|
|
240
|
+
</md-outlined-select>
|
|
283
241
|
</div>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
242
|
+
|
|
243
|
+
<md-chip-set oneline>
|
|
244
|
+
<md-assist-chip
|
|
245
|
+
elevated
|
|
288
246
|
label=${String(i18next.t('button.copy'))}
|
|
289
247
|
?disabled=${!this.enableModeller ||
|
|
290
248
|
!this.original?.name ||
|
|
@@ -292,113 +250,133 @@ export class BoardInfo extends connect(store)(LitElement) {
|
|
|
292
250
|
!this.targetSubdomain ||
|
|
293
251
|
(this.original.name == this.board.name && this.subdomain == this.targetSubdomain)}
|
|
294
252
|
@click=${this.cloneBoard.bind(this)}
|
|
295
|
-
icon="content_copy"
|
|
296
253
|
right
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
254
|
+
>
|
|
255
|
+
<md-icon slot="icon">content_copy</md-icon>
|
|
256
|
+
</md-assist-chip>
|
|
257
|
+
|
|
258
|
+
<md-assist-chip
|
|
259
|
+
elevated
|
|
301
260
|
label=${String(i18next.t('button.export'))}
|
|
302
261
|
@click=${this.exportBoard.bind(this)}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
262
|
+
>
|
|
263
|
+
<md-icon slot="icon">download</md-icon>
|
|
264
|
+
</md-assist-chip>
|
|
265
|
+
</md-chip-set>
|
|
306
266
|
</div>
|
|
307
267
|
`
|
|
308
|
-
:
|
|
268
|
+
: nothing}
|
|
309
269
|
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
270
|
+
<md-filled-text-field
|
|
271
|
+
oneline
|
|
272
|
+
label=${String(i18next.t('label.description'))}
|
|
313
273
|
.value=${board.description}
|
|
314
274
|
@change=${e => (this.board = { ...this.board, description: e.target.value })}
|
|
315
275
|
?disabled=${!this.enableModeller}
|
|
316
|
-
|
|
276
|
+
></md-filled-text-field>
|
|
317
277
|
|
|
318
|
-
<
|
|
319
|
-
|
|
278
|
+
<md-outlined-select
|
|
279
|
+
oneline
|
|
280
|
+
label=${String(i18next.t('label.group'))}
|
|
320
281
|
@change=${e => (this.board = { ...this.board, groupId: e.target.value })}
|
|
321
282
|
.value=${this.groupId || ''}
|
|
283
|
+
.displayText=${boardGroupList?.find(item => item.id == this.groupId)?.name}
|
|
322
284
|
?disabled=${!this.enableModeller}
|
|
323
285
|
>
|
|
324
|
-
<option
|
|
286
|
+
<md-select-option aria-label="blank"></md-select-option>
|
|
325
287
|
${boardGroupList.map(
|
|
326
|
-
item => html`
|
|
288
|
+
item => html`
|
|
289
|
+
<md-select-option value=${item.id} ?selected=${item.id == this.groupId}>
|
|
290
|
+
<div slot="headline">${item.name}</div>
|
|
291
|
+
</md-select-option>
|
|
292
|
+
`
|
|
327
293
|
)}
|
|
328
|
-
</select>
|
|
329
|
-
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
<mwc-icon>schedule</mwc-icon> ${new Date(board.createdAt).toLocaleString()}
|
|
333
|
-
</span>
|
|
334
|
-
|
|
335
|
-
<label>${i18next.t('label.updater')}</label>
|
|
336
|
-
<span>
|
|
337
|
-
<mwc-icon>person</mwc-icon> ${(board.updater && board.updater.name) || 'anonymouse'}
|
|
338
|
-
<mwc-icon>schedule</mwc-icon> ${new Date(board.updatedAt).toLocaleString()}
|
|
339
|
-
</span>
|
|
340
|
-
|
|
341
|
-
<label>${i18next.t('label.state')}</label>
|
|
342
|
-
<span state>
|
|
343
|
-
<div oneline>
|
|
344
|
-
<mwc-icon>signpost</mwc-icon> ${(board.state || '').toUpperCase()}
|
|
345
|
-
<mwc-icon>pin</mwc-icon> ${board.version}
|
|
346
|
-
</div>
|
|
347
|
-
<mwc-button
|
|
348
|
-
dense
|
|
349
|
-
raised
|
|
350
|
-
label=${String(i18next.t('button.release'))}
|
|
351
|
-
?disabled=${!this.enableModeller || !this.isReleasable}
|
|
352
|
-
@click=${this.releaseBoard.bind(this)}
|
|
353
|
-
icon="new_releases"
|
|
354
|
-
></mwc-button>
|
|
355
|
-
</span>
|
|
356
|
-
|
|
357
|
-
<div buttons>
|
|
358
|
-
<mwc-button
|
|
359
|
-
dense
|
|
360
|
-
raised
|
|
294
|
+
</md-outlined-select>
|
|
295
|
+
|
|
296
|
+
<md-chip-set oneline>
|
|
297
|
+
<md-assist-chip
|
|
361
298
|
danger
|
|
362
|
-
|
|
299
|
+
elevated
|
|
363
300
|
?disabled=${!this.enableModeller}
|
|
301
|
+
label=${String(i18next.t('button.delete'))}
|
|
364
302
|
@click=${this.deleteBoard.bind(this)}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
303
|
+
>
|
|
304
|
+
<md-icon slot="icon">delete_outline</md-icon>
|
|
305
|
+
</md-assist-chip>
|
|
306
|
+
|
|
307
|
+
<md-assist-chip
|
|
308
|
+
elevated
|
|
371
309
|
?disabled=${!this.enableModeller}
|
|
310
|
+
label=${String(i18next.t('button.save'))}
|
|
372
311
|
@click=${this.updateBoard.bind(this)}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
312
|
+
right
|
|
313
|
+
>
|
|
314
|
+
<md-icon slot="icon">save</md-icon>
|
|
315
|
+
</md-assist-chip>
|
|
316
|
+
<md-assist-chip
|
|
317
|
+
elevated
|
|
379
318
|
?disabled=${!this.enableModeller}
|
|
319
|
+
label=${String(i18next.t('button.edit'))}
|
|
380
320
|
@click=${() => navigate(`${'board-modeller/' + this.boardId}`)}
|
|
381
|
-
|
|
382
|
-
|
|
321
|
+
>
|
|
322
|
+
<md-icon slot="icon">drive_file_rename_outline</md-icon>
|
|
323
|
+
</md-assist-chip>
|
|
324
|
+
</md-chip-set>
|
|
325
|
+
</fieldset>
|
|
326
|
+
|
|
327
|
+
<fieldset>
|
|
328
|
+
<legend class="md-typescale-label-large-prominent">${i18next.t('label.status')}</legend>
|
|
329
|
+
<div oneline>
|
|
330
|
+
<label class="md-typescale-label-meium">${i18next.t('label.creator')}</label>
|
|
331
|
+
<md-icon dim>person</md-icon>
|
|
332
|
+
<div name title=${(board.creator && board.creator.name) || 'anonymous'}>
|
|
333
|
+
${(board.creator && board.creator.name) || 'anonymous'}
|
|
334
|
+
</div>
|
|
335
|
+
<md-icon dim>schedule</md-icon> ${new Date(board.createdAt).toLocaleString()}
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<div oneline>
|
|
339
|
+
<label class="md-typescale-label-meium">${i18next.t('label.updater')}</label>
|
|
340
|
+
<md-icon dim>person</md-icon>
|
|
341
|
+
<div name title=${(board.updater && board.updater.name) || 'anonymouse'}>
|
|
342
|
+
${(board.updater && board.updater.name) || 'anonymouse'}
|
|
343
|
+
</div>
|
|
344
|
+
<md-icon dim>schedule</md-icon> ${new Date(board.updatedAt).toLocaleString()}
|
|
345
|
+
</div>
|
|
346
|
+
|
|
347
|
+
<div oneline>
|
|
348
|
+
<label class="md-typescale-label-meium">${i18next.t('label.state')}</label>
|
|
349
|
+
<md-icon dim>signpost</md-icon> ${(board.state || '').toUpperCase()}
|
|
350
|
+
<md-icon dim>pin</md-icon> ${board.version}
|
|
351
|
+
<md-chip-set>
|
|
352
|
+
<md-assist-chip
|
|
353
|
+
elevated
|
|
354
|
+
label=${String(i18next.t('button.release'))}
|
|
355
|
+
?disabled=${!this.enableModeller || !this.isReleasable}
|
|
356
|
+
@click=${this.releaseBoard.bind(this)}
|
|
357
|
+
right
|
|
358
|
+
>
|
|
359
|
+
<md-icon slot="icon">new_releases</md-icon>
|
|
360
|
+
</md-assist-chip>
|
|
361
|
+
</md-chip-set>
|
|
383
362
|
</div>
|
|
384
363
|
</fieldset>
|
|
385
364
|
|
|
386
365
|
<fieldset>
|
|
387
|
-
<legend>${i18next.t('label.play-group')}</legend>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
)}
|
|
366
|
+
<legend class="md-typescale-label-large-prominent">${i18next.t('label.play-group')}</legend>
|
|
367
|
+
<md-chip-set oneline>
|
|
368
|
+
${playGroupList.map(
|
|
369
|
+
item => html`
|
|
370
|
+
<md-filter-chip
|
|
371
|
+
label=${item.name}
|
|
372
|
+
?selected=${item.checked}
|
|
373
|
+
@click=${e => {
|
|
374
|
+
e.target.selected ? this.joinPlayGroup(item) : this.leavePlayGroup(item)
|
|
375
|
+
}}
|
|
376
|
+
></md-filter-chip>
|
|
377
|
+
`
|
|
378
|
+
)}
|
|
379
|
+
</md-chip-set>
|
|
402
380
|
</fieldset>
|
|
403
381
|
</form>
|
|
404
382
|
`
|
|
@@ -13,7 +13,7 @@ export class BoardInfoLink extends LitElement {
|
|
|
13
13
|
:host {
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
|
-
background-color: var(--
|
|
16
|
+
background-color: var(--md-sys-color-surface);
|
|
17
17
|
position: relative;
|
|
18
18
|
text-align: center;
|
|
19
19
|
color: var(--label-color);
|
|
@@ -20,7 +20,7 @@ export class BoardInfo extends LitElement {
|
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
position: relative;
|
|
23
|
-
background-color: var(--
|
|
23
|
+
background-color: var(--md-sys-color-surface);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
[tab] {
|
|
@@ -73,8 +73,8 @@ export class BoardInfo extends LitElement {
|
|
|
73
73
|
${this.tab == 'basic'
|
|
74
74
|
? html`<board-basic-info boardId=${ifDefined(this.board?.id)}></board-basic-info>`
|
|
75
75
|
: this.tab == 'versions'
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
? html`<board-versions boardId=${ifDefined(this.board?.id)}></board-versions>`
|
|
77
|
+
: html`<board-info-link .board=${this.board}></board-info-link>`}
|
|
78
78
|
</div>
|
|
79
79
|
`
|
|
80
80
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/chips/assist-chip.js'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
4
5
|
import { css, html, LitElement } from 'lit'
|
|
@@ -6,6 +7,7 @@ import { customElement, property, state } from 'lit/decorators.js'
|
|
|
6
7
|
|
|
7
8
|
import { i18next } from '@operato/i18n'
|
|
8
9
|
import { client } from '@operato/graphql'
|
|
10
|
+
|
|
9
11
|
import { privileged } from '@things-factory/auth-base/dist-client'
|
|
10
12
|
|
|
11
13
|
@customElement('board-versions')
|
|
@@ -14,7 +16,7 @@ export class BoardVersions extends LitElement {
|
|
|
14
16
|
css`
|
|
15
17
|
:host {
|
|
16
18
|
display: block;
|
|
17
|
-
background-color: var(--
|
|
19
|
+
background-color: var(--md-sys-color-surface);
|
|
18
20
|
position: relative;
|
|
19
21
|
text-align: center;
|
|
20
22
|
color: var(--label-color);
|
|
@@ -51,17 +53,23 @@ export class BoardVersions extends LitElement {
|
|
|
51
53
|
gap: 5px;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
span
|
|
56
|
+
span md-icon {
|
|
57
|
+
font-variation-settings: 'FILL' 1;
|
|
58
|
+
|
|
55
59
|
vertical-align: middle;
|
|
56
60
|
font-size: var(--fontsize-large);
|
|
57
61
|
color: var(--primary-color);
|
|
58
62
|
}
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
md-assist-chip {
|
|
61
65
|
position: absolute;
|
|
62
66
|
right: 3px;
|
|
63
67
|
top: 3px;
|
|
64
68
|
opacity: 0.8;
|
|
69
|
+
|
|
70
|
+
--md-assist-chip-elevated-container-color: var(--md-sys-color-primary);
|
|
71
|
+
--md-assist-chip-label-text-color: var(--md-sys-color-on-primary);
|
|
72
|
+
--md-assist-chip-leading-icon-color: var(--md-sys-color-on-primary);
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
@media screen and (max-width: 460px) {
|
|
@@ -86,23 +94,23 @@ export class BoardVersions extends LitElement {
|
|
|
86
94
|
<div card>
|
|
87
95
|
<img src=${version.thumbnail} />
|
|
88
96
|
<div info>
|
|
89
|
-
<
|
|
97
|
+
<md-icon>pin</md-icon> ${version.version}
|
|
90
98
|
<span>
|
|
91
|
-
<
|
|
92
|
-
<
|
|
99
|
+
<md-icon>person</md-icon> ${(version.updater && version.updater.name) || 'anonymouse'}
|
|
100
|
+
<md-icon>schedule</md-icon> ${new Date(version.updatedAt).toLocaleString()}
|
|
93
101
|
</span>
|
|
94
102
|
</div>
|
|
95
103
|
|
|
96
104
|
${privileged(
|
|
97
105
|
{ privilege: 'mutation', category: 'board' },
|
|
98
106
|
html`
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
raised
|
|
107
|
+
<md-assist-chip
|
|
108
|
+
elevated
|
|
102
109
|
label=${String(i18next.t('button.revert-board-version'))}
|
|
103
110
|
@click=${() => this.revertBoardVersion(version.version)}
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
>
|
|
112
|
+
<md-icon slot="icon">recycling</md-icon>
|
|
113
|
+
</md-assist-chip>
|
|
106
114
|
`
|
|
107
115
|
)}
|
|
108
116
|
</div>
|