mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
c616f56a2a
Refs https://www.notion.so/ghost/Member-activity-improvements-247080c54dac4ebf86d10b38508d2a19
56 lines
2.5 KiB
Handlebars
56 lines
2.5 KiB
Handlebars
<section class="gh-canvas gh-members-activity {{if this.memberRecord "gh-members-activity-single"}} {{if (feature "memberAttribution") "feature-memberAttribution"}}">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
{{#if this.memberRecord}}
|
|
<div class="flex flex-column">
|
|
<div class="gh-canvas-breadcrumb">
|
|
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}} data-test-link="members-activity-back">
|
|
Member activity
|
|
</LinkTo>
|
|
{{svg-jar "arrow-right-small"}} {{or this.memberRecord.name this.memberRecord.email}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
Member activity
|
|
</h2>
|
|
{{/if}}
|
|
|
|
<div class="view-actions">
|
|
<MembersActivity::EventTypeFilter
|
|
@excludedEvents={{this.excludedEvents}}
|
|
@hiddenEvents={{this.hiddenEvents}}
|
|
@onChange={{this.changeExcludedEvents}} />
|
|
|
|
<MembersActivity::MemberFilter
|
|
@selected={{this.memberRecord}}
|
|
@onChange={{this.changeMember}} />
|
|
</div>
|
|
</GhCanvasHeader>
|
|
<div class="view-container">
|
|
{{#let (members-event-fetcher filter=(members-event-filter excludedEvents=this.fullExcludedEvents member=this.member) pageSize=50 memberId=this.member) as |eventsFetcher|}}
|
|
{{#if eventsFetcher.data}}
|
|
{{#if this.memberRecord}}
|
|
<GhMemberDetailsActivity @member={{this.memberRecord}} />
|
|
{{/if}}
|
|
<div class="gh-list-scrolling">
|
|
<MembersActivity::Table @hideMemberColumn={{if this.member true}} @events={{eventsFetcher.data}} @hasMultipleNewsletters={{eventsFetcher.hasMultipleNewsletters}} />
|
|
|
|
{{#if (not (or eventsFetcher.isLoading eventsFetcher.hasReachedEnd))}}
|
|
<GhScrollTrigger @enter={{eventsFetcher.loadNextPage}} @triggerOffset={{250}} />
|
|
{{/if}}
|
|
</div>
|
|
{{else}}
|
|
{{#unless eventsFetcher.isLoading}}
|
|
<MembersActivity::NoEvents @filter={{or this.member this.excludedEvents}} />
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
<div class="no-posts-box"><GhLoadingSpinner /></div>
|
|
{{/if}}
|
|
{{/let}}
|
|
</div>
|
|
</section>
|
|
|
|
{{outlet}}
|