mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Updated subscription event handling (#2332)
refs https://github.com/TryGhost/Team/issues/1302 * Tweaked the getIcon() function to better support the new event data variable for cancelled * Added back in info for events across all activity lists Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
This commit is contained in:
parent
e193ff15a5
commit
2072209d4d
@ -37,7 +37,7 @@
|
||||
<div class="gh-dashboard-activity-event">
|
||||
{{parsedEvent.action}}
|
||||
{{parsedEvent.object}}
|
||||
<span class="highlight">{{parsedEvent.info}}</span>
|
||||
{{parsedEvent.info}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,6 +30,7 @@
|
||||
{{#if event.email}}
|
||||
"<GhEmailPreviewLink @data={{event.email}} />"
|
||||
{{/if}}
|
||||
{{event.info}}
|
||||
</div>
|
||||
<div class="gh-member-feed-time">
|
||||
{{moment-from-now event.timestamp}}
|
||||
|
@ -51,11 +51,7 @@ function getIcon(event) {
|
||||
if (event.type === 'subscription_event') {
|
||||
icon = 'subscriptions';
|
||||
|
||||
if (event.data.from_plan === null) {
|
||||
icon = 'subscriptions';
|
||||
}
|
||||
|
||||
if (event.data.to_plan === null) {
|
||||
if (event.data.type === 'canceled') {
|
||||
icon = 'canceled-subscription';
|
||||
}
|
||||
}
|
||||
@ -97,12 +93,20 @@ function getAction(event) {
|
||||
}
|
||||
|
||||
if (event.type === 'subscription_event') {
|
||||
if (event.data.from_plan === null) {
|
||||
if (event.data.type === 'created') {
|
||||
return 'started';
|
||||
}
|
||||
|
||||
if (event.data.to_plan === null) {
|
||||
return 'cancelled';
|
||||
if (event.data.type === 'updated') {
|
||||
return 'changed';
|
||||
}
|
||||
if (event.data.type === 'canceled') {
|
||||
return 'canceled';
|
||||
}
|
||||
if (event.data.type === 'reactivated') {
|
||||
return 'reactivated';
|
||||
}
|
||||
if (event.data.type === 'expired') {
|
||||
return 'ended';
|
||||
}
|
||||
|
||||
return 'changed';
|
||||
|
@ -150,12 +150,17 @@
|
||||
}
|
||||
|
||||
.gh-members-activity-event {
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: var(--middarkgrey);
|
||||
display: inline-block;
|
||||
color: var(--middarkgrey);
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.gh-members-activity-event > a {
|
||||
font-weight: 500;
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
.gh-member-activity-actions-menu {
|
||||
top: auto;
|
||||
left: auto;
|
||||
|
@ -1109,10 +1109,9 @@ textarea.gh-member-details-textarea {
|
||||
|
||||
.gh-member-feed-event {
|
||||
display: inline-block;
|
||||
text-transform: lowercase;
|
||||
color: var(--middarkgrey);
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: var(--black);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.gh-member-feed-event:first-letter {
|
||||
|
Loading…
Reference in New Issue
Block a user