mirror of
https://github.com/flarum/framework.git
synced 2025-05-02 09:34:03 +08:00
Update metadata, fix admin settings link
This commit is contained in:
parent
5bae959353
commit
1d5a118951
@ -2,6 +2,7 @@
|
|||||||
"name": "flarum/tags",
|
"name": "flarum/tags",
|
||||||
"description": "Organize discussions into a hierarchy of tags and categories.",
|
"description": "Organize discussions into a hierarchy of tags and categories.",
|
||||||
"type": "flarum-extension",
|
"type": "flarum-extension",
|
||||||
|
"keywords": ["discussion"],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
73
extensions/tags/js/admin/dist/extension.js
vendored
73
extensions/tags/js/admin/dist/extension.js
vendored
@ -525,13 +525,6 @@ return sortable;
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Model, mixin, computed, Tag;
|
var Model, mixin, computed, Tag;
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumModel) {
|
setters: [function (_flarumModel) {
|
||||||
Model = _flarumModel['default'];
|
Model = _flarumModel['default'];
|
||||||
@ -542,12 +535,11 @@ return sortable;
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
Tag = (function (_mixin) {
|
Tag = (function (_mixin) {
|
||||||
_inherits(Tag, _mixin);
|
babelHelpers.inherits(Tag, _mixin);
|
||||||
|
|
||||||
function Tag() {
|
function Tag() {
|
||||||
_classCallCheck(this, Tag);
|
babelHelpers.classCallCheck(this, Tag);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(Tag.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(Tag.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Tag;
|
return Tag;
|
||||||
@ -677,7 +669,7 @@ return sortable;
|
|||||||
_export('default', function () {
|
_export('default', function () {
|
||||||
app.routes.tags = { path: '/tags', component: TagsPage.component() };
|
app.routes.tags = { path: '/tags', component: TagsPage.component() };
|
||||||
|
|
||||||
app.extensionSettings.tags = function () {
|
app.extensionSettings['flarum-tags'] = function () {
|
||||||
return m.route(app.route('tags'));
|
return m.route(app.route('tags'));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -796,7 +788,7 @@ return sortable;
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
|
|
||||||
app.initializers.add('tags', function (app) {
|
app.initializers.add('flarum-tags', function (app) {
|
||||||
app.store.models.tags = Tag;
|
app.store.models.tags = Tag;
|
||||||
|
|
||||||
addTagsPermissionScope();
|
addTagsPermissionScope();
|
||||||
@ -815,15 +807,6 @@ return sortable;
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Modal, Button, slug, tagLabel, EditTagModal;
|
var Modal, Button, slug, tagLabel, EditTagModal;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsModal) {
|
setters: [function (_flarumComponentsModal) {
|
||||||
Modal = _flarumComponentsModal['default'];
|
Modal = _flarumComponentsModal['default'];
|
||||||
@ -836,16 +819,16 @@ return sortable;
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
EditTagModal = (function (_Modal) {
|
EditTagModal = (function (_Modal) {
|
||||||
_inherits(EditTagModal, _Modal);
|
babelHelpers.inherits(EditTagModal, _Modal);
|
||||||
|
|
||||||
function EditTagModal() {
|
function EditTagModal() {
|
||||||
_classCallCheck(this, EditTagModal);
|
babelHelpers.classCallCheck(this, EditTagModal);
|
||||||
|
|
||||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
args[_key] = arguments[_key];
|
args[_key] = arguments[_key];
|
||||||
}
|
}
|
||||||
|
|
||||||
_get(Object.getPrototypeOf(EditTagModal.prototype), 'constructor', this).apply(this, args);
|
babelHelpers.get(Object.getPrototypeOf(EditTagModal.prototype), 'constructor', this).apply(this, args);
|
||||||
|
|
||||||
this.tag = this.props.tag || app.store.createRecord('tags');
|
this.tag = this.props.tag || app.store.createRecord('tags');
|
||||||
|
|
||||||
@ -856,7 +839,7 @@ return sortable;
|
|||||||
this.isHidden = m.prop(this.tag.isHidden() || false);
|
this.isHidden = m.prop(this.tag.isHidden() || false);
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(EditTagModal, [{
|
babelHelpers.createClass(EditTagModal, [{
|
||||||
key: 'className',
|
key: 'className',
|
||||||
value: function className() {
|
value: function className() {
|
||||||
return 'EditTagModal Modal--small';
|
return 'EditTagModal Modal--small';
|
||||||
@ -988,7 +971,6 @@ return sortable;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return EditTagModal;
|
return EditTagModal;
|
||||||
})(Modal);
|
})(Modal);
|
||||||
|
|
||||||
@ -999,30 +981,20 @@ return sortable;
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var SettingsModal, TagSettingsModal;
|
var SettingsModal, TagSettingsModal;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsSettingsModal) {
|
setters: [function (_flarumComponentsSettingsModal) {
|
||||||
SettingsModal = _flarumComponentsSettingsModal['default'];
|
SettingsModal = _flarumComponentsSettingsModal['default'];
|
||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagSettingsModal = (function (_SettingsModal) {
|
TagSettingsModal = (function (_SettingsModal) {
|
||||||
_inherits(TagSettingsModal, _SettingsModal);
|
babelHelpers.inherits(TagSettingsModal, _SettingsModal);
|
||||||
|
|
||||||
function TagSettingsModal() {
|
function TagSettingsModal() {
|
||||||
_classCallCheck(this, TagSettingsModal);
|
babelHelpers.classCallCheck(this, TagSettingsModal);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(TagSettingsModal.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(TagSettingsModal.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagSettingsModal, [{
|
babelHelpers.createClass(TagSettingsModal, [{
|
||||||
key: 'setMinTags',
|
key: 'setMinTags',
|
||||||
value: function setMinTags(minTags, maxTags, value) {
|
value: function setMinTags(minTags, maxTags, value) {
|
||||||
minTags(value);
|
minTags(value);
|
||||||
@ -1104,7 +1076,6 @@ return sortable;
|
|||||||
)];
|
)];
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagSettingsModal;
|
return TagSettingsModal;
|
||||||
})(SettingsModal);
|
})(SettingsModal);
|
||||||
|
|
||||||
@ -1116,14 +1087,6 @@ return sortable;
|
|||||||
|
|
||||||
var Component, Button, EditTagModal, TagSettingsModal, tagIcon, sortTags, TagsPage;
|
var Component, Button, EditTagModal, TagSettingsModal, tagIcon, sortTags, TagsPage;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
function tagItem(tag) {
|
function tagItem(tag) {
|
||||||
return m(
|
return m(
|
||||||
'li',
|
'li',
|
||||||
@ -1171,15 +1134,14 @@ return sortable;
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagsPage = (function (_Component) {
|
TagsPage = (function (_Component) {
|
||||||
_inherits(TagsPage, _Component);
|
babelHelpers.inherits(TagsPage, _Component);
|
||||||
|
|
||||||
function TagsPage() {
|
function TagsPage() {
|
||||||
_classCallCheck(this, TagsPage);
|
babelHelpers.classCallCheck(this, TagsPage);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(TagsPage.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(TagsPage.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagsPage, [{
|
babelHelpers.createClass(TagsPage, [{
|
||||||
key: 'view',
|
key: 'view',
|
||||||
value: function view() {
|
value: function view() {
|
||||||
return m(
|
return m(
|
||||||
@ -1325,7 +1287,6 @@ return sortable;
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagsPage;
|
return TagsPage;
|
||||||
})(Component);
|
})(Component);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import TagsPage from 'flarum/tags/components/TagsPage';
|
|||||||
export default function() {
|
export default function() {
|
||||||
app.routes.tags = {path: '/tags', component: TagsPage.component()};
|
app.routes.tags = {path: '/tags', component: TagsPage.component()};
|
||||||
|
|
||||||
app.extensionSettings.tags = () => m.route(app.route('tags'));
|
app.extensionSettings['flarum-tags'] = () => m.route(app.route('tags'));
|
||||||
|
|
||||||
extend(AdminNav.prototype, 'items', items => {
|
extend(AdminNav.prototype, 'items', items => {
|
||||||
items.add('tags', AdminLinkButton.component({
|
items.add('tags', AdminLinkButton.component({
|
||||||
|
209
extensions/tags/js/forum/dist/extension.js
vendored
209
extensions/tags/js/forum/dist/extension.js
vendored
@ -1,64 +1,4 @@
|
|||||||
System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin', 'flarum/utils/computed'], function (_export) {
|
System.register('flarum/tags/helpers/tagIcon', [], function (_export) {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var Model, mixin, computed, Tag;
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
|
||||||
setters: [function (_flarumModel) {
|
|
||||||
Model = _flarumModel['default'];
|
|
||||||
}, function (_flarumUtilsMixin) {
|
|
||||||
mixin = _flarumUtilsMixin['default'];
|
|
||||||
}, function (_flarumUtilsComputed) {
|
|
||||||
computed = _flarumUtilsComputed['default'];
|
|
||||||
}],
|
|
||||||
execute: function () {
|
|
||||||
Tag = (function (_mixin) {
|
|
||||||
_inherits(Tag, _mixin);
|
|
||||||
|
|
||||||
function Tag() {
|
|
||||||
_classCallCheck(this, Tag);
|
|
||||||
|
|
||||||
_get(Object.getPrototypeOf(Tag.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Tag;
|
|
||||||
})(mixin(Model, {
|
|
||||||
name: Model.attribute('name'),
|
|
||||||
slug: Model.attribute('slug'),
|
|
||||||
description: Model.attribute('description'),
|
|
||||||
|
|
||||||
color: Model.attribute('color'),
|
|
||||||
backgroundUrl: Model.attribute('backgroundUrl'),
|
|
||||||
backgroundMode: Model.attribute('backgroundMode'),
|
|
||||||
|
|
||||||
position: Model.attribute('position'),
|
|
||||||
parent: Model.hasOne('parent'),
|
|
||||||
defaultSort: Model.attribute('defaultSort'),
|
|
||||||
isChild: Model.attribute('isChild'),
|
|
||||||
isHidden: Model.attribute('isHidden'),
|
|
||||||
|
|
||||||
discussionsCount: Model.attribute('discussionsCount'),
|
|
||||||
lastTime: Model.attribute('lastTime', Model.transformDate),
|
|
||||||
lastDiscussion: Model.hasOne('lastDiscussion'),
|
|
||||||
|
|
||||||
isRestricted: Model.attribute('isRestricted'),
|
|
||||||
canStartDiscussion: Model.attribute('canStartDiscussion'),
|
|
||||||
|
|
||||||
isPrimary: computed('position', 'parent', function (position, parent) {
|
|
||||||
return position !== null && parent === false;
|
|
||||||
})
|
|
||||||
}));
|
|
||||||
|
|
||||||
_export('default', Tag);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});;System.register('flarum/tags/helpers/tagIcon', [], function (_export) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
_export('default', tagIcon);
|
_export('default', tagIcon);
|
||||||
@ -168,6 +108,58 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {}
|
execute: function () {}
|
||||||
};
|
};
|
||||||
|
});;System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin', 'flarum/utils/computed'], function (_export) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var Model, mixin, computed, Tag;
|
||||||
|
return {
|
||||||
|
setters: [function (_flarumModel) {
|
||||||
|
Model = _flarumModel['default'];
|
||||||
|
}, function (_flarumUtilsMixin) {
|
||||||
|
mixin = _flarumUtilsMixin['default'];
|
||||||
|
}, function (_flarumUtilsComputed) {
|
||||||
|
computed = _flarumUtilsComputed['default'];
|
||||||
|
}],
|
||||||
|
execute: function () {
|
||||||
|
Tag = (function (_mixin) {
|
||||||
|
babelHelpers.inherits(Tag, _mixin);
|
||||||
|
|
||||||
|
function Tag() {
|
||||||
|
babelHelpers.classCallCheck(this, Tag);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(Tag.prototype), 'constructor', this).apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Tag;
|
||||||
|
})(mixin(Model, {
|
||||||
|
name: Model.attribute('name'),
|
||||||
|
slug: Model.attribute('slug'),
|
||||||
|
description: Model.attribute('description'),
|
||||||
|
|
||||||
|
color: Model.attribute('color'),
|
||||||
|
backgroundUrl: Model.attribute('backgroundUrl'),
|
||||||
|
backgroundMode: Model.attribute('backgroundMode'),
|
||||||
|
|
||||||
|
position: Model.attribute('position'),
|
||||||
|
parent: Model.hasOne('parent'),
|
||||||
|
defaultSort: Model.attribute('defaultSort'),
|
||||||
|
isChild: Model.attribute('isChild'),
|
||||||
|
isHidden: Model.attribute('isHidden'),
|
||||||
|
|
||||||
|
discussionsCount: Model.attribute('discussionsCount'),
|
||||||
|
lastTime: Model.attribute('lastTime', Model.transformDate),
|
||||||
|
lastDiscussion: Model.hasOne('lastDiscussion'),
|
||||||
|
|
||||||
|
isRestricted: Model.attribute('isRestricted'),
|
||||||
|
canStartDiscussion: Model.attribute('canStartDiscussion'),
|
||||||
|
|
||||||
|
isPrimary: computed('position', 'parent', function (position, parent) {
|
||||||
|
return position !== null && parent === false;
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
_export('default', Tag);
|
||||||
|
}
|
||||||
|
};
|
||||||
});;System.register("flarum/tags/utils/sortTags", [], function (_export) {
|
});;System.register("flarum/tags/utils/sortTags", [], function (_export) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
@ -538,7 +530,7 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
|
|
||||||
app.initializers.add('tags', function (app) {
|
app.initializers.add('flarum-tags', function (app) {
|
||||||
app.routes.tags = { path: '/tags', component: TagsPage.component() };
|
app.routes.tags = { path: '/tags', component: TagsPage.component() };
|
||||||
app.routes.tag = { path: '/t/:tags', component: IndexPage.component() };
|
app.routes.tag = { path: '/t/:tags', component: IndexPage.component() };
|
||||||
|
|
||||||
@ -565,15 +557,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var EventPost, punctuateSeries, tagsLabel, DiscussionTaggedPost;
|
var EventPost, punctuateSeries, tagsLabel, DiscussionTaggedPost;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsEventPost) {
|
setters: [function (_flarumComponentsEventPost) {
|
||||||
EventPost = _flarumComponentsEventPost['default'];
|
EventPost = _flarumComponentsEventPost['default'];
|
||||||
@ -584,15 +567,14 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
DiscussionTaggedPost = (function (_EventPost) {
|
DiscussionTaggedPost = (function (_EventPost) {
|
||||||
_inherits(DiscussionTaggedPost, _EventPost);
|
babelHelpers.inherits(DiscussionTaggedPost, _EventPost);
|
||||||
|
|
||||||
function DiscussionTaggedPost() {
|
function DiscussionTaggedPost() {
|
||||||
_classCallCheck(this, DiscussionTaggedPost);
|
babelHelpers.classCallCheck(this, DiscussionTaggedPost);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(DiscussionTaggedPost.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(DiscussionTaggedPost.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(DiscussionTaggedPost, [{
|
babelHelpers.createClass(DiscussionTaggedPost, [{
|
||||||
key: 'icon',
|
key: 'icon',
|
||||||
value: function icon() {
|
value: function icon() {
|
||||||
return 'tag';
|
return 'tag';
|
||||||
@ -641,7 +623,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return DiscussionTaggedPost;
|
return DiscussionTaggedPost;
|
||||||
})(EventPost);
|
})(EventPost);
|
||||||
|
|
||||||
@ -652,15 +633,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Modal, DiscussionPage, Button, highlight, classList, extractText, tagLabel, tagIcon, sortTags, TagDiscussionModal;
|
var Modal, DiscussionPage, Button, highlight, classList, extractText, tagLabel, tagIcon, sortTags, TagDiscussionModal;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsModal) {
|
setters: [function (_flarumComponentsModal) {
|
||||||
Modal = _flarumComponentsModal['default'];
|
Modal = _flarumComponentsModal['default'];
|
||||||
@ -683,16 +655,16 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagDiscussionModal = (function (_Modal) {
|
TagDiscussionModal = (function (_Modal) {
|
||||||
_inherits(TagDiscussionModal, _Modal);
|
babelHelpers.inherits(TagDiscussionModal, _Modal);
|
||||||
|
|
||||||
function TagDiscussionModal() {
|
function TagDiscussionModal() {
|
||||||
_classCallCheck(this, TagDiscussionModal);
|
babelHelpers.classCallCheck(this, TagDiscussionModal);
|
||||||
|
|
||||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
args[_key] = arguments[_key];
|
args[_key] = arguments[_key];
|
||||||
}
|
}
|
||||||
|
|
||||||
_get(Object.getPrototypeOf(TagDiscussionModal.prototype), 'constructor', this).apply(this, args);
|
babelHelpers.get(Object.getPrototypeOf(TagDiscussionModal.prototype), 'constructor', this).apply(this, args);
|
||||||
|
|
||||||
this.tags = sortTags(app.store.all('tags').filter(function (tag) {
|
this.tags = sortTags(app.store.all('tags').filter(function (tag) {
|
||||||
return tag.canStartDiscussion();
|
return tag.canStartDiscussion();
|
||||||
@ -715,7 +687,7 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
this.maxSecondary = app.forum.attribute('maxSecondaryTags');
|
this.maxSecondary = app.forum.attribute('maxSecondaryTags');
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagDiscussionModal, [{
|
babelHelpers.createClass(TagDiscussionModal, [{
|
||||||
key: 'primaryCount',
|
key: 'primaryCount',
|
||||||
value: function primaryCount() {
|
value: function primaryCount() {
|
||||||
return this.selected.filter(function (tag) {
|
return this.selected.filter(function (tag) {
|
||||||
@ -1059,7 +1031,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
m.redraw.strategy('none');
|
m.redraw.strategy('none');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagDiscussionModal;
|
return TagDiscussionModal;
|
||||||
})(Modal);
|
})(Modal);
|
||||||
|
|
||||||
@ -1070,30 +1041,20 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Component, TagHero;
|
var Component, TagHero;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponent) {
|
setters: [function (_flarumComponent) {
|
||||||
Component = _flarumComponent['default'];
|
Component = _flarumComponent['default'];
|
||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagHero = (function (_Component) {
|
TagHero = (function (_Component) {
|
||||||
_inherits(TagHero, _Component);
|
babelHelpers.inherits(TagHero, _Component);
|
||||||
|
|
||||||
function TagHero() {
|
function TagHero() {
|
||||||
_classCallCheck(this, TagHero);
|
babelHelpers.classCallCheck(this, TagHero);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(TagHero.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(TagHero.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagHero, [{
|
babelHelpers.createClass(TagHero, [{
|
||||||
key: 'view',
|
key: 'view',
|
||||||
value: function view() {
|
value: function view() {
|
||||||
var tag = this.props.tag;
|
var tag = this.props.tag;
|
||||||
@ -1124,7 +1085,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagHero;
|
return TagHero;
|
||||||
})(Component);
|
})(Component);
|
||||||
|
|
||||||
@ -1135,15 +1095,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var LinkButton, tagIcon, TagLinkButton;
|
var LinkButton, tagIcon, TagLinkButton;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponentsLinkButton) {
|
setters: [function (_flarumComponentsLinkButton) {
|
||||||
LinkButton = _flarumComponentsLinkButton['default'];
|
LinkButton = _flarumComponentsLinkButton['default'];
|
||||||
@ -1152,15 +1103,14 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagLinkButton = (function (_LinkButton) {
|
TagLinkButton = (function (_LinkButton) {
|
||||||
_inherits(TagLinkButton, _LinkButton);
|
babelHelpers.inherits(TagLinkButton, _LinkButton);
|
||||||
|
|
||||||
function TagLinkButton() {
|
function TagLinkButton() {
|
||||||
_classCallCheck(this, TagLinkButton);
|
babelHelpers.classCallCheck(this, TagLinkButton);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(TagLinkButton.prototype), 'constructor', this).apply(this, arguments);
|
||||||
_get(Object.getPrototypeOf(TagLinkButton.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagLinkButton, [{
|
babelHelpers.createClass(TagLinkButton, [{
|
||||||
key: 'view',
|
key: 'view',
|
||||||
value: function view() {
|
value: function view() {
|
||||||
var tag = this.props.tag;
|
var tag = this.props.tag;
|
||||||
@ -1186,7 +1136,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
props.children = tag ? tag.name() : app.trans('tags.untagged');
|
props.children = tag ? tag.name() : app.trans('tags.untagged');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagLinkButton;
|
return TagLinkButton;
|
||||||
})(LinkButton);
|
})(LinkButton);
|
||||||
|
|
||||||
@ -1197,15 +1146,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Component, IndexPage, listItems, humanTime, tagLabel, sortTags, TagsPage;
|
var Component, IndexPage, listItems, humanTime, tagLabel, sortTags, TagsPage;
|
||||||
|
|
||||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
||||||
|
|
||||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
|
||||||
|
|
||||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumComponent) {
|
setters: [function (_flarumComponent) {
|
||||||
Component = _flarumComponent['default'];
|
Component = _flarumComponent['default'];
|
||||||
@ -1222,16 +1162,16 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
}],
|
}],
|
||||||
execute: function () {
|
execute: function () {
|
||||||
TagsPage = (function (_Component) {
|
TagsPage = (function (_Component) {
|
||||||
_inherits(TagsPage, _Component);
|
babelHelpers.inherits(TagsPage, _Component);
|
||||||
|
|
||||||
function TagsPage() {
|
function TagsPage() {
|
||||||
_classCallCheck(this, TagsPage);
|
babelHelpers.classCallCheck(this, TagsPage);
|
||||||
|
|
||||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
args[_key] = arguments[_key];
|
args[_key] = arguments[_key];
|
||||||
}
|
}
|
||||||
|
|
||||||
_get(Object.getPrototypeOf(TagsPage.prototype), 'constructor', this).apply(this, args);
|
babelHelpers.get(Object.getPrototypeOf(TagsPage.prototype), 'constructor', this).apply(this, args);
|
||||||
|
|
||||||
this.tags = sortTags(app.store.all('tags').filter(function (tag) {
|
this.tags = sortTags(app.store.all('tags').filter(function (tag) {
|
||||||
return !tag.parent();
|
return !tag.parent();
|
||||||
@ -1243,7 +1183,7 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
app.modal.close();
|
app.modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(TagsPage, [{
|
babelHelpers.createClass(TagsPage, [{
|
||||||
key: 'view',
|
key: 'view',
|
||||||
value: function view() {
|
value: function view() {
|
||||||
var pinned = this.tags.filter(function (tag) {
|
var pinned = this.tags.filter(function (tag) {
|
||||||
@ -1345,7 +1285,6 @@ System.register('flarum/tags/models/Tag', ['flarum/Model', 'flarum/utils/mixin',
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return TagsPage;
|
return TagsPage;
|
||||||
})(Component);
|
})(Component);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user