mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 20:37:40 +08:00
Upgrade to flarum-gulp 0.2.0 / Babel 6
This commit is contained in:
parent
4352b025d5
commit
2dcab6f4e4
@ -1,14 +1,14 @@
|
|||||||
System.register('flarum/suspend/main', ['flarum/extend', 'flarum/app', 'flarum/components/PermissionGrid'], function (_export) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
System.register('flarum/suspend/main', ['flarum/extend', 'flarum/app', 'flarum/components/PermissionGrid'], function (_export, _context) {
|
||||||
var extend, app, PermissionGrid;
|
var extend, app, PermissionGrid;
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumExtend) {
|
setters: [function (_flarumExtend) {
|
||||||
extend = _flarumExtend.extend;
|
extend = _flarumExtend.extend;
|
||||||
}, function (_flarumApp) {
|
}, function (_flarumApp) {
|
||||||
app = _flarumApp['default'];
|
app = _flarumApp.default;
|
||||||
}, function (_flarumComponentsPermissionGrid) {
|
}, function (_flarumComponentsPermissionGrid) {
|
||||||
PermissionGrid = _flarumComponentsPermissionGrid['default'];
|
PermissionGrid = _flarumComponentsPermissionGrid.default;
|
||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.8.11",
|
"gulp": "^3.9.1",
|
||||||
"flarum-gulp": "^0.1.0"
|
"flarum-gulp": "^0.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
40
extensions/suspend/js/forum/dist/extension.js
vendored
40
extensions/suspend/js/forum/dist/extension.js
vendored
@ -1,20 +1,20 @@
|
|||||||
System.register('flarum/suspend/components/SuspendUserModal', ['flarum/components/Modal', 'flarum/components/Button'], function (_export) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
System.register('flarum/suspend/components/SuspendUserModal', ['flarum/components/Modal', 'flarum/components/Button'], function (_export, _context) {
|
||||||
var Modal, Button, SuspendUserModal;
|
var Modal, Button, SuspendUserModal;
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsModal) {
|
setters: [function (_flarumComponentsModal) {
|
||||||
Modal = _flarumComponentsModal['default'];
|
Modal = _flarumComponentsModal.default;
|
||||||
}, function (_flarumComponentsButton) {
|
}, function (_flarumComponentsButton) {
|
||||||
Button = _flarumComponentsButton['default'];
|
Button = _flarumComponentsButton.default;
|
||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
SuspendUserModal = (function (_Modal) {
|
SuspendUserModal = function (_Modal) {
|
||||||
babelHelpers.inherits(SuspendUserModal, _Modal);
|
babelHelpers.inherits(SuspendUserModal, _Modal);
|
||||||
|
|
||||||
function SuspendUserModal() {
|
function SuspendUserModal() {
|
||||||
babelHelpers.classCallCheck(this, SuspendUserModal);
|
babelHelpers.classCallCheck(this, SuspendUserModal);
|
||||||
babelHelpers.get(Object.getPrototypeOf(SuspendUserModal.prototype), 'constructor', this).apply(this, arguments);
|
return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SuspendUserModal).apply(this, arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
babelHelpers.createClass(SuspendUserModal, [{
|
babelHelpers.createClass(SuspendUserModal, [{
|
||||||
@ -47,7 +47,7 @@ System.register('flarum/suspend/components/SuspendUserModal', ['flarum/component
|
|||||||
}, {
|
}, {
|
||||||
key: 'content',
|
key: 'content',
|
||||||
value: function content() {
|
value: function content() {
|
||||||
var _this = this;
|
var _this2 = this;
|
||||||
|
|
||||||
return m(
|
return m(
|
||||||
'div',
|
'div',
|
||||||
@ -81,10 +81,10 @@ System.register('flarum/suspend/components/SuspendUserModal', ['flarum/component
|
|||||||
m(
|
m(
|
||||||
'label',
|
'label',
|
||||||
{ className: 'checkbox SuspendUserModal-days' },
|
{ className: 'checkbox SuspendUserModal-days' },
|
||||||
m('input', { type: 'radio', name: 'status', checked: this.status() === 'limited', value: 'limited', onclick: function (e) {
|
m('input', { type: 'radio', name: 'status', checked: this.status() === 'limited', value: 'limited', onclick: function onclick(e) {
|
||||||
_this.status(e.target.value);
|
_this2.status(e.target.value);
|
||||||
m.redraw(true);
|
m.redraw(true);
|
||||||
_this.$('.SuspendUserModal-days-input input').select();
|
_this2.$('.SuspendUserModal-days-input input').select();
|
||||||
m.redraw.strategy('none');
|
m.redraw.strategy('none');
|
||||||
} }),
|
} }),
|
||||||
app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_label'),
|
app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_label'),
|
||||||
@ -116,7 +116,7 @@ System.register('flarum/suspend/components/SuspendUserModal', ['flarum/component
|
|||||||
}, {
|
}, {
|
||||||
key: 'onsubmit',
|
key: 'onsubmit',
|
||||||
value: function onsubmit(e) {
|
value: function onsubmit(e) {
|
||||||
var _this2 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
@ -137,38 +137,38 @@ System.register('flarum/suspend/components/SuspendUserModal', ['flarum/component
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.props.user.save({ suspendUntil: suspendUntil }).then(function () {
|
this.props.user.save({ suspendUntil: suspendUntil }).then(function () {
|
||||||
return _this2.hide();
|
return _this3.hide();
|
||||||
}, this.loaded.bind(this));
|
}, this.loaded.bind(this));
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
return SuspendUserModal;
|
return SuspendUserModal;
|
||||||
})(Modal);
|
}(Modal);
|
||||||
|
|
||||||
_export('default', SuspendUserModal);
|
_export('default', SuspendUserModal);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});;
|
});;
|
||||||
System.register('flarum/suspend/main', ['flarum/extend', 'flarum/app', 'flarum/utils/UserControls', 'flarum/components/Button', 'flarum/components/Badge', 'flarum/Model', 'flarum/models/User', 'flarum/suspend/components/SuspendUserModal'], function (_export) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
System.register('flarum/suspend/main', ['flarum/extend', 'flarum/app', 'flarum/utils/UserControls', 'flarum/components/Button', 'flarum/components/Badge', 'flarum/Model', 'flarum/models/User', 'flarum/suspend/components/SuspendUserModal'], function (_export, _context) {
|
||||||
var extend, app, UserControls, Button, Badge, Model, User, SuspendUserModal;
|
var extend, app, UserControls, Button, Badge, Model, User, SuspendUserModal;
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumExtend) {
|
setters: [function (_flarumExtend) {
|
||||||
extend = _flarumExtend.extend;
|
extend = _flarumExtend.extend;
|
||||||
}, function (_flarumApp) {
|
}, function (_flarumApp) {
|
||||||
app = _flarumApp['default'];
|
app = _flarumApp.default;
|
||||||
}, function (_flarumUtilsUserControls) {
|
}, function (_flarumUtilsUserControls) {
|
||||||
UserControls = _flarumUtilsUserControls['default'];
|
UserControls = _flarumUtilsUserControls.default;
|
||||||
}, function (_flarumComponentsButton) {
|
}, function (_flarumComponentsButton) {
|
||||||
Button = _flarumComponentsButton['default'];
|
Button = _flarumComponentsButton.default;
|
||||||
}, function (_flarumComponentsBadge) {
|
}, function (_flarumComponentsBadge) {
|
||||||
Badge = _flarumComponentsBadge['default'];
|
Badge = _flarumComponentsBadge.default;
|
||||||
}, function (_flarumModel) {
|
}, function (_flarumModel) {
|
||||||
Model = _flarumModel['default'];
|
Model = _flarumModel.default;
|
||||||
}, function (_flarumModelsUser) {
|
}, function (_flarumModelsUser) {
|
||||||
User = _flarumModelsUser['default'];
|
User = _flarumModelsUser.default;
|
||||||
}, function (_flarumSuspendComponentsSuspendUserModal) {
|
}, function (_flarumSuspendComponentsSuspendUserModal) {
|
||||||
SuspendUserModal = _flarumSuspendComponentsSuspendUserModal['default'];
|
SuspendUserModal = _flarumSuspendComponentsSuspendUserModal.default;
|
||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.8.11",
|
"gulp": "^3.9.1",
|
||||||
"flarum-gulp": "^0.1.0"
|
"flarum-gulp": "^0.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user