1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 05:00:56 +02:00

Recompile dist JS

This commit is contained in:
Franz Liedke
2017-03-06 22:01:14 +01:00
parent 04b32d9abc
commit 425a612537

View File

@@ -197,7 +197,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
dropdown.active = false; dropdown.active = false;
if (mentionStart) { if (mentionStart) {
(function () {
typed = value.substring(mentionStart, cursor).toLowerCase(); typed = value.substring(mentionStart, cursor).toLowerCase();
var makeSuggestion = function makeSuggestion(user, replacement, content) { var makeSuggestion = function makeSuggestion(user, replacement, content) {
@@ -232,6 +231,16 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
var buildSuggestions = function buildSuggestions() { var buildSuggestions = function buildSuggestions() {
var suggestions = []; var suggestions = [];
// If the user has started to type a username, then suggest users
// matching that username.
if (typed) {
app.store.all('users').forEach(function (user) {
if (user.username().toLowerCase().substr(0, typed.length) !== typed) return;
suggestions.push(makeSuggestion(user, '@' + user.username(), '', 'MentionsDropdown-user'));
});
}
// If the user is replying to a discussion, or if they are editing a // If the user is replying to a discussion, or if they are editing a
// post, then we can suggest other posts in the discussion to mention. // post, then we can suggest other posts in the discussion to mention.
// We will add the 5 most recent comments in the discussion which // We will add the 5 most recent comments in the discussion which
@@ -252,16 +261,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
}); });
} }
// If the user has started to type a username, then suggest users
// matching that username.
if (typed) {
app.store.all('users').forEach(function (user) {
if (user.username().toLowerCase().substr(0, typed.length) !== typed) return;
suggestions.push(makeSuggestion(user, '@' + user.username(), '', 'MentionsDropdown-user'));
});
}
if (suggestions.length) { if (suggestions.length) {
dropdown.props.items = suggestions; dropdown.props.items = suggestions;
m.render($container[0], dropdown.render()); m.render($container[0], dropdown.render());
@@ -301,7 +300,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
} }
}, 250); }, 250);
} }
})();
} }
}); });
}); });
@@ -346,13 +344,10 @@ System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/
var replies = post.mentionedBy(); var replies = post.mentionedBy();
if (replies && replies.length) { if (replies && replies.length) {
var _ret = function () {
// If there is only one reply, and it's adjacent to this post, we don't // If there is only one reply, and it's adjacent to this post, we don't
// really need to show the list. // really need to show the list.
if (replies.length === 1 && replies[0].number() === post.number() + 1) { if (replies.length === 1 && replies[0].number() === post.number() + 1) {
return { return;
v: void 0
};
} }
var hidePreview = function hidePreview() { var hidePreview = function hidePreview() {
@@ -459,9 +454,6 @@ System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/
}) })
) )
)); ));
}();
if ((typeof _ret === 'undefined' ? 'undefined' : babelHelpers.typeof(_ret)) === "object") return _ret.v;
} }
}); });
} }
@@ -542,7 +534,6 @@ System.register('flarum/mentions/addPostMentionPreviews', ['flarum/extend', 'fla
// Otherwise, we will show a popup preview of the post. If the post // Otherwise, we will show a popup preview of the post. If the post
// hasn't yet been loaded, we will need to do that. // hasn't yet been loaded, we will need to do that.
if (!visible) { if (!visible) {
(function () {
// Position the preview so that it appears above the mention. // Position the preview so that it appears above the mention.
// (The offsetParent should be .Post-body.) // (The offsetParent should be .Post-body.)
var positionPreview = function positionPreview() { var positionPreview = function positionPreview() {
@@ -591,7 +582,6 @@ System.register('flarum/mentions/addPostMentionPreviews', ['flarum/extend', 'fla
setTimeout(function () { setTimeout(function () {
return $preview.off('transitionend').addClass('in'); return $preview.off('transitionend').addClass('in');
}); });
})();
} }
}; };