mirror of
https://github.com/MisskeyIO/misskey
synced 2025-01-06 01:43:07 +09:00
19 lines
302 B
Plaintext
19 lines
302 B
Plaintext
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
|
|
|
|
me: me
|