mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 14:14:59 +08:00
Release 0.1.0-beta.3
This commit is contained in:
parent
5c1b7aa288
commit
ed8681e901
41
extensions/akismet/js/admin/dist/extension.js
vendored
41
extensions/akismet/js/admin/dist/extension.js
vendored
|
@ -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());
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user