mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
d115204d9f
no issue refs TryGhost/Ghost#11538 * Added members label handling v1 * Added members label dropdown in list screen * Updated selected labels and member list UI refactor * Added v1 label add/delete modal * Added add label modal v1 * Fixed disabled check for new label save * First stab at member filters layout * Updated member detail screen design * Member detail refinements * Added basic editing for member labels * Fixed label deletion from members list * Updated filtered list header * Refinements for dropdown and empty filter state * Refined label modal * Updated member labels fetch logic * Added custom dropdown component for labels * Refined style for dropdown * Refined dropdown button * Restructure and refine members dropdown styles * Added selected indication to dropdown * Fixed dropdown footer style * Removed member label placeholder * Removed add label from member list actions * New label refinements * Added confirmation modal for label delete * Added duplicate validation check for labels * Updated validation check with slug * Updated copy * Updated actions dropdown copy * Fixed visual glitch of dropdown on FF * Hide scrollbar for labels dropdown Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
81 lines
3.1 KiB
Handlebars
81 lines
3.1 KiB
Handlebars
<section class="gh-canvas">
|
||
<form class="mb10 member-basic-info-form">
|
||
<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">
|
||
<GhTaskButton @class="gh-btn gh-btn-blue gh-btn-icon" @type="button" @task={{this.save}} @data-test-button="save" />
|
||
</section>
|
||
</GhCanvasHeader>
|
||
|
||
<div class="flex items-center mb10 bt b--lightgrey-d1 pt8">
|
||
{{#if (or this.member.name this.member.email)}}
|
||
<GhMemberAvatar
|
||
@member={{this.member}}
|
||
@sizeClass={{if this.member.name 'f-subheadline fw4 lh-zero tracked-1' 'f-headline fw4 lh-zero tracked-1'}}
|
||
@containerClass="w18 h18 mr4 gh-member-detail-avatar"
|
||
/>
|
||
{{else}}
|
||
<div class="flex items-center justify-center br-100 w18 h18 mr4 gh-new-member-avatar">
|
||
<span class="gh-member-avatar-label f-subheadline fw4 lh-zero tracked-1">N</span>
|
||
</div>
|
||
{{/if}}
|
||
<div>
|
||
<h3 class="f2 fw6 ma0 pa0">
|
||
{{or this.member.name this.member.email}}
|
||
</h3>
|
||
<p class="f7 pa0 ma0 midlightgrey-d1">
|
||
{{#if (and this.member.name this.member.email)}}
|
||
<span class="darkgrey fw5">{{this.member.email}}</span>
|
||
{{/if}}
|
||
{{#unless this.member.isNew}}
|
||
{{if (and this.member.name this.member.email) "–"}}
|
||
Created on {{this.subscribedAt}}
|
||
{{/unless}}
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
<GhMemberSettingsForm
|
||
@member={{this.member}}
|
||
@scratchMember={{this.scratchMember}}
|
||
@setProperty={{action "setProperty"}}
|
||
@isLoading={{this.isLoading}} />
|
||
</form>
|
||
|
||
{{#unless this.member.isNew}}
|
||
<button
|
||
type="button"
|
||
class="gh-btn gh-btn-red gh-btn-icon mt3"
|
||
{{on "click" (action "toggleDeleteMemberModal")}}
|
||
data-test-button="delete-member"
|
||
>
|
||
<span>Delete member</span>
|
||
</button>
|
||
{{/unless}}
|
||
</section>
|
||
|
||
{{#if this.showUnsavedChangesModal}}
|
||
<GhFullscreenModal
|
||
@modal="leave-settings"
|
||
@confirm={{action "leaveScreen"}}
|
||
@close={{action "toggleUnsavedChangesModal"}}
|
||
@modifier="action wide" />
|
||
{{/if}}
|
||
|
||
{{#if this.showDeleteMemberModal}}
|
||
<GhFullscreenModal
|
||
@modal="delete-member"
|
||
@model={{this.member}}
|
||
@confirm={{action "deleteMember"}}
|
||
@close={{action "toggleDeleteMemberModal"}}
|
||
@modifier="action wide" />
|
||
{{/if}}
|