Release 0.1.0-beta.3

This commit is contained in:
Toby Zerner 2015-11-03 10:02:16 +10:30
parent 5c1b7aa288
commit ed8681e901
2 changed files with 23 additions and 24 deletions

View File

@ -1,23 +1,4 @@
System.register('flarum/akismet/main', ['flarum/app', 'flarum/akismet/components/AkismetSettingsModal'], function (_export) {
'use strict';
var app, AkismetSettingsModal;
return {
setters: [function (_flarumApp) {
app = _flarumApp['default'];
}, function (_flarumAkismetComponentsAkismetSettingsModal) {
AkismetSettingsModal = _flarumAkismetComponentsAkismetSettingsModal['default'];
}],
execute: function () {
app.initializers.add('flarum-akismet', function () {
app.extensionSettings['flarum-akismet'] = function () {
return app.modal.show(new AkismetSettingsModal());
};
});
}
};
});;System.register('flarum/akismet/components/AkismetSettingsModal', ['flarum/components/SettingsModal'], function (_export) {
System.register('flarum/akismet/components/AkismetSettingsModal', ['flarum/components/SettingsModal'], function (_export) {
'use strict';
var SettingsModal, AkismetSettingsModal;
@ -65,4 +46,24 @@ System.register('flarum/akismet/main', ['flarum/app', 'flarum/akismet/components
_export('default', AkismetSettingsModal);
}
};
});;
System.register('flarum/akismet/main', ['flarum/app', 'flarum/akismet/components/AkismetSettingsModal'], function (_export) {
'use strict';
var app, AkismetSettingsModal;
return {
setters: [function (_flarumApp) {
app = _flarumApp['default'];
}, function (_flarumAkismetComponentsAkismetSettingsModal) {
AkismetSettingsModal = _flarumAkismetComponentsAkismetSettingsModal['default'];
}],
execute: function () {
app.initializers.add('flarum-akismet', function () {
app.extensionSettings['flarum-akismet'] = function () {
return app.modal.show(new AkismetSettingsModal());
};
});
}
};
});

View File

@ -17,15 +17,13 @@ System.register('flarum/akismet/main', ['flarum/extend', 'flarum/app', 'flarum/u
app.initializers.add('flarum-akismet', function () {
extend(PostControls, 'destructiveControls', function (items, post) {
if (items.approve) {
if (items.has('approve')) {
var flags = post.flags();
if (flags && flags.some(function (flag) {
return flag.type() === 'akismet';
})) {
babelHelpers._extends(items.approve.content.props, {
children: 'Not Spam'
});
items.get('approve').props.children = 'Not Spam';
}
}
});