@electerm/electerm-react 1.38.41 → 1.38.43
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.
|
@@ -551,7 +551,7 @@ export default class ItemListTree extends Component {
|
|
|
551
551
|
title={e('edit')}
|
|
552
552
|
key='edit-tree'
|
|
553
553
|
onClick={(e) => this.editItem(e, item, isGroup)}
|
|
554
|
-
className='pointer tree-control-btn'
|
|
554
|
+
className='pointer edit-icon tree-control-btn'
|
|
555
555
|
/>
|
|
556
556
|
)
|
|
557
557
|
}
|
|
@@ -568,7 +568,7 @@ export default class ItemListTree extends Component {
|
|
|
568
568
|
<FolderOpenOutlined
|
|
569
569
|
key='open-all-tree'
|
|
570
570
|
onClick={(e) => this.props.store.openAllBookmarkInCategory(item)}
|
|
571
|
-
className='pointer tree-control-btn'
|
|
571
|
+
className='pointer open-all-icon tree-control-btn'
|
|
572
572
|
/>
|
|
573
573
|
</Tooltip>
|
|
574
574
|
)
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
width 16px
|
|
10
10
|
line-height 26px
|
|
11
11
|
height 20px
|
|
12
|
-
position absolute
|
|
13
|
-
right 0
|
|
14
|
-
top 0
|
|
15
12
|
.tree-item
|
|
16
13
|
display flex
|
|
17
14
|
&.is-category
|
|
@@ -28,7 +25,6 @@
|
|
|
28
25
|
overflow hidden
|
|
29
26
|
white-space nowrap
|
|
30
27
|
text-overflow ellipsis
|
|
31
|
-
padding-right 20px
|
|
32
28
|
.sidebar-panel .tree-item-title
|
|
33
29
|
max-width 180px
|
|
34
30
|
.with-plus
|
|
@@ -38,3 +34,16 @@
|
|
|
38
34
|
font-size 16px
|
|
39
35
|
top 2px
|
|
40
36
|
right 2px
|
|
37
|
+
.add-menu-wrap
|
|
38
|
+
.tree-item-title
|
|
39
|
+
padding-right 20px
|
|
40
|
+
.is-category
|
|
41
|
+
.tree-item-title
|
|
42
|
+
padding-right 40px
|
|
43
|
+
.edit-icon.tree-control-btn
|
|
44
|
+
.open-all-icon.tree-control-btn
|
|
45
|
+
position absolute
|
|
46
|
+
right 0
|
|
47
|
+
top 0
|
|
48
|
+
.open-all-icon.tree-control-btn
|
|
49
|
+
right 20px
|
|
@@ -56,6 +56,10 @@ export default class InfoModal extends Component {
|
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
formatJSON = (jsonStr) => {
|
|
60
|
+
return JSON.stringify(JSON.parse(jsonStr), null, 2)
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
render () {
|
|
60
64
|
const { store } = this.props
|
|
61
65
|
const {
|
|
@@ -216,7 +220,11 @@ export default class InfoModal extends Component {
|
|
|
216
220
|
<div className='pd1b' key={i + '_os_' + k}>
|
|
217
221
|
<b className='bold'>{k}</b>:
|
|
218
222
|
<span className='mg1l'>
|
|
219
|
-
{
|
|
223
|
+
{
|
|
224
|
+
v.length > 30
|
|
225
|
+
? <pre>{this.formatJSON(v)}</pre>
|
|
226
|
+
: v
|
|
227
|
+
}
|
|
220
228
|
</span>
|
|
221
229
|
</div>
|
|
222
230
|
)
|
package/client/store/sync.js
CHANGED
|
@@ -170,8 +170,10 @@ export default (Store) => {
|
|
|
170
170
|
content: str
|
|
171
171
|
}
|
|
172
172
|
const order = await getData(`${n}:order`)
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
if (order && order.length) {
|
|
174
|
+
objs[`${n}.order.json`] = {
|
|
175
|
+
content: JSON.stringify(order)
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
const res = await fetchData(type, 'update', [gistId, {
|
|
@@ -240,7 +242,7 @@ export default (Store) => {
|
|
|
240
242
|
arr = fixBookmarks(arr)
|
|
241
243
|
}
|
|
242
244
|
let strOrder = get(gist, `files["${n}.order.json"].content`)
|
|
243
|
-
if (strOrder) {
|
|
245
|
+
if (isJSON(strOrder)) {
|
|
244
246
|
strOrder = JSON.parse(strOrder)
|
|
245
247
|
arr.sort((a, b) => {
|
|
246
248
|
const ai = findIndex(strOrder, r => r === a.id)
|