@things-factory/board-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/apptools/favorite-tool.ts +8 -7
- package/client/board-list/board-tile-list.ts +41 -36
- package/client/board-list/group-bar-styles.ts +61 -0
- package/client/board-list/group-bar.ts +10 -66
- package/client/board-list/play-group-bar.ts +9 -64
- package/client/data-grist/board-renderer.ts +6 -6
- package/client/pages/board-list-page.ts +20 -6
- package/client/pages/board-modeller-page.ts +4 -3
- package/client/pages/board-player-page.ts +6 -5
- package/client/pages/board-viewer-page.ts +14 -7
- package/client/pages/play-list-page.ts +8 -18
- package/client/pages/theme/theme-list-page.ts +6 -5
- package/client/setting-let/board-view-setting-let.ts +11 -7
- package/client/themes/board-theme.css +3 -3
- 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 +49 -37
- 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 +2 -2
- package/dist-client/board-list/board-tile-list.js +33 -28
- package/dist-client/board-list/board-tile-list.js.map +1 -1
- package/dist-client/board-list/group-bar-styles.d.ts +1 -0
- package/dist-client/board-list/group-bar-styles.js +61 -0
- package/dist-client/board-list/group-bar-styles.js.map +1 -0
- package/dist-client/board-list/group-bar.d.ts +2 -2
- package/dist-client/board-list/group-bar.js +9 -64
- package/dist-client/board-list/group-bar.js.map +1 -1
- package/dist-client/board-list/play-group-bar.d.ts +2 -2
- package/dist-client/board-list/play-group-bar.js +7 -62
- package/dist-client/board-list/play-group-bar.js.map +1 -1
- package/dist-client/data-grist/board-editor.d.ts +1 -1
- package/dist-client/data-grist/board-renderer.d.ts +2 -2
- 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/attachment-list-page.d.ts +1 -1
- package/dist-client/pages/board-list-page.d.ts +1 -2
- package/dist-client/pages/board-list-page.js +17 -5
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/pages/board-modeller-page.d.ts +2 -1
- package/dist-client/pages/board-modeller-page.js +4 -3
- package/dist-client/pages/board-modeller-page.js.map +1 -1
- package/dist-client/pages/board-player-page.d.ts +2 -1
- package/dist-client/pages/board-player-page.js +6 -5
- package/dist-client/pages/board-player-page.js.map +1 -1
- package/dist-client/pages/board-template/board-template-list-page.d.ts +1 -1
- package/dist-client/pages/board-viewer-page.d.ts +3 -2
- package/dist-client/pages/board-viewer-page.js +12 -7
- package/dist-client/pages/board-viewer-page.js.map +1 -1
- package/dist-client/pages/font-list-page.d.ts +1 -1
- package/dist-client/pages/play-list-page.d.ts +3 -3
- package/dist-client/pages/play-list-page.js +6 -9
- package/dist-client/pages/play-list-page.js.map +1 -1
- package/dist-client/pages/theme/theme-editors.d.ts +1 -1
- package/dist-client/pages/theme/theme-list-page.d.ts +1 -1
- package/dist-client/pages/theme/theme-list-page.js +6 -5
- package/dist-client/pages/theme/theme-list-page.js.map +1 -1
- package/dist-client/setting-let/board-view-setting-let.d.ts +3 -4
- package/dist-client/setting-let/board-view-setting-let.js +11 -7
- package/dist-client/setting-let/board-view-setting-let.js.map +1 -1
- package/dist-client/themes/board-theme.css +3 -3
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/board-basic-info.d.ts +8 -2
- 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.d.ts +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.d.ts +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 +1 -2
- 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 +3 -2
- 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 +4 -2
- package/dist-client/viewparts/group-info-basic.js +49 -37
- package/dist-client/viewparts/group-info-basic.js.map +1 -1
- package/dist-client/viewparts/group-info-import.d.ts +3 -2
- 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.d.ts +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 +2 -2
- 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 +4 -2
- 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.d.ts +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.d.ts +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 +7 -8
- 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
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { store } from '@operato/shell'
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
import { UPDATE_FAVORITES } from '@things-factory/fav-base/client'
|
|
11
12
|
|
|
12
13
|
@customElement('favorite-tool')
|
|
13
14
|
export class FavoriteTool extends connect(store)(LitElement) {
|
|
@@ -36,11 +37,11 @@ export class FavoriteTool extends connect(store)(LitElement) {
|
|
|
36
37
|
|
|
37
38
|
return renderable
|
|
38
39
|
? html`
|
|
39
|
-
<
|
|
40
|
-
>${this.favored ? 'star' : 'star_border'}</
|
|
40
|
+
<md-icon @click=${this.onClick.bind(this)} ?favorable=${!this.favored}
|
|
41
|
+
>${this.favored ? 'star' : 'star_border'}</md-icon
|
|
41
42
|
>
|
|
42
43
|
`
|
|
43
|
-
:
|
|
44
|
+
: nothing
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
updated(changes) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/board/ox-board-creation-card.js'
|
|
2
|
-
import '@material/mwc-icon'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement, PropertyValues, nothing } from 'lit'
|
|
@@ -7,6 +7,7 @@ import { customElement, property, state, query } from 'lit/decorators.js'
|
|
|
7
7
|
import { keyed } from 'lit/directives/keyed.js'
|
|
8
8
|
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
|
+
|
|
10
11
|
import { privileged } from '@things-factory/auth-base/dist-client'
|
|
11
12
|
|
|
12
13
|
@customElement('board-tile-list')
|
|
@@ -17,6 +18,7 @@ export class BoardTileList extends LitElement {
|
|
|
17
18
|
overflow: auto;
|
|
18
19
|
padding: var(--popup-content-padding);
|
|
19
20
|
display: grid;
|
|
21
|
+
background-color: var(--md-sys-color-background);
|
|
20
22
|
|
|
21
23
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
22
24
|
grid-auto-rows: var(--card-list-rows-height);
|
|
@@ -37,6 +39,7 @@ export class BoardTileList extends LitElement {
|
|
|
37
39
|
|
|
38
40
|
[card] > a {
|
|
39
41
|
display: flex;
|
|
42
|
+
clip-path: border-box;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
[card]:hover {
|
|
@@ -49,32 +52,29 @@ export class BoardTileList extends LitElement {
|
|
|
49
52
|
overflow: hidden;
|
|
50
53
|
margin-top: var(--margin-narrow);
|
|
51
54
|
width: calc(100% - 45px);
|
|
52
|
-
color: var(--
|
|
55
|
+
color: var(--md-sys-color-on-background);
|
|
53
56
|
font-weight: bolder;
|
|
54
57
|
font-size: var(--fontsize-small);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
img {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
margin: auto;
|
|
61
|
-
max-width: 100%;
|
|
62
|
-
max-height: 100%;
|
|
61
|
+
flex: 1;
|
|
62
|
+
object-fit: contain;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
md-icon[iconBtn] {
|
|
66
66
|
float: right;
|
|
67
67
|
margin-top: -20px;
|
|
68
68
|
margin-left: 2px;
|
|
69
69
|
color: var(--board-list-star-color);
|
|
70
70
|
font-size: 1.4em;
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
color: var(--
|
|
72
|
+
md-icon[info] {
|
|
73
|
+
color: var(--md-sys-color-primary);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
md-icon[iconBtn][favored],
|
|
77
|
+
md-icon[info]:hover {
|
|
78
78
|
color: var(--board-list-star-active-color);
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -174,36 +174,41 @@ export class BoardTileList extends LitElement {
|
|
|
174
174
|
? privileged(
|
|
175
175
|
{ privilege: 'mutation', category: 'board' },
|
|
176
176
|
html`
|
|
177
|
-
<ox-board-creation-card
|
|
177
|
+
<ox-board-creation-card
|
|
178
|
+
.groups=${this.groups}
|
|
179
|
+
.defaultGroup=${this.group}
|
|
180
|
+
@create-board=${e => this.onCreateBoard(e)}
|
|
181
|
+
card
|
|
182
|
+
create
|
|
183
|
+
></ox-board-creation-card>
|
|
178
184
|
`
|
|
179
185
|
)
|
|
180
186
|
: nothing}
|
|
181
187
|
${keyed(
|
|
182
188
|
Date.now(),
|
|
183
189
|
boards.map(
|
|
184
|
-
board =>
|
|
185
|
-
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
`
|
|
190
|
+
board => html`
|
|
191
|
+
<div card draggable="true" id=${board.id}>
|
|
192
|
+
<a href="board-viewer/${board.id}"> <img src=${board.thumbnail} /> </a>
|
|
193
|
+
|
|
194
|
+
<div name>${board.name}</div>
|
|
195
|
+
<!-- <div description>${board.description}</div> -->
|
|
196
|
+
|
|
197
|
+
<md-icon
|
|
198
|
+
iconBtn
|
|
199
|
+
info
|
|
200
|
+
@click=${e => {
|
|
201
|
+
this.infoBoard(board)
|
|
202
|
+
e.preventDefault()
|
|
203
|
+
}}
|
|
204
|
+
>info</md-icon
|
|
205
|
+
>
|
|
206
|
+
|
|
207
|
+
${(this.favorites || []).includes(board.id)
|
|
208
|
+
? html` <md-icon iconBtn favored @click=${e => this.removeFavorite(board.id)}>star</md-icon> `
|
|
209
|
+
: html` <md-icon iconBtn @click=${e => this.addFavorite(board.id)}>star_border</md-icon> `}
|
|
210
|
+
</div>
|
|
211
|
+
`
|
|
207
212
|
)
|
|
208
213
|
)}
|
|
209
214
|
`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { css } from 'lit'
|
|
2
|
+
|
|
3
|
+
export const GroupBarStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
background-color: var(--group-bar-background-color);
|
|
6
|
+
|
|
7
|
+
overflow-x: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
ul {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
list-style: none;
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
li {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
border-bottom: var(--group-bar-line);
|
|
25
|
+
align-self: auto;
|
|
26
|
+
min-height: 43px;
|
|
27
|
+
padding: 4px 8px;
|
|
28
|
+
|
|
29
|
+
* {
|
|
30
|
+
vertical-align: text-top;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
display: block;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
font: var(--group-bar-textbutton);
|
|
37
|
+
color: rgba(255, 255, 255, 0.8);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
a md-icon {
|
|
41
|
+
font-variation-settings: 'FILL' 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&[active] {
|
|
45
|
+
border-color: var(--group-bar-active-line-color);
|
|
46
|
+
|
|
47
|
+
a {
|
|
48
|
+
font: var(--group-bar-textbutton-active);
|
|
49
|
+
color: rgba(255, 255, 255, 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[padding] {
|
|
54
|
+
flex: 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&[add] * {
|
|
58
|
+
color: rgba(255, 255, 255, 0.5);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`
|
|
@@ -1,72 +1,16 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { html, LitElement } from 'lit'
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
5
|
-
|
|
6
5
|
import ScrollBooster from 'scrollbooster'
|
|
7
6
|
|
|
7
|
+
import { longpressable } from '@operato/utils'
|
|
8
8
|
import { privileged } from '@things-factory/auth-base/dist-client'
|
|
9
|
-
import {
|
|
9
|
+
import { GroupBarStyles } from './group-bar-styles'
|
|
10
10
|
|
|
11
11
|
@customElement('group-bar')
|
|
12
12
|
export default class GroupBar extends LitElement {
|
|
13
|
-
static styles = [
|
|
14
|
-
css`
|
|
15
|
-
:host {
|
|
16
|
-
background-color: var(--group-bar-background-color);
|
|
17
|
-
|
|
18
|
-
overflow-x: hidden;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
ul {
|
|
22
|
-
display: flex;
|
|
23
|
-
list-style: none;
|
|
24
|
-
margin: 0;
|
|
25
|
-
padding: 0;
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
li {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
padding: 0px 3px;
|
|
32
|
-
|
|
33
|
-
border-bottom: var(--group-bar-line);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
li[active] {
|
|
37
|
-
border-color: var(--group-bar-active-line-color);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
li a {
|
|
41
|
-
display: block;
|
|
42
|
-
padding: 5px 4px 1px 4px;
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
font: var(--group-bar-textbutton);
|
|
45
|
-
color: rgba(255, 255, 255, 0.8);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
li[active] a {
|
|
49
|
-
font: var(--group-bar-textbutton-active);
|
|
50
|
-
color: rgba(255, 255, 255, 1);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
li[padding] {
|
|
54
|
-
flex: 1;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
li[add] {
|
|
58
|
-
padding: 5px 4px 1px 4px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
li[add] * {
|
|
62
|
-
color: rgba(255, 255, 255, 0.5);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
mwc-icon {
|
|
66
|
-
vertical-align: middle;
|
|
67
|
-
}
|
|
68
|
-
`
|
|
69
|
-
]
|
|
13
|
+
static styles = [GroupBarStyles]
|
|
70
14
|
|
|
71
15
|
@property({ type: Array }) groups?: any[]
|
|
72
16
|
@property({ type: String }) groupId?: string
|
|
@@ -78,17 +22,17 @@ export default class GroupBar extends LitElement {
|
|
|
78
22
|
return html`
|
|
79
23
|
<ul>
|
|
80
24
|
<li ?active=${!this.groupId}>
|
|
81
|
-
<a href=${this.targetPage || ''}><
|
|
25
|
+
<a href=${this.targetPage || ''}><md-icon>dashboard</md-icon></a>
|
|
82
26
|
</li>
|
|
83
27
|
|
|
84
28
|
<li ?active=${this.groupId === 'favor'}>
|
|
85
|
-
<a href="${this.targetPage}/favor"><
|
|
29
|
+
<a href="${this.targetPage}/favor"><md-icon>star</md-icon></a>
|
|
86
30
|
</li>
|
|
87
31
|
|
|
88
32
|
${privileged(
|
|
89
33
|
{ privilege: 'mutation', category: 'board' },
|
|
90
34
|
html`<li ?active=${this.groupId === 'mywork'}>
|
|
91
|
-
<a href="${this.targetPage}/mywork"><
|
|
35
|
+
<a href="${this.targetPage}/mywork"><md-icon>engineering</md-icon></a>
|
|
92
36
|
</li>`
|
|
93
37
|
)}
|
|
94
38
|
${(this.groups || []).map(
|
|
@@ -102,7 +46,7 @@ export default class GroupBar extends LitElement {
|
|
|
102
46
|
<li padding></li>
|
|
103
47
|
|
|
104
48
|
<li add>
|
|
105
|
-
<
|
|
49
|
+
<md-icon @click=${e => this.infoGroup()}>add</md-icon>
|
|
106
50
|
</li>
|
|
107
51
|
</ul>
|
|
108
52
|
`
|
|
@@ -139,7 +83,7 @@ export default class GroupBar extends LitElement {
|
|
|
139
83
|
var scrollTarget = this.renderRoot.querySelector('ul')
|
|
140
84
|
|
|
141
85
|
/* long-press */
|
|
142
|
-
longpressable(scrollTarget)
|
|
86
|
+
longpressable(scrollTarget!)
|
|
143
87
|
|
|
144
88
|
scrollTarget!.addEventListener('mousewheel', this.onWheelEvent.bind(this), false)
|
|
145
89
|
|
|
@@ -1,70 +1,15 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { customElement, property
|
|
3
|
+
import { html, LitElement } from 'lit'
|
|
4
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
5
5
|
import ScrollBooster from 'scrollbooster'
|
|
6
6
|
|
|
7
|
-
import { longpressable } from '@
|
|
7
|
+
import { longpressable } from '@operato/utils'
|
|
8
|
+
import { GroupBarStyles } from './group-bar-styles'
|
|
8
9
|
|
|
9
10
|
@customElement('play-group-bar')
|
|
10
11
|
export default class PlayGroupBar extends LitElement {
|
|
11
|
-
static styles = [
|
|
12
|
-
css`
|
|
13
|
-
:host {
|
|
14
|
-
background-color: var(--group-bar-background-color);
|
|
15
|
-
|
|
16
|
-
overflow-x: hidden;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
ul {
|
|
20
|
-
display: flex;
|
|
21
|
-
list-style: none;
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
li {
|
|
28
|
-
display: inline-block;
|
|
29
|
-
padding: 0px 3px;
|
|
30
|
-
|
|
31
|
-
border-bottom: var(--group-bar-line);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
li[active] {
|
|
35
|
-
border-color: var(--group-bar-active-line-color);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
li a {
|
|
39
|
-
display: block;
|
|
40
|
-
padding: 5px 4px 1px 4px;
|
|
41
|
-
text-decoration: none;
|
|
42
|
-
font: var(--group-bar-textbutton);
|
|
43
|
-
color: rgba(255, 255, 255, 0.8);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
li[active] a {
|
|
47
|
-
font: var(--group-bar-textbutton-active);
|
|
48
|
-
color: rgba(255, 255, 255, 1);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
li[padding] {
|
|
52
|
-
flex: 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
li[add] {
|
|
56
|
-
padding: 5px 4px 1px 4px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
li[add] * {
|
|
60
|
-
color: rgba(255, 255, 255, 0.5);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
mwc-icon {
|
|
64
|
-
vertical-align: middle;
|
|
65
|
-
}
|
|
66
|
-
`
|
|
67
|
-
]
|
|
12
|
+
static styles = [GroupBarStyles]
|
|
68
13
|
|
|
69
14
|
@property({ type: Array }) groups: { id: string; name: string }[] = []
|
|
70
15
|
@property({ type: String }) groupId: string = ''
|
|
@@ -83,10 +28,10 @@ export default class PlayGroupBar extends LitElement {
|
|
|
83
28
|
`
|
|
84
29
|
)}
|
|
85
30
|
|
|
86
|
-
<li padding
|
|
31
|
+
<li padding> </li>
|
|
87
32
|
|
|
88
33
|
<li add>
|
|
89
|
-
<
|
|
34
|
+
<md-icon @click=${e => this._infoGroup()}>add</md-icon>
|
|
90
35
|
</li>
|
|
91
36
|
</ul>
|
|
92
37
|
`
|
|
@@ -127,7 +72,7 @@ export default class PlayGroupBar extends LitElement {
|
|
|
127
72
|
var scrollTarget = this.renderRoot.querySelector('ul')
|
|
128
73
|
|
|
129
74
|
/* long-press */
|
|
130
|
-
longpressable(scrollTarget)
|
|
75
|
+
longpressable(scrollTarget!)
|
|
131
76
|
|
|
132
77
|
scrollTarget!.addEventListener('mousewheel', this._onWheelEvent.bind(this), false)
|
|
133
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -49,7 +49,7 @@ class BoardRendererElement extends LitElement {
|
|
|
49
49
|
max-width: 100%;
|
|
50
50
|
max-height: 100%;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
md-icon {
|
|
53
53
|
position: absolute;
|
|
54
54
|
top: 0;
|
|
55
55
|
text-align: center;
|
|
@@ -59,13 +59,13 @@ class BoardRendererElement extends LitElement {
|
|
|
59
59
|
height: var(--board-renderer-icon-size);
|
|
60
60
|
font: var(--board-renderer-font);
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
md-icon[edit] {
|
|
63
63
|
right: 0;
|
|
64
64
|
|
|
65
65
|
border-bottom-left-radius: var(--board-renderer-icon-border-radius);
|
|
66
66
|
background-color: var(--board-renderer-icon-edit-background-color);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
md-icon[view] {
|
|
69
69
|
left: 0;
|
|
70
70
|
|
|
71
71
|
border-bottom-right-radius: var(--board-renderer-icon-border-radius);
|
|
@@ -105,8 +105,8 @@ class BoardRendererElement extends LitElement {
|
|
|
105
105
|
? html`
|
|
106
106
|
<span>${name}</span>
|
|
107
107
|
<img src=${thumbnail} alt="no thumbnail!" />
|
|
108
|
-
<
|
|
109
|
-
<
|
|
108
|
+
<md-icon view @mousedown=${e => this.onClickViewer(e, id)}>search</md-icon>
|
|
109
|
+
<md-icon edit @mousedown=${e => this.onClickModeler(e, id)}>edit</md-icon>
|
|
110
110
|
`
|
|
111
111
|
: html` choose board.. `
|
|
112
112
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '@material/mwc-icon'
|
|
2
1
|
import '../viewparts/board-info'
|
|
3
2
|
import '../viewparts/group-info'
|
|
4
3
|
import '../board-list/board-tile-list'
|
|
@@ -83,7 +82,13 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
83
82
|
return {
|
|
84
83
|
title: {
|
|
85
84
|
icon: 'dashboard',
|
|
86
|
-
text: group
|
|
85
|
+
text: group
|
|
86
|
+
? 'Group ' + group.name
|
|
87
|
+
: groupId == 'favor'
|
|
88
|
+
? 'Favorite'
|
|
89
|
+
: groupId == 'mywork'
|
|
90
|
+
? 'My works'
|
|
91
|
+
: 'Board List'
|
|
87
92
|
},
|
|
88
93
|
search: {
|
|
89
94
|
handler: search => {
|
|
@@ -104,7 +109,12 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
104
109
|
|
|
105
110
|
render() {
|
|
106
111
|
return html`
|
|
107
|
-
<group-bar
|
|
112
|
+
<group-bar
|
|
113
|
+
.groups=${this.groups}
|
|
114
|
+
.groupId=${this.groupId}
|
|
115
|
+
targetPage="board-list"
|
|
116
|
+
@info-group=${e => this.onInfoGroup(e.detail)}
|
|
117
|
+
></group-bar>
|
|
108
118
|
|
|
109
119
|
<board-tile-list
|
|
110
120
|
id="list"
|
|
@@ -321,7 +331,9 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
321
331
|
list.style.transition = 'transform 0.3s'
|
|
322
332
|
list.style.transform = `translate3d(${d < 0 ? '-100%' : '100%'}, 0, 0)`
|
|
323
333
|
|
|
324
|
-
navigate(
|
|
334
|
+
navigate(
|
|
335
|
+
`${this.page}/${groups[currentIndex + (d < 0 ? 1 : -1)].id}${this.searchText ? '?search=' + this.searchText : ''}`
|
|
336
|
+
)
|
|
325
337
|
}
|
|
326
338
|
}
|
|
327
339
|
}
|
|
@@ -501,7 +513,8 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
501
513
|
}
|
|
502
514
|
})
|
|
503
515
|
|
|
504
|
-
data &&
|
|
516
|
+
data &&
|
|
517
|
+
this._notify('info', i18next.t('text.joined into play-group', { board: board.name, playGroup: playGroup.name }))
|
|
505
518
|
} catch (ex) {
|
|
506
519
|
this._notify('error', ex, ex)
|
|
507
520
|
}
|
|
@@ -523,7 +536,8 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
523
536
|
}
|
|
524
537
|
})
|
|
525
538
|
|
|
526
|
-
data &&
|
|
539
|
+
data &&
|
|
540
|
+
this._notify('info', i18next.t('text.leaved from play-group', { board: board.name, playGroup: playGroup.name }))
|
|
527
541
|
} catch (ex) {
|
|
528
542
|
this._notify('error', ex, ex)
|
|
529
543
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './things-scene-components.import'
|
|
2
2
|
import '@operato/board/ox-board-modeller.js'
|
|
3
|
+
import '@operato/oops'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { css, html } from 'lit'
|
|
@@ -55,11 +56,11 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
55
56
|
position: relative;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
board-modeller {
|
|
59
|
+
ox-board-modeller {
|
|
59
60
|
flex: 1;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
oops-note {
|
|
63
|
+
ox-oops-note {
|
|
63
64
|
display: block;
|
|
64
65
|
position: absolute;
|
|
65
66
|
left: 50%;
|
|
@@ -190,7 +191,7 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
190
191
|
var oops = !this.preparing && !this.model && this.oopsNote
|
|
191
192
|
|
|
192
193
|
return oops
|
|
193
|
-
? html` <oops-note icon=${oops.icon} title=${oops.title} description=${oops.description}></oops-note> `
|
|
194
|
+
? html` <ox-oops-note icon=${oops.icon} title=${oops.title} description=${oops.description}></ox-oops-note> `
|
|
194
195
|
: html`
|
|
195
196
|
<ox-board-modeller
|
|
196
197
|
.mode=${this.mode}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './things-scene-components.import'
|
|
2
2
|
import '@operato/board/ox-board-player.js'
|
|
3
|
+
import '@operato/oops'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { css, html } from 'lit'
|
|
@@ -45,7 +46,7 @@ export class BoardPlayerPage extends connect(store)(PageView) {
|
|
|
45
46
|
flex: 1;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
oops-spinner {
|
|
49
|
+
ox-oops-spinner {
|
|
49
50
|
display: none;
|
|
50
51
|
position: absolute;
|
|
51
52
|
left: 50%;
|
|
@@ -53,11 +54,11 @@ export class BoardPlayerPage extends connect(store)(PageView) {
|
|
|
53
54
|
transform: translate(-50%, -50%);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
oops-spinner[show] {
|
|
57
|
+
ox-oops-spinner[show] {
|
|
57
58
|
display: block;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
oops-note {
|
|
61
|
+
ox-oops-note {
|
|
61
62
|
display: block;
|
|
62
63
|
position: absolute;
|
|
63
64
|
left: 50%;
|
|
@@ -179,10 +180,10 @@ export class BoardPlayerPage extends connect(store)(PageView) {
|
|
|
179
180
|
var oops = !this.showSpinner && !this.playGroup && this.oopsNote
|
|
180
181
|
|
|
181
182
|
return oops
|
|
182
|
-
? html` <oops-note icon=${oops.icon} title=${oops.title} description=${oops.description}></oops-note> `
|
|
183
|
+
? html` <ox-oops-note icon=${oops.icon} title=${oops.title} description=${oops.description}></ox-oops-note> `
|
|
183
184
|
: html`
|
|
184
185
|
<ox-board-player .boards=${this.boards} .data=${this.data} .provider=${this.provider}></ox-board-player>
|
|
185
|
-
<oops-spinner ?show=${this.showSpinner}></oops-spinner>
|
|
186
|
+
<ox-oops-spinner ?show=${this.showSpinner}></ox-oops-spinner>
|
|
186
187
|
`
|
|
187
188
|
}
|
|
188
189
|
|