mirror of
https://github.com/flarum/core.git
synced 2025-08-10 18:35:56 +02:00
update: forum/components/PostMeta
This commit is contained in:
committed by
Franz Liedke
parent
3120eb6f63
commit
aa4b58d7aa
@@ -7,23 +7,23 @@ import fullTime from '../../common/helpers/fullTime';
|
|||||||
* a dropdown containing more information about the post (number, full time,
|
* a dropdown containing more information about the post (number, full time,
|
||||||
* permalink).
|
* permalink).
|
||||||
*
|
*
|
||||||
* ### Props
|
* ### Attrs
|
||||||
*
|
*
|
||||||
* - `post`
|
* - `post`
|
||||||
*/
|
*/
|
||||||
export default class PostMeta extends Component {
|
export default class PostMeta extends Component {
|
||||||
view() {
|
view() {
|
||||||
const post = this.props.post;
|
const post = this.attrs.post;
|
||||||
const time = post.createdAt();
|
const time = post.createdAt();
|
||||||
const permalink = this.getPermalink(post);
|
const permalink = this.getPermalink(post);
|
||||||
const touch = 'ontouchstart' in document.documentElement;
|
const touch = 'ontouchstart' in document.documentElement;
|
||||||
|
|
||||||
// When the dropdown menu is shown, select the contents of the permalink
|
// When the dropdown menu is shown, select the contents of the permalink
|
||||||
// input so that the user can quickly copy the URL.
|
// input so that the user can quickly copy the URL.
|
||||||
const selectPermalink = function () {
|
const selectPermalink = function (e) {
|
||||||
setTimeout(() => $(this).parent().find('.PostMeta-permalink').select());
|
setTimeout(() => $(this).parent().find('.PostMeta-permalink').select());
|
||||||
|
|
||||||
m.redraw.strategy('none');
|
e.redraw = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user