Refined labels in members list

This commit is contained in:
Peter Zimon 2021-08-13 15:17:07 +02:00
parent 520252f5aa
commit 905b312383
4 changed files with 17 additions and 12 deletions

View File

@ -1,10 +1,10 @@
{{#if (eq @filterColumn 'label')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<span class="midlightgrey">{{labels}}</span>
<LinkTo @route="member" @model={{@member}} class="gh-list-data wrap middarkgrey f8">
<span class="gh-members-list-labels">{{labels}}</span>
</LinkTo>
{{else if (eq @filterColumn 'status')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.status))}}
<span class="gh-members-list-open-rate-mobile">{{capitalize @member.status}}</span>
{{else}}
@ -13,7 +13,7 @@
</LinkTo>
{{else if (eq @filterColumn 'email_count')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.emailCount))}}
<span class="gh-members-list-open-rate-mobile">{{@member.emailCount}}</span>
{{else}}
@ -22,7 +22,7 @@
</LinkTo>
{{else if (eq @filterColumn 'email_opened_count')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.emailOpenedCount))}}
<span class="gh-members-list-open-rate-mobile">{{@member.emailOpenedCount}}</span>
{{else}}
@ -31,7 +31,7 @@
</LinkTo>
{{else if (eq @filterColumn 'subscribed')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.subscribed))}}
<span class="gh-members-list-open-rate-mobile">{{@member.subscribed}}</span>
{{else}}
@ -39,7 +39,7 @@
{{/if}}
</LinkTo>
{{else if (eq @filterColumn 'subscriptions.status')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.subscriptions?.[0]?.status))}}
<span class="gh-members-list-open-rate-mobile">{{@member.subscriptions?.[0]?.status}}</span>
{{else}}
@ -47,7 +47,7 @@
{{/if}}
</LinkTo>
{{else if (eq @filterColumn 'subscriptions.plan_interval')}}
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data middarkgrey f8">
<LinkTo @route="member" @model={{@member}} class="gh-list-data middarkgrey f8">
{{#if (not (is-empty @member.subscriptions?.[0]?.plan?.interval))}}
<span class="gh-members-list-open-rate-mobile">{{@member.subscriptions?.[0]?.plan?.interval}}</span>
{{else}}

View File

@ -7,6 +7,6 @@ export default class GhMembersListItemColumnLabs extends Component {
get labels() {
const labelData = this.args.member.get('labels') || [];
return labelData.map(label => label.name).join(',');
return labelData.map(label => label.name).join(', ');
}
}

View File

@ -357,9 +357,9 @@ ul.nostyle li {
background: var(--whitegrey);
}
.gh-list-scrolling td,
.gh-list-scrolling th,
.gh-list-scrolling a {
.gh-list-scrolling td:not(.wrap),
.gh-list-scrolling th:not(.wrap),
.gh-list-scrolling a:not(.wrap) {
white-space: nowrap;
}

View File

@ -131,6 +131,11 @@ p.gh-members-list-email {
padding-right: 0;
}
.gh-members-list-labels {
display: inline-block;
max-width: 300px;
}
.gh-members-placeholder {
width: 118px;
margin: -30px 0 15px;