Ghost/ghost/admin/app/components/dashboard/v5/charts/recent-posts.js
James Morris 356a1ead2a Added in dark mode grid lines for charts and futher style tweaks to the new dashboard
refs: https://github.com/TryGhost/Team/issues/1462

- added in dynamic dark mode grid lines for the charts
- added in some subtle other dark mode tweaks for borders
- limited the recent posts to 3 instead of 5
2022-04-12 17:56:55 +01:00

16 lines
446 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
import {tracked} from '@glimmer/tracking';
export default class RecentPosts extends Component {
@service store;
@tracked posts = [];
@action
async loadPosts() {
this.posts = await this.store.query('post', {limit: 3, filter: 'status:published', order: 'published_at desc'});
}
}