mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed analytics button not working
no issue
This commit is contained in:
parent
c44e7d1536
commit
58cabc68ec
1 changed files with 9 additions and 6 deletions
|
@ -11,12 +11,15 @@ export default class PostsListItemClicks extends Component {
|
|||
|
||||
@tracked isHovered = false;
|
||||
|
||||
get post() {
|
||||
return this.args.post;
|
||||
}
|
||||
|
||||
get scheduledText() {
|
||||
let {post} = this.args;
|
||||
let text = [];
|
||||
|
||||
let formattedTime = formatPostTime(
|
||||
post.publishedAtUTC,
|
||||
this.post.publishedAtUTC,
|
||||
{timezone: this.settings.get('timezone'), scheduled: true}
|
||||
);
|
||||
text.push(formattedTime);
|
||||
|
@ -25,17 +28,17 @@ export default class PostsListItemClicks extends Component {
|
|||
}
|
||||
|
||||
get routeForLink() {
|
||||
if (this.isAnalytics) {
|
||||
if (this.post.hasAnalyticsPage) {
|
||||
return 'posts.analytics';
|
||||
}
|
||||
return 'editor.edit';
|
||||
}
|
||||
|
||||
get modelsForLink() {
|
||||
if (this.isAnalytics) {
|
||||
return [this.args.post];
|
||||
if (this.post.hasAnalyticsPage) {
|
||||
return [this.post];
|
||||
}
|
||||
return [this.args.post.displayName, this.args.post.id];
|
||||
return [this.post.displayName, this.post.id];
|
||||
}
|
||||
|
||||
@action
|
||||
|
|
Loading…
Add table
Reference in a new issue