Initial commit 🍀
This commit is contained in:
commit
b3f42e62af
405 changed files with 31017 additions and 0 deletions
16
src/web/app/common/scripts/i.ls
Normal file
16
src/web/app/common/scripts/i.ls
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
riot = require \riot
|
||||
|
||||
module.exports = (me) ->
|
||||
riot.mixin \i do
|
||||
init: ->
|
||||
@I = me
|
||||
@SIGNIN = me?
|
||||
|
||||
if @SIGNIN
|
||||
@on \mount ~> me.on \updated @update
|
||||
@on \unmount ~> me.off \updated @update
|
||||
|
||||
update-i: (data) ->
|
||||
if data?
|
||||
Object.assign me, data
|
||||
me.trigger \updated
|
||||
Loading…
Add table
Add a link
Reference in a new issue