blob: c0fed616254a7c8a6703634986cc7f77eb034642 (
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
|
import { store } from '../store'
import types from '../types'
import { socket } from './socket.connection'
import * as system from './socket.system'
import * as live from './socket.live'
export default {
socket,
system,
live,
}
socket.on('status', (data) => {
console.log('got status', data.key, data.value)
store.dispatch({ type: types.socket.status })
switch (data.key) {
case 'processing':
store.dispatch({
type: 'SET_PARAM',
...data,
})
break
default:
break
}
})
|