mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
ae8cb00300
refs https://github.com/TryGhost/Team/issues/1290 - changed query param from `filter` to `excludedEvents` - exposing filter directly creates problems converting back to NQL after parsing+modifying the query - removes suggestion that raw NQL can be manipulated by editing the URL - allows us to use a set of well-defined query params to build the underlying filter string from scratch each time a query param changes - added `<MemberActivity::EventTypeFilter>` that renders a filter button with a dropdown containing a checkbox for each event type - if no `member` property is set on the members-activity controller (soon to be another query param) any email event types are hidden because the API can't currently paginate those correctly and in any case they would drown out any other type of event
38 lines
1.5 KiB
Handlebars
38 lines
1.5 KiB
Handlebars
<section class="gh-canvas">
|
|
<GhCanvasHeader class="gh-canvas-header break tablet members-header">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>Members Activity</h2>
|
|
|
|
<div class="view-actions">
|
|
<div class="view-actions-top-row">
|
|
<MembersActivity::EventTypeFilter
|
|
@excludedEvents={{this.excludedEvents}}
|
|
@hideMemberOnlyEvents={{not this.member}}
|
|
@updateExcludedEvents={{this.updateExcludedEvents}} />
|
|
</div>
|
|
</div>
|
|
</GhCanvasHeader>
|
|
|
|
<div class="view-container">
|
|
{{#let (members-event-fetcher filter=this.filter pageSize=50) as |eventsFetcher|}}
|
|
<div class="gh-list-scrolling">
|
|
{{#if eventsFetcher.data}}
|
|
<MembersActivity::Table @events={{eventsFetcher.data}} />
|
|
|
|
{{#unless (or eventsFetcher.isLoading eventsFetcher.hasReachedEnd)}}
|
|
<GhScrollTrigger @enter={{eventsFetcher.loadNextPage}} @triggerOffset={{250}} />
|
|
{{/unless}}
|
|
{{else unless eventsFetcher.isLoading}}
|
|
<MembersActivity::NoEvents @filter={{this.filter}} />
|
|
{{/if}}
|
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
<div class="h30 flex flex-column items-center justify-center">
|
|
<div class="gh-loading-spinner"></div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/let}}
|
|
</div>
|
|
</section>
|
|
|
|
{{outlet}} |