system model
This commit is contained in:
parent
8bfdc407a1
commit
b36f9dfeef
|
@ -0,0 +1,17 @@
|
||||||
|
mediator = require '../modules/mediator'
|
||||||
|
Model = require '../utils/model'
|
||||||
|
|
||||||
|
# System state.
|
||||||
|
system = new Model
|
||||||
|
'data':
|
||||||
|
'loading': no
|
||||||
|
|
||||||
|
counter = 0
|
||||||
|
async = ->
|
||||||
|
counter += 1
|
||||||
|
system.set 'loading', yes
|
||||||
|
->
|
||||||
|
counter -= 1
|
||||||
|
system.set 'loading', +counter
|
||||||
|
|
||||||
|
module.exports = { system, async }
|
Loading…
Reference in New Issue