mirror of
https://github.com/flarum/core.git
synced 2025-07-29 20:50:28 +02:00
Recompile dist JS
This commit is contained in:
32
extensions/mentions/js/forum/dist/extension.js
vendored
32
extensions/mentions/js/forum/dist/extension.js
vendored
@@ -197,7 +197,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
|
||||
dropdown.active = false;
|
||||
|
||||
if (mentionStart) {
|
||||
(function () {
|
||||
typed = value.substring(mentionStart, cursor).toLowerCase();
|
||||
|
||||
var makeSuggestion = function makeSuggestion(user, replacement, content) {
|
||||
@@ -232,6 +231,16 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
|
||||
var buildSuggestions = function buildSuggestions() {
|
||||
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
|
||||
// post, then we can suggest other posts in the discussion to mention.
|
||||
// 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) {
|
||||
dropdown.props.items = suggestions;
|
||||
m.render($container[0], dropdown.render());
|
||||
@@ -301,7 +300,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
|
||||
}
|
||||
}, 250);
|
||||
}
|
||||
})();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -346,13 +344,10 @@ System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/
|
||||
var replies = post.mentionedBy();
|
||||
|
||||
if (replies && replies.length) {
|
||||
var _ret = function () {
|
||||
// If there is only one reply, and it's adjacent to this post, we don't
|
||||
// really need to show the list.
|
||||
if (replies.length === 1 && replies[0].number() === post.number() + 1) {
|
||||
return {
|
||||
v: void 0
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
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
|
||||
// hasn't yet been loaded, we will need to do that.
|
||||
if (!visible) {
|
||||
(function () {
|
||||
// Position the preview so that it appears above the mention.
|
||||
// (The offsetParent should be .Post-body.)
|
||||
var positionPreview = function positionPreview() {
|
||||
@@ -591,7 +582,6 @@ System.register('flarum/mentions/addPostMentionPreviews', ['flarum/extend', 'fla
|
||||
setTimeout(function () {
|
||||
return $preview.off('transitionend').addClass('in');
|
||||
});
|
||||
})();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user