mirror of
https://github.com/status-im/burnchart.git
synced 2025-02-18 21:36:35 +00:00
system model
This commit is contained in:
parent
8bfdc407a1
commit
b36f9dfeef
17
src/models/system.coffee
Normal file
17
src/models/system.coffee
Normal file
@ -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…
x
Reference in New Issue
Block a user