blob: a5d99870aa24306383ec6c645dbe7dbb7d3fe1d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { store } from '../store'
import types from '../types'
import { socket } from './socket.connection'
import * as actions from './socket.actions'
import * as system from './socket.system'
import * as live from './socket.live'
import * as task from './socket.task'
export default {
socket,
actions,
system,
live,
task,
}
socket.on('status', (data) => {
console.log('got status', data.key, data.value)
store.dispatch({ type: types.socket.status, ...data })
switch (data.key) {
case 'processing':
store.dispatch({
type: 'SET_PARAM',
...data,
})
break
default:
break
}
})
|