mirror of
https://github.com/flarum/core.git
synced 2025-07-30 05:00:56 +02:00
Recompile JS
This commit is contained in:
106
extensions/mentions/js/forum/dist/extension.js
vendored
106
extensions/mentions/js/forum/dist/extension.js
vendored
@@ -650,10 +650,10 @@ System.register('flarum/mentions/addPostReplyAction', ['flarum/extend', 'flarum/
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cursorPosition = component.editor.getSelectionRange()[0];
|
var cursorPosition = component.editor.getSelectionRange()[0];
|
||||||
var precedingContent = component.editor.value().slice(0, cursorPosition);
|
var preceding = component.editor.value().slice(0, cursorPosition);
|
||||||
var trailingNewlines = precedingContent.match(/(\n{0,2})$/)[0].length;
|
var precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\n{0,2})$/)[0].length;
|
||||||
|
|
||||||
component.editor.insertAtCursor(Array(3 - trailingNewlines).join('\n') + ( // Insert up to two newlines, depending on preceding whitespace
|
component.editor.insertAtCursor(Array(precedingNewlines).join('\n') + ( // Insert up to two newlines, depending on preceding whitespace
|
||||||
quote ? '> ' + mention + quote.trim().replace(/\n/g, '\n> ') + '\n\n' : mention));
|
quote ? '> ' + mention + quote.trim().replace(/\n/g, '\n> ') + '\n\n' : mention));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -814,6 +814,55 @@ System.register('flarum/mentions/components/AutocompleteDropdown', ['flarum/Comp
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});;
|
});;
|
||||||
|
System.register('flarum/mentions/components/MentionsUserPage', ['flarum/components/PostsUserPage'], function (_export) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `MentionsUserPage` component shows post which user Mentioned at
|
||||||
|
*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var PostsUserPage, MentionsUserPage;
|
||||||
|
return {
|
||||||
|
setters: [function (_flarumComponentsPostsUserPage) {
|
||||||
|
PostsUserPage = _flarumComponentsPostsUserPage['default'];
|
||||||
|
}],
|
||||||
|
execute: function () {
|
||||||
|
MentionsUserPage = (function (_PostsUserPage) {
|
||||||
|
babelHelpers.inherits(MentionsUserPage, _PostsUserPage);
|
||||||
|
|
||||||
|
function MentionsUserPage() {
|
||||||
|
babelHelpers.classCallCheck(this, MentionsUserPage);
|
||||||
|
babelHelpers.get(Object.getPrototypeOf(MentionsUserPage.prototype), 'constructor', this).apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
babelHelpers.createClass(MentionsUserPage, [{
|
||||||
|
key: 'loadResults',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a new page of the user's activity feed.
|
||||||
|
*
|
||||||
|
* @param {Integer} [offset] The position to start getting results from.
|
||||||
|
* @return {Promise}
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
value: function loadResults(offset) {
|
||||||
|
return app.store.find('posts', {
|
||||||
|
filter: {
|
||||||
|
type: 'comment',
|
||||||
|
mentioned: this.user.id()
|
||||||
|
},
|
||||||
|
page: { offset: offset, limit: this.loadLimit },
|
||||||
|
sort: '-time'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
return MentionsUserPage;
|
||||||
|
})(PostsUserPage);
|
||||||
|
|
||||||
|
_export('default', MentionsUserPage);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});;
|
||||||
System.register('flarum/mentions/components/PostMentionedNotification', ['flarum/components/Notification', 'flarum/helpers/username', 'flarum/helpers/punctuateSeries'], function (_export) {
|
System.register('flarum/mentions/components/PostMentionedNotification', ['flarum/components/Notification', 'flarum/helpers/username', 'flarum/helpers/punctuateSeries'], function (_export) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -993,7 +1042,7 @@ System.register('flarum/mentions/main', ['flarum/extend', 'flarum/app', 'flarum/
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add add mentions tab in user profile
|
// Add mentions tab in user profile
|
||||||
app.routes['user.mentions'] = { path: '/u/:username/mentions', component: MentionsUserPage.component() };
|
app.routes['user.mentions'] = { path: '/u/:username/mentions', component: MentionsUserPage.component() };
|
||||||
extend(UserPage.prototype, 'navItems', function (items) {
|
extend(UserPage.prototype, 'navItems', function (items) {
|
||||||
var user = this.user;
|
var user = this.user;
|
||||||
@@ -1009,53 +1058,4 @@ System.register('flarum/mentions/main', ['flarum/extend', 'flarum/app', 'flarum/
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});;
|
|
||||||
System.register('flarum/mentions/components/MentionsUserPage', ['flarum/components/PostsUserPage'], function (_export) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `MentionsUserPage` component shows post which user Mentioned at
|
|
||||||
*/
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var PostsUserPage, MentionsUserPage;
|
|
||||||
return {
|
|
||||||
setters: [function (_flarumComponentsPostsUserPage) {
|
|
||||||
PostsUserPage = _flarumComponentsPostsUserPage['default'];
|
|
||||||
}],
|
|
||||||
execute: function () {
|
|
||||||
MentionsUserPage = (function (_PostsUserPage) {
|
|
||||||
babelHelpers.inherits(MentionsUserPage, _PostsUserPage);
|
|
||||||
|
|
||||||
function MentionsUserPage() {
|
|
||||||
babelHelpers.classCallCheck(this, MentionsUserPage);
|
|
||||||
babelHelpers.get(Object.getPrototypeOf(MentionsUserPage.prototype), 'constructor', this).apply(this, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
babelHelpers.createClass(MentionsUserPage, [{
|
|
||||||
key: 'loadResults',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a new page of the user's activity feed.
|
|
||||||
*
|
|
||||||
* @param {Integer} [offset] The position to start getting results from.
|
|
||||||
* @return {Promise}
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
value: function loadResults(offset) {
|
|
||||||
return app.store.find('posts', {
|
|
||||||
filter: {
|
|
||||||
type: 'comment',
|
|
||||||
mentioned: this.user.id()
|
|
||||||
},
|
|
||||||
page: { offset: offset, limit: this.loadLimit },
|
|
||||||
sort: '-time'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
return MentionsUserPage;
|
|
||||||
})(PostsUserPage);
|
|
||||||
|
|
||||||
_export('default', MentionsUserPage);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
});
|
Reference in New Issue
Block a user