mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
2453f6afbd
closes https://github.com/TryGhost/Ghost/issues/12461 Design changes: - added activity feed to member details page - rearranged Stripe info to display on the right - added toggle buttons for Stripe subscription and customer info - added box to display activity feed for received and opened emails Functionality changes: - added `queryRecord()` to member adapter so `queryRecord('member', {id: x})` will hit `/members/:id/?query` instead of `/members/?id=x&query` - updated member route to query member with `?include=email_recipients` - added `EmailRecipient` model for access to event timestamps and email relationship setup - added `<GhMemberActivityFeed>` component that accepts an `EmailRecipient` array and converts that into an activity list - added support for `@model=emailInstance` to the email preview modal - fixed a timing issue with email preview that could result in it showing blank content until the mobile/desktop toggle is used - fixed sometimes blank member location Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
72 lines
2.3 KiB
Handlebars
72 lines
2.3 KiB
Handlebars
<section class="gh-canvas">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
<LinkTo @route="members" data-test-link="members-back">Members</LinkTo>
|
|
<span>{{svg-jar "arrow-right"}}</span>
|
|
{{#if this.member.isNew}}
|
|
New member
|
|
{{else}}
|
|
{{or this.member.name this.member.email}}
|
|
{{/if}}
|
|
</h2>
|
|
|
|
<section class="view-actions">
|
|
{{#if this.session.user.isOwnerOrAdmin}}
|
|
{{#unless this.member.isNew}}
|
|
<button
|
|
class="gh-btn gh-btn-white gh-btn-icon mr2"
|
|
{{on "click" this.toggleImpersonateMemberModal}}>
|
|
<span>Impersonate</span>
|
|
</button>
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
<GhTaskButton @class="gh-btn gh-btn-blue gh-btn-icon" @type="button" @task={{this.saveTask}} @data-test-button="save" />
|
|
</section>
|
|
</GhCanvasHeader>
|
|
|
|
<form class="mb14 member-basic-info-form">
|
|
<GhMemberSettingsForm
|
|
@member={{this.member}}
|
|
@scratchMember={{this.scratchMember}}
|
|
@setProperty={{this.setProperty}}
|
|
@isLoading={{this.isLoading}} />
|
|
</form>
|
|
|
|
{{#unless this.member.isNew}}
|
|
<button
|
|
type="button"
|
|
class="gh-btn gh-btn-red gh-btn-icon mt3"
|
|
{{on "click" this.toggleDeleteMemberModal}}
|
|
data-test-button="delete-member"
|
|
>
|
|
<span>Delete member</span>
|
|
</button>
|
|
{{/unless}}
|
|
</section>
|
|
|
|
{{#if this.showUnsavedChangesModal}}
|
|
<GhFullscreenModal
|
|
@modal="leave-settings"
|
|
@confirm={{this.leaveScreen}}
|
|
@close={{this.toggleUnsavedChangesModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
{{#if this.showDeleteMemberModal}}
|
|
<GhFullscreenModal
|
|
@modal="delete-member"
|
|
@model={{this.member}}
|
|
@confirm={{this.deleteMember}}
|
|
@close={{this.toggleDeleteMemberModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
{{#if this.showImpersonateMemberModal}}
|
|
<GhFullscreenModal
|
|
@modal="impersonate-member"
|
|
@model={{this.member}}
|
|
@close={{this.toggleImpersonateMemberModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|