Moved posts list components

no issue

- relocated screen-specific components into a separate `posts-list/` directory as part of the move to keep the top-level `components/` directory for re-usable components
This commit is contained in:
Kevin Ansfield 2022-09-08 09:42:07 +01:00
parent f654b24486
commit ea93ff2a48
8 changed files with 13 additions and 11 deletions

View File

@ -2,7 +2,7 @@ import Component from '@glimmer/component';
import {get} from '@ember/object';
import {inject as service} from '@ember/service';
export default class GhContentfilterComponent extends Component {
export default class PostsListContentFilter extends Component {
@service customViews;
@service feature;
@service router;

View File

@ -4,7 +4,7 @@ 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 GhPostsListItemComponent extends Component {
export default class PostsListItem extends Component {
@service feature;
@service session;
@service settings;

View File

@ -3,7 +3,7 @@
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
<section class="view-actions">
<GhContentfilter
<PostsList::ContentFilter
@currentUser={{this.session.user}}
@selectedType={{this.selectedType}}
@availableTypes={{this.availableTypes}}

View File

@ -3,7 +3,7 @@
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
<section class="view-actions">
<GhContentfilter
<PostsList::ContentFilter
@currentUser={{this.session.user}}
@selectedType={{this.selectedType}}
@availableTypes={{this.availableTypes}}
@ -41,9 +41,10 @@
{{/if}}
{{#each this.postsInfinityModel as |page|}}
<GhPostsListItem
<PostsList::ListItem
@post={{page}}
data-test-page-id={{page.id}} />
data-test-page-id={{page.id}}
/>
{{else}}
<li class="no-posts-box">
<div class="no-posts">

View File

@ -2,7 +2,7 @@
<GhCanvasHeader class="gh-canvas-header break tablet post-header">
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
<section class="view-actions">
<GhContentfilter
<PostsList::ContentFilter
@currentUser={{this.session.user}}
@selectedType={{this.selectedType}}
@availableTypes={{this.availableTypes}}

View File

@ -3,7 +3,7 @@
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
<section class="view-actions">
<GhContentfilter
<PostsList::ContentFilter
@currentUser={{this.session.user}}
@selectedType={{this.selectedType}}
@availableTypes={{this.availableTypes}}
@ -32,7 +32,7 @@
{{#if this.postsInfinityModel}}
<li class="gh-list-row header">
<div class="gh-list-header gh-posts-title-header">Title</div>
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
<div class="gh-list-header gh-posts-status-header"></div>
<div class="gh-list-header gh-posts-signups-header">Signups</div>
@ -49,9 +49,10 @@
{{/if}}
{{#each this.postsInfinityModel as |post|}}
<GhPostsListItem
<PostsList::ListItem
@post={{post}}
data-test-post-id={{post.id}} />
data-test-post-id={{post.id}}
/>
{{else}}
<li class="no-posts-box">
<div class="no-posts">