@things-factory/board-ui 7.0.1-alpha.9 → 7.0.1-alpha.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/apptools/favorite-tool.ts +8 -7
- package/client/board-list/board-tile-list.ts +38 -34
- 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/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 +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 +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 +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.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 +1 -1
- 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 +1 -1
- 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-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/pages/play-list-page.d.ts +2 -2
- 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-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 +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 +49 -37
- 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
- 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')
|
|
@@ -37,6 +38,7 @@ export class BoardTileList extends LitElement {
|
|
|
37
38
|
|
|
38
39
|
[card] > a {
|
|
39
40
|
display: flex;
|
|
41
|
+
clip-path: border-box;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
[card]:hover {
|
|
@@ -55,26 +57,23 @@ export class BoardTileList extends LitElement {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
img {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
margin: auto;
|
|
61
|
-
max-width: 100%;
|
|
62
|
-
max-height: 100%;
|
|
60
|
+
flex: 1;
|
|
61
|
+
object-fit: contain;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
md-icon[iconBtn] {
|
|
66
65
|
float: right;
|
|
67
66
|
margin-top: -20px;
|
|
68
67
|
margin-left: 2px;
|
|
69
68
|
color: var(--board-list-star-color);
|
|
70
69
|
font-size: 1.4em;
|
|
71
70
|
}
|
|
72
|
-
|
|
71
|
+
md-icon[info] {
|
|
73
72
|
color: var(--primary-color);
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
md-icon[iconBtn][favored],
|
|
76
|
+
md-icon[info]:hover {
|
|
78
77
|
color: var(--board-list-star-active-color);
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -174,36 +173,41 @@ export class BoardTileList extends LitElement {
|
|
|
174
173
|
? privileged(
|
|
175
174
|
{ privilege: 'mutation', category: 'board' },
|
|
176
175
|
html`
|
|
177
|
-
<ox-board-creation-card
|
|
176
|
+
<ox-board-creation-card
|
|
177
|
+
.groups=${this.groups}
|
|
178
|
+
.defaultGroup=${this.group}
|
|
179
|
+
@create-board=${e => this.onCreateBoard(e)}
|
|
180
|
+
card
|
|
181
|
+
create
|
|
182
|
+
></ox-board-creation-card>
|
|
178
183
|
`
|
|
179
184
|
)
|
|
180
185
|
: nothing}
|
|
181
186
|
${keyed(
|
|
182
187
|
Date.now(),
|
|
183
188
|
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
|
-
`
|
|
189
|
+
board => html`
|
|
190
|
+
<div card draggable="true" id=${board.id}>
|
|
191
|
+
<a href="board-viewer/${board.id}"> <img src=${board.thumbnail} /> </a>
|
|
192
|
+
|
|
193
|
+
<div name>${board.name}</div>
|
|
194
|
+
<!-- <div description>${board.description}</div> -->
|
|
195
|
+
|
|
196
|
+
<md-icon
|
|
197
|
+
iconBtn
|
|
198
|
+
info
|
|
199
|
+
@click=${e => {
|
|
200
|
+
this.infoBoard(board)
|
|
201
|
+
e.preventDefault()
|
|
202
|
+
}}
|
|
203
|
+
>info</md-icon
|
|
204
|
+
>
|
|
205
|
+
|
|
206
|
+
${(this.favorites || []).includes(board.id)
|
|
207
|
+
? html` <md-icon iconBtn favored @click=${e => this.removeFavorite(board.id)}>star</md-icon> `
|
|
208
|
+
: html` <md-icon iconBtn @click=${e => this.addFavorite(board.id)}>star_border</md-icon> `}
|
|
209
|
+
</div>
|
|
210
|
+
`
|
|
207
211
|
)
|
|
208
212
|
)}
|
|
209
213
|
`
|
|
@@ -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
|
-
import '@material/
|
|
2
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/fab/fab.js'
|
|
3
|
+
|
|
3
4
|
import '../viewparts/play-group-info'
|
|
4
5
|
import '../board-list/board-tile-list'
|
|
5
6
|
import '../board-list/play-group-bar'
|
|
@@ -18,15 +19,7 @@ import { ScrollbarStyles } from '@operato/styles'
|
|
|
18
19
|
import { pulltorefresh } from '@operato/pull-to-refresh'
|
|
19
20
|
import { swipe, isMobileDevice } from '@things-factory/utils'
|
|
20
21
|
|
|
21
|
-
import {
|
|
22
|
-
createPlayGroup,
|
|
23
|
-
deletePlayGroup,
|
|
24
|
-
fetchPlayGroup,
|
|
25
|
-
fetchPlayGroupList,
|
|
26
|
-
leavePlayGroup,
|
|
27
|
-
updateBoard,
|
|
28
|
-
updatePlayGroup
|
|
29
|
-
} from '../graphql'
|
|
22
|
+
import { createPlayGroup, deletePlayGroup, fetchPlayGroup, fetchPlayGroupList, leavePlayGroup, updateBoard, updatePlayGroup } from '../graphql'
|
|
30
23
|
|
|
31
24
|
@customElement('play-list-page')
|
|
32
25
|
export class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
|
|
@@ -78,12 +71,7 @@ export class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
|
|
|
78
71
|
|
|
79
72
|
render() {
|
|
80
73
|
return html`
|
|
81
|
-
<play-group-bar
|
|
82
|
-
.groups=${this.groups}
|
|
83
|
-
.groupId=${this.groupId}
|
|
84
|
-
target-page="play-list"
|
|
85
|
-
@info-play-group=${e => this.onInfoPlayGroup(e.detail)}
|
|
86
|
-
></play-group-bar>
|
|
74
|
+
<play-group-bar .groups=${this.groups} .groupId=${this.groupId} target-page="play-list" @info-play-group=${e => this.onInfoPlayGroup(e.detail)}></play-group-bar>
|
|
87
75
|
|
|
88
76
|
<board-tile-list
|
|
89
77
|
.favorites=${this.favorites}
|
|
@@ -97,7 +85,9 @@ export class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
|
|
|
97
85
|
></board-tile-list>
|
|
98
86
|
|
|
99
87
|
<a id="play" .href=${'board-player/' + this.groupId}>
|
|
100
|
-
<
|
|
88
|
+
<md-fab title="play">
|
|
89
|
+
<md-icon slot="icon">play_arrow</md-icon>
|
|
90
|
+
</md-fab>
|
|
101
91
|
</a>
|
|
102
92
|
`
|
|
103
93
|
}
|
|
@@ -99,7 +99,7 @@ export class ThemeListPage extends connect(store)(localize(i18next)(ScopedElemen
|
|
|
99
99
|
|
|
100
100
|
<div id="sorters">
|
|
101
101
|
Sort
|
|
102
|
-
<
|
|
102
|
+
<md-icon
|
|
103
103
|
@click=${e => {
|
|
104
104
|
const target = e.currentTarget
|
|
105
105
|
this.sortersControl.open({
|
|
@@ -107,7 +107,7 @@ export class ThemeListPage extends connect(store)(localize(i18next)(ScopedElemen
|
|
|
107
107
|
top: target.offsetTop + target.offsetHeight
|
|
108
108
|
})
|
|
109
109
|
}}
|
|
110
|
-
>expand_more</
|
|
110
|
+
>expand_more</md-icon
|
|
111
111
|
>
|
|
112
112
|
<ox-popup id="sorter-control">
|
|
113
113
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -115,9 +115,10 @@ export class ThemeListPage extends connect(store)(localize(i18next)(ScopedElemen
|
|
|
115
115
|
</div>
|
|
116
116
|
|
|
117
117
|
<div id="modes">
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
<
|
|
118
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
119
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
120
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
121
|
+
</div>
|
|
121
122
|
</div>
|
|
122
123
|
</div>
|
|
123
124
|
</ox-grist>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import '@material/mwc-formfield'
|
|
3
|
-
import '@material/mwc-checkbox'
|
|
1
|
+
import '@material/web/checkbox/checkbox.js'
|
|
4
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
|
+
import '@things-factory/setting-base'
|
|
5
4
|
|
|
6
5
|
import { css, html, LitElement } from 'lit'
|
|
7
6
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -14,6 +13,10 @@ export class BoardViewSettingLet extends localize(i18next)(LitElement) {
|
|
|
14
13
|
static styles = [
|
|
15
14
|
css`
|
|
16
15
|
label {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 10px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
17
20
|
font: var(--label-font);
|
|
18
21
|
color: var(--label-color);
|
|
19
22
|
text-transform: var(--label-text-transform);
|
|
@@ -29,9 +32,10 @@ export class BoardViewSettingLet extends localize(i18next)(LitElement) {
|
|
|
29
32
|
<ox-i18n slot="title" msgid="title.board view setting"></ox-i18n>
|
|
30
33
|
|
|
31
34
|
<div slot="content">
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
+
<label>
|
|
36
|
+
<md-checkbox id="auto-refresh" @change=${e => this.onChange(e)} ?checked=${this.autoRefresh}></md-checkbox>
|
|
37
|
+
${String(i18next.t('label.auto refresh board view'))}
|
|
38
|
+
</label>
|
|
35
39
|
</div>
|
|
36
40
|
</setting-let>
|
|
37
41
|
`
|