mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
chore: fix typos
This commit is contained in:
parent
d0c7c1569d
commit
9fb91e764b
@ -9,7 +9,7 @@ type WsMsg = {
|
||||
downloadTotal: number
|
||||
} | null
|
||||
|
||||
// we make allconnections global so we can keep track of connections when user in proxy page
|
||||
// we make connections global, so we can keep track of connections when user in proxy page
|
||||
// when user selects proxy and close some connections they can back and check connections
|
||||
// they closed
|
||||
const [allConnectionsWithSpeed, setAllConnectionsWithSpeed] = createSignal<
|
||||
@ -40,7 +40,7 @@ export const useConnections = () => {
|
||||
const prevMap = new Map<string, Connection>()
|
||||
prevActiveConnections.forEach((prev) => prevMap.set(prev.id, prev))
|
||||
|
||||
const activeConnnections: ConnectionWithSpeed[] = connections.map(
|
||||
const activeConnections: ConnectionWithSpeed[] = connections.map(
|
||||
(connection) => {
|
||||
const prevConn = prevMap.get(connection.id)
|
||||
|
||||
@ -60,17 +60,17 @@ export const useConnections = () => {
|
||||
|
||||
const allConnections = unionWith(
|
||||
allConnectionsWithSpeed(),
|
||||
activeConnnections,
|
||||
activeConnections,
|
||||
(a, b) => a.id === b.id,
|
||||
)
|
||||
const closedConnections = differenceWith(
|
||||
allConnections,
|
||||
activeConnnections,
|
||||
activeConnections,
|
||||
(a, b) => a.id === b.id,
|
||||
)
|
||||
|
||||
return {
|
||||
activeConns: activeConnnections.slice(-200),
|
||||
activeConns: activeConnections.slice(-200),
|
||||
closedConns: closedConnections.slice(-200),
|
||||
allConns: allConnections.slice(-400),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user