Rename post.editTime

This commit is contained in:
Toby Zerner 2018-08-24 21:27:05 +09:30
parent c2f6e2d7a3
commit 8eb4a75da7
3 changed files with 4 additions and 4 deletions

View File

@ -15,9 +15,9 @@ Object.assign(Post.prototype, {
contentHtml: Model.attribute('contentHtml'),
contentPlain: computed('contentHtml', getPlainContent),
editTime: Model.attribute('editTime', Model.transformDate),
editedAt: Model.attribute('editedAt', Model.transformDate),
editUser: Model.hasOne('editUser'),
isEdited: computed('editTime', editTime => !!editTime),
isEdited: computed('editedAt', editedAt => !!editedAt),
hideTime: Model.attribute('hideTime', Model.transformDate),
hideUser: Model.hasOne('hideUser'),

View File

@ -21,7 +21,7 @@ export default class PostEdited extends Component {
const editUser = post.editUser();
const editedInfo = extractText(app.translator.trans(
'core.forum.post.edited_tooltip',
{user: editUser, ago: humanTime(post.editTime())}
{user: editUser, ago: humanTime(post.editedAt())}
));
if (editedInfo !== this.oldEditedInfo) {
this.shouldUpdateTooltip = true;

View File

@ -56,7 +56,7 @@ class PostSerializer extends BasicPostSerializer
}
if ($post->edited_at) {
$attributes['editTime'] = $this->formatDate($post->edited_at);
$attributes['editedAt'] = $this->formatDate($post->edited_at);
}
if ($post->hidden_at) {