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

update: forum/components/PostMeta

This commit is contained in:
Alexander Skvortsov
2020-08-09 23:19:44 -04:00
committed by Franz Liedke
parent 3120eb6f63
commit aa4b58d7aa

View File

@@ -7,23 +7,23 @@ import fullTime from '../../common/helpers/fullTime';
* a dropdown containing more information about the post (number, full time,
* permalink).
*
* ### Props
* ### Attrs
*
* - `post`
*/
export default class PostMeta extends Component {
view() {
const post = this.props.post;
const post = this.attrs.post;
const time = post.createdAt();
const permalink = this.getPermalink(post);
const touch = 'ontouchstart' in document.documentElement;
// When the dropdown menu is shown, select the contents of the permalink
// input so that the user can quickly copy the URL.
const selectPermalink = function () {
const selectPermalink = function (e) {
setTimeout(() => $(this).parent().find('.PostMeta-permalink').select());
m.redraw.strategy('none');
e.redraw = false;
};
return (