mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 09:13:52 +09:00
✌️
This commit is contained in:
20
src/web/app/common/scripts/i.js
Normal file
20
src/web/app/common/scripts/i.js
Normal file
@ -0,0 +1,20 @@
|
||||
const riot = require('riot');
|
||||
|
||||
module.exports = me => {
|
||||
riot.mixin('i', {
|
||||
init: () => {
|
||||
this.I = me;
|
||||
this.SIGNIN = me != null;
|
||||
|
||||
if (this.SIGNIN) {
|
||||
this.on('mount', () => {
|
||||
me.on('updated', this.update);
|
||||
});
|
||||
this.on('unmount', () => {
|
||||
me.off('updated', this.update);
|
||||
});
|
||||
}
|
||||
},
|
||||
me: me
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user