mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
2fb6fcabb2
- Made the majority of the row go to the editor instead - Removed illegal nested hyperlinks and cleaned up other markup - Removed some feature flag code around this page and fixed styles for them - Improved some dark mode styling - Lots of refactoring with code and styles refs https://github.com/TryGhost/Team/issues/2223
47 lines
1009 B
JavaScript
47 lines
1009 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {formatPostTime} from 'ghost-admin/helpers/gh-format-post-time';
|
|
import {inject as service} from '@ember/service';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class PostsListItemClicks extends Component {
|
|
@service feature;
|
|
@service session;
|
|
@service settings;
|
|
|
|
@tracked isHovered = false;
|
|
|
|
get post() {
|
|
return this.args.post;
|
|
}
|
|
|
|
get errorClass() {
|
|
if (this.post.didEmailFail) {
|
|
return 'error';
|
|
}
|
|
return '';
|
|
}
|
|
|
|
get scheduledText() {
|
|
let text = [];
|
|
|
|
let formattedTime = formatPostTime(
|
|
this.post.publishedAtUTC,
|
|
{timezone: this.settings.timezone, scheduled: true}
|
|
);
|
|
text.push(formattedTime);
|
|
|
|
return text.join(' ');
|
|
}
|
|
|
|
@action
|
|
mouseOver() {
|
|
this.isHovered = true;
|
|
}
|
|
|
|
@action
|
|
mouseLeave() {
|
|
this.isHovered = false;
|
|
}
|
|
}
|