1
0
mirror of https://github.com/flarum/core.git synced 2025-07-27 19:50:20 +02:00
Files
php-flarum/js/forum/src/components/DiscussionRenamedPost.js
dcsjapan 0a66229169 Add "forum" namespacing to previously renamed core keys
- Does not affect "core.deleted_user" global string.
- Corresponding YAML will be sent later w/ more extracted strings.
2015-10-02 15:54:39 +09:00

31 lines
752 B
JavaScript

import EventPost from 'flarum/components/EventPost';
/**
* The `DiscussionRenamedPost` component displays a discussion event post
* indicating that the discussion has been renamed.
*
* ### Props
*
* - All of the props for EventPost
*/
export default class DiscussionRenamedPost extends EventPost {
icon() {
return 'pencil';
}
descriptionKey() {
return 'core.forum.post_stream_discussion_renamed_text';
}
descriptionData() {
const post = this.props.post;
const oldTitle = post.content()[0];
const newTitle = post.content()[1];
return {
'old': <strong className="DiscussionRenamedPost-old">{oldTitle}</strong>,
'new': <strong className="DiscussionRenamedPost-new">{newTitle}</strong>
};
}
}