Ghost/ghost/admin/app/components/member/activity-feed.hbs
Sanne de Vries 1306921cac 🎨 Updated Member page layout (#2271)
No issue

- Changed the Member details page to be more scalable and flexible, depending on whether creators are using subscriptions, emails, and stats.

* Hidden email stats on member detail page when subscriptions are off
* Hid subscription box on member details page when Stripe is not connected
* Updated copy and layout of member details page
* Updated old activity feed styles on member page
* Fixed padding issue for empty activity feed
* Fixed current and new activity feed
* Added Last seen to member details page behind feature flag
* Updated lint todo file
* Fixed spacing issue in member details
2022-03-01 15:57:57 +01:00

54 lines
3.2 KiB
Handlebars

{{#if @member.isNew}}
<div class="gh-main-section-content grey {{if eventsFetcher.data "" "mt8"}}">
<div class="gh-member-feed gh-member-feed-labs gh-member-feed-no-data">
<Member::ActivityFeedEmpty />
</div>
</div>
{{else}}
{{#let (members-event-fetcher filter=(members-event-filter member=@member.id) pageSize=5) as |eventsFetcher|}}
{{#if eventsFetcher.data}}<h4 class="gh-main-section-header small bn">Activity</h4>{{/if}}
<div class="gh-main-section-content grey {{if eventsFetcher.data "" "mt8"}}">
<div class="gh-member-feed gh-member-feed-labs {{if eventsFetcher.data "" "gh-member-feed-no-data"}}" ...attributes>
<div class="flex-auto flex flex-column items-stretch {{if eventsFetcher.data "justify-between" "h-100 justify-center"}}">
<div>
{{#if eventsFetcher.isLoading}}
<div class="relative h17"><GhLoadingSpinner class="h30" /></div>
{{else if eventsFetcher.data}}
{{#each eventsFetcher.data as |rawEvent|}}
{{#let (parse-member-event rawEvent) as |event|}}
<div class="gh-member-feed-row gh-member-feed-row-labs">
<div class="gh-member-feed-container">
<div class="gh-member-feed-icon">
{{svg-jar event.icon class=event.iconClass}}
</div>
<div class="gh-member-feed-detail">
<div class="gh-member-feed-event">
<span class="gh-members-activity-description">
{{event.action}}
{{event.object}}
</span>
{{#if event.email}}
"<GhEmailPreviewLink @data={{event.email}} />"
{{/if}}
</div>
<div class="gh-member-feed-time">
{{moment-from-now event.timestamp}}
</div>
</div>
</div>
</div>
{{/let}}
{{/each}}
<div class="gh-member-feed-footer">
<LinkTo @route="members-activity" @query={{hash excludedEvents=null member=@member.id}}>See all activity →</LinkTo>
</div>
{{else}}
<Member::ActivityFeedEmpty />
{{/if}}
</div>
</div>
</div>
</div>
{{/let}}
{{/if}}