2019-01-24 22:34:32 +03:00
|
|
|
|
<section class="gh-canvas">
|
2020-02-27 06:50:15 +03:00
|
|
|
|
<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.isOwner}}
|
|
|
|
|
{{#unless this.member.isNew}}
|
|
|
|
|
<button
|
|
|
|
|
class="gh-btn gh-btn-white gh-btn-icon mr2"
|
2020-05-20 16:55:41 +03:00
|
|
|
|
{{on "click" this.toggleImpersonateMemberModal}}>
|
2020-02-27 06:50:15 +03:00
|
|
|
|
<span>Impersonate</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{/unless}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2020-06-04 16:46:52 +03:00
|
|
|
|
<GhTaskButton @class="gh-btn gh-btn-blue gh-btn-icon" @type="button" @task={{this.saveTask}} @data-test-button="save" />
|
2020-02-27 06:50:15 +03:00
|
|
|
|
</section>
|
|
|
|
|
</GhCanvasHeader>
|
2019-12-12 16:35:52 +03:00
|
|
|
|
|
2020-02-27 06:50:15 +03:00
|
|
|
|
<form class="mb10 member-basic-info-form">
|
2019-10-03 14:46:36 +03:00
|
|
|
|
<div class="flex items-center mb10 bt b--lightgrey-d1 pt8">
|
2019-12-13 17:20:29 +03:00
|
|
|
|
{{#if (or this.member.name this.member.email)}}
|
2019-12-12 16:35:52 +03:00
|
|
|
|
<GhMemberAvatar
|
|
|
|
|
@member={{this.member}}
|
|
|
|
|
@sizeClass={{if this.member.name 'f-subheadline fw4 lh-zero tracked-1' 'f-headline fw4 lh-zero tracked-1'}}
|
2020-02-27 06:50:15 +03:00
|
|
|
|
@containerClass="w20 h20 mr4 gh-member-detail-avatar"
|
2019-12-12 16:35:52 +03:00
|
|
|
|
/>
|
|
|
|
|
{{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}}
|
2019-10-03 14:46:36 +03:00
|
|
|
|
<div>
|
2020-02-14 12:34:01 +03:00
|
|
|
|
<h3 class="f2 fw6 ma0 pa0">
|
2019-12-12 16:35:52 +03:00
|
|
|
|
{{or this.member.name this.member.email}}
|
2019-10-03 14:46:36 +03:00
|
|
|
|
</h3>
|
2020-02-14 12:34:01 +03:00
|
|
|
|
<p class="f7 pa0 ma0 midlightgrey-d1">
|
2019-12-12 16:35:52 +03:00
|
|
|
|
{{#if (and this.member.name this.member.email)}}
|
|
|
|
|
<span class="darkgrey fw5">{{this.member.email}}</span>
|
2019-10-03 14:46:36 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</p>
|
2020-02-27 17:14:26 +03:00
|
|
|
|
{{#unless this.member.isNew}}
|
|
|
|
|
<p class="f7 pa0 ma0 midgrey-d1 {{if this.member.name "nudge-bottom--2"}}">
|
|
|
|
|
{{#if this.member.geolocation}}
|
|
|
|
|
{{#if (eq this.member.geolocation.country_code "US")}}
|
|
|
|
|
{{this.member.geolocation.region}}, US
|
|
|
|
|
{{else}}
|
|
|
|
|
{{this.member.geolocation.country}}
|
|
|
|
|
{{/if}}
|
2020-04-06 13:47:28 +03:00
|
|
|
|
{{else}}
|
2020-02-27 17:14:26 +03:00
|
|
|
|
Unknown location
|
|
|
|
|
{{/if}}
|
|
|
|
|
– Created on {{this.subscribedAt}}
|
|
|
|
|
</p>
|
|
|
|
|
{{/unless}}
|
2019-10-02 14:35:50 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-12 16:35:52 +03:00
|
|
|
|
|
|
|
|
|
<GhMemberSettingsForm
|
|
|
|
|
@member={{this.member}}
|
2019-12-13 14:37:01 +03:00
|
|
|
|
@scratchMember={{this.scratchMember}}
|
2020-05-20 16:55:41 +03:00
|
|
|
|
@setProperty={{this.setProperty}}
|
2019-12-13 14:37:01 +03:00
|
|
|
|
@isLoading={{this.isLoading}} />
|
2019-10-02 07:00:03 +03:00
|
|
|
|
</form>
|
2019-10-21 18:24:57 +03:00
|
|
|
|
|
2019-12-12 16:35:52 +03:00
|
|
|
|
{{#unless this.member.isNew}}
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="gh-btn gh-btn-red gh-btn-icon mt3"
|
2020-05-20 16:55:41 +03:00
|
|
|
|
{{on "click" this.toggleDeleteMemberModal}}
|
2019-12-12 16:35:52 +03:00
|
|
|
|
data-test-button="delete-member"
|
|
|
|
|
>
|
|
|
|
|
<span>Delete member</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{/unless}}
|
2019-02-22 14:31:45 +03:00
|
|
|
|
</section>
|
|
|
|
|
|
2019-12-12 16:35:52 +03:00
|
|
|
|
{{#if this.showUnsavedChangesModal}}
|
|
|
|
|
<GhFullscreenModal
|
|
|
|
|
@modal="leave-settings"
|
2020-05-20 16:55:41 +03:00
|
|
|
|
@confirm={{this.leaveScreen}}
|
|
|
|
|
@close={{this.toggleUnsavedChangesModal}}
|
2019-12-12 16:35:52 +03:00
|
|
|
|
@modifier="action wide" />
|
2019-10-10 15:36:33 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
|
2019-12-12 16:35:52 +03:00
|
|
|
|
{{#if this.showDeleteMemberModal}}
|
|
|
|
|
<GhFullscreenModal
|
|
|
|
|
@modal="delete-member"
|
2019-12-13 14:38:37 +03:00
|
|
|
|
@model={{this.member}}
|
2020-05-20 16:55:41 +03:00
|
|
|
|
@confirm={{this.deleteMember}}
|
|
|
|
|
@close={{this.toggleDeleteMemberModal}}
|
2019-12-12 16:35:52 +03:00
|
|
|
|
@modifier="action wide" />
|
2019-10-02 07:00:03 +03:00
|
|
|
|
{{/if}}
|
2020-02-27 06:50:15 +03:00
|
|
|
|
|
|
|
|
|
{{#if this.showImpersonateMemberModal}}
|
|
|
|
|
<GhFullscreenModal
|
|
|
|
|
@modal="impersonate-member"
|
|
|
|
|
@model={{this.member}}
|
2020-05-20 16:55:41 +03:00
|
|
|
|
@close={{this.toggleImpersonateMemberModal}}
|
2020-02-27 06:50:15 +03:00
|
|
|
|
@modifier="action wide" />
|
|
|
|
|
{{/if}}
|