@electerm/electerm-react 3.15.66 → 3.15.69
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/constants.js +1 -1
- 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/setting-sync/setting-sync-form.jsx +3 -3
- 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
|
@@ -212,7 +212,7 @@ export const syncTokenCreateUrls = {
|
|
|
212
212
|
gitee: 'https://gitee.com/github-zxdong262/electerm/wikis/Create%20personal%20access%20token?sort_id=3028409',
|
|
213
213
|
github: 'https://github.com/electerm/electerm/wiki/Create-personal-access-token',
|
|
214
214
|
custom: 'https://github.com/electerm/electerm/wiki/Custom-sync-server',
|
|
215
|
-
cloud: 'https://electerm
|
|
215
|
+
cloud: 'https://sync.electerm.org',
|
|
216
216
|
webdav: 'https://github.com/electerm/electerm/wiki/WebDAV-sync'
|
|
217
217
|
}
|
|
218
218
|
export const settingSyncId = 'setting-sync'
|
|
@@ -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>
|
|
@@ -66,7 +66,7 @@ export default function SyncForm (props) {
|
|
|
66
66
|
if (res.apiUrl) {
|
|
67
67
|
up[syncType + 'ApiUrl'] = res.apiUrl
|
|
68
68
|
} else if (syncType === syncTypes.cloud) {
|
|
69
|
-
up[syncType + 'ApiUrl'] = 'https://electerm
|
|
69
|
+
up[syncType + 'ApiUrl'] = 'https://sync.electerm.org/api/sync'
|
|
70
70
|
// up[syncType + 'ApiUrl'] = 'http://127.0.0.1:5678/api/sync'
|
|
71
71
|
}
|
|
72
72
|
if (res.proxy) {
|
|
@@ -187,8 +187,8 @@ export default function SyncForm (props) {
|
|
|
187
187
|
if (syncType === syncTypes.cloud) {
|
|
188
188
|
return (
|
|
189
189
|
<p>
|
|
190
|
-
<Link to='https://electerm
|
|
191
|
-
https://electerm
|
|
190
|
+
<Link to='https://sync.electerm.org'>
|
|
191
|
+
https://sync.electerm.org[Beta]
|
|
192
192
|
</Link>
|
|
193
193
|
</p>
|
|
194
194
|
)
|
|
@@ -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.69",
|
|
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"
|