@electerm/electerm-react 3.15.66 → 3.15.68
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/common/download-mirrors.js +1 -1
- package/client/components/main/error-wrapper.jsx +1 -1
- package/client/components/setting-panel/setting-modal.jsx +2 -1
- package/client/components/sidebar/bookmark-select.jsx +4 -2
- package/client/components/tree-list/tree-list.jsx +1 -1
- package/client/store/init-state.js +1 -0
- package/client/store/load-data.js +53 -46
- package/package.json +3 -3
|
@@ -119,7 +119,7 @@ export default class ErrorBoundary extends React.PureComponent {
|
|
|
119
119
|
</div>
|
|
120
120
|
<div className='pd3y'>
|
|
121
121
|
<img
|
|
122
|
-
src='https://electerm.
|
|
122
|
+
src='https://electerm.org/electerm-wechat-group-qr.jpg'
|
|
123
123
|
className='mwm-100'
|
|
124
124
|
/>
|
|
125
125
|
</div>
|
|
@@ -13,7 +13,8 @@ export default auto(function BookmarkSelect (props) {
|
|
|
13
13
|
leftSidebarWidth,
|
|
14
14
|
expandedKeys,
|
|
15
15
|
bookmarks,
|
|
16
|
-
bookmarksMap
|
|
16
|
+
bookmarksMap,
|
|
17
|
+
initLoadingData
|
|
17
18
|
} = store
|
|
18
19
|
if (from === 'sidebar' && openedSideBar !== 'bookmarks') {
|
|
19
20
|
return null
|
|
@@ -39,7 +40,8 @@ export default auto(function BookmarkSelect (props) {
|
|
|
39
40
|
expandedKeys,
|
|
40
41
|
leftSidebarWidth,
|
|
41
42
|
bookmarkGroupTree: store.bookmarkGroupTree,
|
|
42
|
-
autoFocus
|
|
43
|
+
autoFocus,
|
|
44
|
+
initLoadingData
|
|
43
45
|
}
|
|
44
46
|
return (
|
|
45
47
|
<TreeList
|
|
@@ -182,55 +182,62 @@ export default (Store) => {
|
|
|
182
182
|
}
|
|
183
183
|
Store.prototype.initData = async function () {
|
|
184
184
|
const { store } = window
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
name
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
await Promise.all(all)
|
|
195
|
-
.then(arr => {
|
|
196
|
-
for (const { name, data } of arr) {
|
|
197
|
-
const dt = JSON.parse(data || '[]')
|
|
198
|
-
refsStatic.add('oldState-' + name, dt)
|
|
199
|
-
if (name === 'bookmarks') {
|
|
200
|
-
ext.bookmarksMap = new Map(
|
|
201
|
-
dt.map(d => [d.id, d])
|
|
202
|
-
)
|
|
203
|
-
}
|
|
204
|
-
ext[name] = dt
|
|
185
|
+
store.initLoadingData = true
|
|
186
|
+
try {
|
|
187
|
+
await store.initApp()
|
|
188
|
+
const ext = {}
|
|
189
|
+
const all = dbNames.map(async name => {
|
|
190
|
+
const data = await fetchInitData(name)
|
|
191
|
+
return {
|
|
192
|
+
name,
|
|
193
|
+
data
|
|
205
194
|
}
|
|
206
195
|
})
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
()
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
196
|
+
await Promise.all(all)
|
|
197
|
+
.then(arr => {
|
|
198
|
+
for (const { name, data } of arr) {
|
|
199
|
+
const dt = JSON.parse(data || '[]')
|
|
200
|
+
refsStatic.add('oldState-' + name, dt)
|
|
201
|
+
if (name === 'bookmarks') {
|
|
202
|
+
ext.bookmarksMap = new Map(
|
|
203
|
+
dt.map(d => [d.id, d])
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
ext[name] = dt
|
|
207
|
+
}
|
|
208
|
+
})
|
|
209
|
+
ext.lastDataUpdateTime = await getData('lastDataUpdateTime') || 0
|
|
210
|
+
ext.initLoadingData = false
|
|
211
|
+
Object.assign(store, ext)
|
|
212
|
+
store.loadFontList()
|
|
213
|
+
store.fetchItermThemes()
|
|
214
|
+
store.openInitSessions()
|
|
215
|
+
store.fetchSshConfigItems()
|
|
216
|
+
store.initCommandLine().catch(store.onError)
|
|
217
|
+
initWatch(store)
|
|
218
|
+
setTimeout(
|
|
219
|
+
() => {
|
|
220
|
+
store.fixProfiles()
|
|
221
|
+
store.fixBookmarkGroups()
|
|
222
|
+
},
|
|
223
|
+
1000
|
|
224
|
+
)
|
|
225
|
+
setTimeout(
|
|
226
|
+
() => {
|
|
227
|
+
store.autoSyncReady = true
|
|
228
|
+
},
|
|
229
|
+
2000
|
|
230
|
+
)
|
|
231
|
+
if (store.config.checkUpdateOnStart) {
|
|
232
|
+
store.onCheckUpdate(false)
|
|
233
|
+
}
|
|
234
|
+
store.startAutoRunWidgets().catch(err => {
|
|
235
|
+
console.error('Failed to start autorun widgets:', err)
|
|
236
|
+
})
|
|
237
|
+
} catch (err) {
|
|
238
|
+
store.initLoadingData = false
|
|
239
|
+
store.onError(err)
|
|
230
240
|
}
|
|
231
|
-
store.startAutoRunWidgets().catch(err => {
|
|
232
|
-
console.error('Failed to start autorun widgets:', err)
|
|
233
|
-
})
|
|
234
241
|
}
|
|
235
242
|
Store.prototype.initCommandLine = async function () {
|
|
236
243
|
const opts = await window.pre.runGlobalAsync('initCommandLine')
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electerm/electerm-react",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.68",
|
|
4
4
|
"description": "react components src for electerm",
|
|
5
5
|
"main": "./client/components/main/main.jsx",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"langugeRepo": "https://github.com/electerm/electerm-locales",
|
|
8
8
|
"privacyNoticeLink": "https://github.com/electerm/electerm/wiki/privacy-notice",
|
|
9
9
|
"knownIssuesLink": "https://github.com/electerm/electerm/wiki/Know-issues",
|
|
10
|
-
"sponsorLink": "https://electerm.
|
|
10
|
+
"sponsorLink": "https://electerm.org/sponsor-electerm.html",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "git+https://github.com/electerm/electerm.git"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/electerm/electerm/issues"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://electerm.
|
|
23
|
+
"homepage": "https://electerm.org",
|
|
24
24
|
"releases": "https://github.com/electerm/electerm/releases",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18.0.0"
|