mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added the newsletter name to the activity feed
refs https://github.com/TryGhost/Team/issues/1563 - When a member (un)subscribes to a specific newsletter, we should add the name of the newsletter. - Replaced CSS lowercase/first uppercase transform with a new HBS helper so we can maintain the caps in the newsletter names. - Copy is still WIP, refs https://ghost.slack.com/archives/C02G9E68C/p1651569897474819
This commit is contained in:
parent
94ae33858d
commit
da3b3850f5
9 changed files with 19 additions and 17 deletions
|
@ -35,7 +35,7 @@
|
|||
{{parsedEvent.subject}}
|
||||
</div>
|
||||
<div class="gh-dashboard-activity-event">
|
||||
{{parsedEvent.action}}
|
||||
{{capitalize-first-letter parsedEvent.action}}
|
||||
{{parsedEvent.object}}
|
||||
{{parsedEvent.info}}
|
||||
</div>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<GhMemberAvatar @member={{parsedEvent.member}} @containerClass="w8 h8 mr3 flex-shrink-0" />
|
||||
{{parsedEvent.subject}}
|
||||
<span>
|
||||
{{parsedEvent.action}}
|
||||
{{capitalize-first-letter parsedEvent.action}}
|
||||
{{parsedEvent.object}}
|
||||
{{parsedEvent.info}}
|
||||
</span>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<div class="gh-dashboard5-list-item-sub">
|
||||
{{!-- ICON {{svg-jar parsedEvent.icon}} --}}
|
||||
<span>
|
||||
{{parsedEvent.action}}
|
||||
{{capitalize-first-letter parsedEvent.action}}
|
||||
{{parsedEvent.object}}
|
||||
{{parsedEvent.info}}
|
||||
</span>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div class="gh-member-feed-detail">
|
||||
<div class="gh-member-feed-event">
|
||||
<span class="gh-members-activity-description">
|
||||
{{event.action}}
|
||||
{{capitalize-first-letter event.action}}
|
||||
{{event.object}}
|
||||
</span>
|
||||
{{#if event.email}}
|
||||
|
@ -52,4 +52,4 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="gh-members-activity-icon">{{svg-jar event.icon}}</div>
|
||||
<div class="gh-members-activity-event">
|
||||
<span class="gh-members-activity-description">
|
||||
{{event.action}}
|
||||
{{capitalize-first-letter event.action}}
|
||||
{{event.object}}
|
||||
</span>
|
||||
{{#if event.email}}
|
||||
|
|
10
ghost/admin/app/helpers/capitalize-first-letter.js
Normal file
10
ghost/admin/app/helpers/capitalize-first-letter.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import {helper} from '@ember/component/helper';
|
||||
|
||||
export function capitalizeFirstLetter(string) {
|
||||
if (typeof string !== 'string' || string.length === 0) {
|
||||
return string;
|
||||
}
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
export default helper(([string]) => capitalizeFirstLetter(string));
|
|
@ -127,6 +127,9 @@ function getAction(event) {
|
|||
|
||||
function getObject(event) {
|
||||
if (event.type === 'newsletter_event') {
|
||||
if (event.data.newsletter && event.data.newsletter.name) {
|
||||
return 'emails from '+event.data.newsletter.name;
|
||||
}
|
||||
return 'emails';
|
||||
}
|
||||
|
||||
|
|
|
@ -1060,16 +1060,10 @@ Dashboard v5 Recents */
|
|||
}
|
||||
|
||||
.gh-dashboard5-recents-activity .gh-dashboard5-list-item-sub:nth-child(2) > span {
|
||||
text-transform: lowercase;
|
||||
color: #626d79;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.gh-dashboard5-recents-activity .gh-dashboard5-list-item-sub:nth-child(2) > span:first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------
|
||||
Dashboard v5 What's New */
|
||||
|
||||
|
|
|
@ -119,15 +119,10 @@
|
|||
|
||||
.gh-members-activity-description {
|
||||
display: inline-block;
|
||||
text-transform: lowercase;
|
||||
color: var(--middarkgrey);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.gh-members-activity-description:first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.gh-members-activity-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
|
Loading…
Add table
Reference in a new issue