@electerm/electerm-react 1.51.20 → 1.51.21

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.
@@ -16,15 +16,16 @@ import download from '../../common/download'
16
16
 
17
17
  const e = window.translate
18
18
 
19
- export default function BookmarkToolbar ({
20
- onNewBookmark,
21
- onNewBookmarkGroup,
22
- onImport,
23
- onExport,
24
- onSshConfigs,
25
- bookmarkGroups,
26
- bookmarks
27
- }) {
19
+ export default function BookmarkToolbar (props) {
20
+ const {
21
+ onNewBookmark,
22
+ onNewBookmarkGroup,
23
+ onImport,
24
+ onExport,
25
+ onSshConfigs,
26
+ bookmarkGroups,
27
+ bookmarks
28
+ } = props
28
29
  const beforeUpload = async (file) => {
29
30
  const { store } = window
30
31
  const txt = await window.fs.readFile(file.path)
@@ -34,16 +35,15 @@ export default function BookmarkToolbar ({
34
35
  bookmarkGroups: bookmarkGroups1,
35
36
  bookmarks: bookmarks1
36
37
  } = content
37
- const { props } = this
38
- const bookmarkGroups = copy(props.bookmarkGroups)
39
- const bookmarks = copy(props.bookmarks)
40
- const bmTree = bookmarks.reduce((p, v) => {
38
+ const bookmarkGroups0 = copy(bookmarkGroups)
39
+ const bookmarks0 = copy(bookmarks)
40
+ const bmTree = bookmarks0.reduce((p, v) => {
41
41
  return {
42
42
  ...p,
43
43
  [v.id]: v
44
44
  }
45
45
  }, {})
46
- const bmgTree = bookmarkGroups.reduce((p, v) => {
46
+ const bmgTree = bookmarkGroups0.reduce((p, v) => {
47
47
  return {
48
48
  ...p,
49
49
  [v.id]: v
@@ -102,7 +102,6 @@ export default function BookmarkToolbar ({
102
102
  return false
103
103
  }
104
104
  const handleDownload = () => {
105
- const { bookmarkGroups, bookmarks } = this.props
106
105
  const txt = JSON.stringify({
107
106
  bookmarkGroups: copy(bookmarkGroups),
108
107
  bookmarks: copy(bookmarks)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.51.20",
3
+ "version": "1.51.21",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",