mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Rename post preview component again
I want to reuse it for the reply placeholder as well, and that will require injecting a composer state instance, so this naming seems to make more sense.
This commit is contained in:
@@ -61,7 +61,7 @@ import NotificationList from './components/NotificationList';
|
||||
import WelcomeHero from './components/WelcomeHero';
|
||||
import SignUpModal from './components/SignUpModal';
|
||||
import CommentPost from './components/CommentPost';
|
||||
import TextFormatterPreview from './components/TextFormatterPreview';
|
||||
import ComposerPostPreview from './components/ComposerPostPreview';
|
||||
import ReplyComposer from './components/ReplyComposer';
|
||||
import NotificationsPage from './components/NotificationsPage';
|
||||
import PostStreamScrubber from './components/PostStreamScrubber';
|
||||
@@ -136,7 +136,7 @@ export default Object.assign(compat, {
|
||||
'components/WelcomeHero': WelcomeHero,
|
||||
'components/SignUpModal': SignUpModal,
|
||||
'components/CommentPost': CommentPost,
|
||||
'components/TextFormatterPreview': TextFormatterPreview,
|
||||
'components/ComposerPostPreview': ComposerPostPreview,
|
||||
'components/ReplyComposer': ReplyComposer,
|
||||
'components/NotificationsPage': NotificationsPage,
|
||||
'components/PostStreamScrubber': PostStreamScrubber,
|
||||
|
@@ -7,7 +7,7 @@ import EditPostComposer from './EditPostComposer';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import listItems from '../../common/helpers/listItems';
|
||||
import Button from '../../common/components/Button';
|
||||
import TextFormatterPreview from './TextFormatterPreview';
|
||||
import ComposerPostPreview from './ComposerPostPreview';
|
||||
|
||||
/**
|
||||
* The `CommentPost` component displays a standard `comment`-typed post. This
|
||||
@@ -51,7 +51,7 @@ export default class CommentPost extends Post {
|
||||
<ul>{listItems(this.headerItems().toArray())}</ul>
|
||||
</header>,
|
||||
<div className="Post-body">
|
||||
{this.isEditing() ? <TextFormatterPreview content={() => app.composer.fields.content()} /> : m.trust(this.attrs.post.contentHtml())}
|
||||
{this.isEditing() ? <ComposerPostPreview content={() => app.composer.fields.content()} /> : m.trust(this.attrs.post.contentHtml())}
|
||||
</div>,
|
||||
]);
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import Component from '../../common/Component';
|
||||
|
||||
/**
|
||||
* The `TextFormatterPreview` component renders Markdown as HTML using the
|
||||
* The `ComposerPostPreview` component renders Markdown as HTML using the
|
||||
* TextFormatter library, polling a data source for changes every 50ms. This is
|
||||
* done to prevent expensive redraws on e.g. every single keystroke, while
|
||||
* still retaining the perception of live updates for the user.
|
||||
@@ -12,7 +12,7 @@ import Component from '../../common/Component';
|
||||
*
|
||||
* - `content` A callback that retrieves the latest content that should be rendered.
|
||||
*/
|
||||
export default class TextFormatterPreview extends Component {
|
||||
export default class ComposerPostPreview extends Component {
|
||||
view() {
|
||||
return <div className="Post-preview" />;
|
||||
}
|
Reference in New Issue
Block a user