@electerm/electerm-react 2.16.6 → 2.16.8
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.
|
@@ -152,9 +152,9 @@ export default function QuickCommandsFooterBox (props) {
|
|
|
152
152
|
return null
|
|
153
153
|
}
|
|
154
154
|
const all = props.currentQuickCommands
|
|
155
|
-
if (!all.length) {
|
|
156
|
-
|
|
157
|
-
}
|
|
155
|
+
// if (!all.length) {
|
|
156
|
+
// return renderNoCmd()
|
|
157
|
+
// }
|
|
158
158
|
const keyword0 = keyword.toLowerCase()
|
|
159
159
|
const filtered = filterArray(all, keyword0, label)
|
|
160
160
|
const sorted = qmSortByFrequency
|
|
@@ -226,6 +226,9 @@ export default function QuickCommandsFooterBox (props) {
|
|
|
226
226
|
</Flex>
|
|
227
227
|
<div className={cls}>
|
|
228
228
|
{sorted.map(renderItem)}
|
|
229
|
+
{
|
|
230
|
+
!sorted.length && renderNoCmd()
|
|
231
|
+
}
|
|
229
232
|
</div>
|
|
230
233
|
</div>
|
|
231
234
|
</div>
|
package/client/store/store.js
CHANGED
|
@@ -177,8 +177,8 @@ class Store {
|
|
|
177
177
|
get terminalCommandSuggestions () {
|
|
178
178
|
const { store } = window
|
|
179
179
|
const historyCommands = Array.from(store.terminalCommandHistory.keys())
|
|
180
|
-
const batchInputCommands = store.batchInputs
|
|
181
|
-
const quickCommands = store.quickCommands.reduce(
|
|
180
|
+
const batchInputCommands = store.batchInputs || []
|
|
181
|
+
const quickCommands = (store.quickCommands || []).reduce(
|
|
182
182
|
(p, q) => {
|
|
183
183
|
return [
|
|
184
184
|
...p,
|