@electerm/electerm-react 2.16.8 → 2.16.9
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.
|
@@ -13,9 +13,6 @@ const SORT_BY_FREQ_KEY = 'electerm-history-sort-by-frequency'
|
|
|
13
13
|
|
|
14
14
|
export default auto(function HistoryPanel (props) {
|
|
15
15
|
const { store } = window
|
|
16
|
-
if (store.config.disableConnectionHistory) {
|
|
17
|
-
return null
|
|
18
|
-
}
|
|
19
16
|
const [sortByFrequency, setSortByFrequency] = useState(() => {
|
|
20
17
|
return getItemJSON(SORT_BY_FREQ_KEY, false)
|
|
21
18
|
})
|
|
@@ -27,7 +24,7 @@ export default auto(function HistoryPanel (props) {
|
|
|
27
24
|
const {
|
|
28
25
|
history
|
|
29
26
|
} = store
|
|
30
|
-
let arr = [
|
|
27
|
+
let arr = store.config.disableConnectionHistory ? [] : history
|
|
31
28
|
if (sortByFrequency) {
|
|
32
29
|
arr = arr.sort((a, b) => { return b.count - a.count })
|
|
33
30
|
}
|