This commit is contained in:
syuilo 2017-02-18 17:58:37 +09:00
parent a83c19d1a5
commit 201f48d7e4
3 changed files with 43 additions and 39 deletions

View file

@ -0,0 +1,42 @@
const riot = require('riot');
module.exports = me => {
if (me) require('./scripts/stream')(me);
require('./scripts/user-preview');
require('./scripts/open-window');
riot.mixin('notify', {
notify: require('./scripts/notify')
});
const dialog = require('./scripts/dialog');
riot.mixin('dialog', {
dialog: dialog
});
riot.mixin('NotImplementedException', {
NotImplementedException: () => {
return dialog('<i class="fa fa-exclamation-triangle"></i>Not implemented yet', '要求された操作は実装されていません。<br>→<a href="https://github.com/syuilo/misskey" target="_blank">Misskeyの開発に参加する</a>', [{
text: 'OK'
}]);
}
});
riot.mixin('input-dialog', {
inputDialog: require('./scripts/input-dialog')
});
riot.mixin('update-avatar', {
updateAvatar: require('./scripts/update-avatar')
});
riot.mixin('update-banner', {
updateBanner: require('./scripts/update-banner')
});
riot.mixin('autocomplete', {
Autocomplete: require('./scripts/autocomplete')
});
};

View file

@ -1,38 +0,0 @@
riot = require \riot
module.exports = (me) ~>
if me?
(require './scripts/stream') me
require './scripts/user-preview'
require './scripts/open-window'
riot.mixin \notify do
notify: require './scripts/notify'
dialog = require './scripts/dialog'
riot.mixin \dialog do
dialog: dialog
riot.mixin \NotImplementedException do
NotImplementedException: ~>
dialog do
'<i class="fa fa-exclamation-triangle"></i>Not implemented yet'
'要求された操作は実装されていません。<br>→<a href="https://github.com/syuilo/misskey" target="_blank">Misskeyの開発に参加する</a>'
[
text: \OK
]
riot.mixin \input-dialog do
input-dialog: require './scripts/input-dialog'
riot.mixin \update-avatar do
update-avatar: require './scripts/update-avatar'
riot.mixin \update-banner do
update-banner: require './scripts/update-banner'
riot.mixin \autocomplete do
Autocomplete: require './scripts/autocomplete'

View file

@ -6,7 +6,7 @@ require('chart.js');
require('./tags'); require('./tags');
const riot = require('riot'); const riot = require('riot');
const boot = require('../boot'); const boot = require('../boot');
const mixins = require('./mixins.ls'); const mixins = require('./mixins');
const route = require('./router'); const route = require('./router');
const fuckAdBlock = require('./scripts/fuck-ad-block'); const fuckAdBlock = require('./scripts/fuck-ad-block');