From 7d9db2f4ae55d26fa6133376b6363f0b0c83b6b4 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 9 Aug 2020 23:23:35 -0400 Subject: [PATCH] update: forum/components/CommentPost - removed now irrelevant Mithril 0.1 workaround for ul jsx - Move CommentPostPreview into its own class --- js/src/forum/components/CommentPost.js | 67 ++++++++------------------ 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/js/src/forum/components/CommentPost.js b/js/src/forum/components/CommentPost.js index f9395b07e..979940ad8 100644 --- a/js/src/forum/components/CommentPost.js +++ b/js/src/forum/components/CommentPost.js @@ -1,5 +1,3 @@ -/*global s9e, hljs*/ - import Post from './Post'; import classList from '../../common/utils/classList'; import PostUser from './PostUser'; @@ -9,19 +7,20 @@ import EditPostComposer from './EditPostComposer'; import ItemList from '../../common/utils/ItemList'; import listItems from '../../common/helpers/listItems'; import Button from '../../common/components/Button'; +import CommentPostPreview from './CommentPostPreview'; /** * The `CommentPost` component displays a standard `comment`-typed post. This * includes a number of item lists (controls, header, and footer) surrounding * the post's HTML content. * - * ### Props + * ### Attrs * * - `post` */ export default class CommentPost extends Post { - init() { - super.init(); + oninit(vnode) { + super.oninit(vnode); /** * If the post has been hidden, then this flag determines whether or not its @@ -46,43 +45,38 @@ export default class CommentPost extends Post { } content() { - // Note: we avoid using JSX for the