@electerm/electerm-react 1.36.1 → 1.36.2
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/components/auth/login.jsx +2 -0
- package/client/store/index.js +2 -2
- package/client/store/init-state.js +130 -128
- package/package.json +1 -1
package/client/store/index.js
CHANGED
|
@@ -88,7 +88,7 @@ class Store {
|
|
|
88
88
|
constructor () {
|
|
89
89
|
Object.assign(
|
|
90
90
|
this,
|
|
91
|
-
initState
|
|
91
|
+
initState()
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -350,7 +350,7 @@ batchInputHistory(Store)
|
|
|
350
350
|
transferExtend(Store)
|
|
351
351
|
addressBookmarkExtend(Store)
|
|
352
352
|
|
|
353
|
+
export const StateStore = Store
|
|
353
354
|
const store = manage(new Store())
|
|
354
355
|
|
|
355
|
-
window.store = store
|
|
356
356
|
export default store
|
|
@@ -53,132 +53,134 @@ export const getInitItem = (arr, tab) => {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export default {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
56
|
+
export default () => {
|
|
57
|
+
return {
|
|
58
|
+
// common
|
|
59
|
+
wsInited: false,
|
|
60
|
+
configLoaded: false,
|
|
61
|
+
loadTime: 0,
|
|
62
|
+
lastDataUpdateTime: 0,
|
|
63
|
+
_tabs: '[]',
|
|
64
|
+
currentTabId: '',
|
|
65
|
+
termFocused: false,
|
|
66
|
+
_history: '[]',
|
|
67
|
+
_bookmarks: '[]',
|
|
68
|
+
_bookmarkGroups: JSON.stringify(
|
|
69
|
+
getDefaultBookmarkGroups([])
|
|
70
|
+
),
|
|
71
|
+
_config: '{}',
|
|
72
|
+
_terminalThemes: JSON.stringify([
|
|
73
|
+
buildDefaultThemes()
|
|
74
|
+
]),
|
|
75
|
+
_itermThemes: '[]',
|
|
76
|
+
currentBookmarkGroupId: defaultBookmarkGroupId,
|
|
77
|
+
_expandedKeys: ls.getItem(expandedKeysLsKey) || JSON.stringify([
|
|
78
|
+
defaultBookmarkGroupId
|
|
79
|
+
]),
|
|
80
|
+
bookmarkSelectMode: false,
|
|
81
|
+
_checkedKeys: ls.getItem(checkedKeysLsKey) || '[]',
|
|
82
|
+
_addressBookmarks: '[]',
|
|
83
|
+
_addressBookmarksLocal: ls.getItem(localAddrBookmarkLsKey) || '[]',
|
|
84
|
+
|
|
85
|
+
// init session control
|
|
86
|
+
selectedSessions: [],
|
|
87
|
+
sessionModalVisible: false,
|
|
88
|
+
|
|
89
|
+
// sftp
|
|
90
|
+
fileOperation: fileOperationsMap.cp, // cp or mv
|
|
91
|
+
transferTab: 'transfer',
|
|
92
|
+
_transferHistory: '[]',
|
|
93
|
+
_fileTransfers: '[]',
|
|
94
|
+
_sftpSortSetting: ls.getItem(sftpDefaultSortSettingKey) || JSON.stringify({
|
|
95
|
+
local: {
|
|
96
|
+
prop: 'modifyTime',
|
|
97
|
+
direction: 'asc'
|
|
98
|
+
},
|
|
99
|
+
remote: {
|
|
100
|
+
prop: 'modifyTime',
|
|
101
|
+
direction: 'desc'
|
|
102
|
+
}
|
|
103
|
+
}),
|
|
104
|
+
|
|
105
|
+
// for settings related
|
|
106
|
+
_setting: '',
|
|
107
|
+
_settingItem: JSON.stringify(getInitItem([], settingMap.bookmarks)),
|
|
108
|
+
settingTab: settingMap.bookmarks, // setting tab
|
|
109
|
+
autofocustrigger: Date.now(),
|
|
110
|
+
bookmarkId: undefined,
|
|
111
|
+
showModal: 0,
|
|
112
|
+
activeTerminalId: '',
|
|
113
|
+
|
|
114
|
+
// setting sync related
|
|
115
|
+
isSyncingSetting: false,
|
|
116
|
+
isSyncUpload: false,
|
|
117
|
+
isSyncDownload: false,
|
|
118
|
+
syncSetting: {},
|
|
119
|
+
syncType: syncTypes.github,
|
|
120
|
+
_fonts: '[]',
|
|
121
|
+
|
|
122
|
+
// term search
|
|
123
|
+
termSearchOpen: false,
|
|
124
|
+
termSearch: '',
|
|
125
|
+
termSearchMatchCount: 0,
|
|
126
|
+
termSearchMatchIndex: 0,
|
|
127
|
+
_termSearchOptions: JSON.stringify({
|
|
128
|
+
caseSensitive: false,
|
|
129
|
+
wholeWord: false,
|
|
130
|
+
regex: false,
|
|
131
|
+
decorations: {
|
|
132
|
+
activeMatchColorOverviewRuler: 'yellow'
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
|
|
136
|
+
// quick commands
|
|
137
|
+
_quickCommands: '[]',
|
|
138
|
+
quickCommandId: '',
|
|
139
|
+
openQuickCommandBar: false,
|
|
140
|
+
pinnedQuickCommandBar: false,
|
|
141
|
+
|
|
142
|
+
// sidebar
|
|
143
|
+
openedSideBar: ls.getItem(openedSidebarKey),
|
|
144
|
+
menuOpened: false,
|
|
145
|
+
pinned: ls.getItem(sidebarPinnedKey) === 'true',
|
|
146
|
+
|
|
147
|
+
// info/help modal
|
|
148
|
+
showInfoModal: false,
|
|
149
|
+
infoModalTab: infoTabs.info,
|
|
150
|
+
commandLineHelp: '',
|
|
151
|
+
|
|
152
|
+
// editor
|
|
153
|
+
showEditor: false,
|
|
154
|
+
|
|
155
|
+
// file/info modal
|
|
156
|
+
showFileModal: false,
|
|
157
|
+
|
|
158
|
+
// update
|
|
159
|
+
_upgradeInfo: '{}',
|
|
160
|
+
|
|
161
|
+
// serial list related
|
|
162
|
+
_serials: '[]',
|
|
163
|
+
loaddingSerials: false,
|
|
164
|
+
|
|
165
|
+
// transfer list
|
|
166
|
+
transports: [],
|
|
167
|
+
|
|
168
|
+
_sshConfigItems: '[]',
|
|
169
|
+
|
|
170
|
+
appPath: '',
|
|
171
|
+
exePath: '',
|
|
172
|
+
isPortable: false,
|
|
173
|
+
installSrc: '',
|
|
174
|
+
|
|
175
|
+
_langs: '[]',
|
|
176
|
+
|
|
177
|
+
// batch inputs
|
|
178
|
+
batchInputs: ls.getItemJSON(batchInputLsKey, []),
|
|
179
|
+
|
|
180
|
+
// ui
|
|
181
|
+
innerWidth: window.innerWidth,
|
|
182
|
+
height: 500,
|
|
183
|
+
isMaximized: window.pre.runSync('isMaximized'),
|
|
184
|
+
terminalFullScreen: false
|
|
185
|
+
}
|
|
184
186
|
}
|