0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Updated post list for newsletters and/or memberships disabled

Refs https://github.com/TryGhost/Team/issues/1915
This commit is contained in:
Sanne de Vries 2022-09-16 14:59:29 +01:00
parent be45d4ebcf
commit a077d4393f
5 changed files with 98 additions and 70 deletions

View file

@ -66,43 +66,47 @@
{{/if}}
</span>
</p>
<p class="gh-content-entry-status">
{{#if @post.isScheduled}}
<span class="scheduled" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
Scheduled
{{#if this.isStateHovered}}
<span class="schedule-details" {{css-transition "anim-fade-in-scale"}}>- to be published {{if @post.newsletter "and sent "}}{{this.scheduledText}} to {{humanize-recipient-filter @post.emailSegment}}</span>
{{/if}}
</span>
{{/if}}
{{#if (not-eq this.settings.membersSignupAccess "none")}}
<p class="gh-content-entry-status">
{{#if @post.isScheduled}}
<span class="scheduled" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
<span class="status-dot"></span>
Scheduled
{{#if this.isStateHovered}}
<span class="schedule-details" {{css-transition "anim-fade-in-scale"}}>- to be published {{if @post.newsletter "and sent "}}{{this.scheduledText}} to {{humanize-recipient-filter @post.emailSegment}}</span>
{{/if}}
</span>
{{/if}}
{{#if @post.isDraft}}
<span class="draft">
Draft
</span>
{{/if}}
{{#if @post.isDraft}}
<span class="draft">
<span class="status-dot"></span>
Draft
</span>
{{/if}}
{{#if @post.isPublished}}
<span class="published" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
Published
{{#if @post.hasEmail}}
and sent
{{#if @post.isPublished}}
<span class="published" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
Published
{{#if @post.hasEmail}}
and sent
{{#if this.isStateHovered}}
<span {{css-transition "anim-fade-in-scale"}}>to 2,467 free subscribers</span>
{{/if}}
{{/if}}
</span>
{{/if}}
{{#if @post.isSent}}
<span class="sent" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
Sent
{{#if this.isStateHovered}}
<span {{css-transition "anim-fade-in-scale"}}>to 2,467 free subscribers</span>
{{/if}}
{{/if}}
</span>
{{/if}}
{{#if @post.isSent}}
<span class="sent" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
Sent
{{#if this.isStateHovered}}
<span {{css-transition "anim-fade-in-scale"}}>to 2,467 free subscribers</span>
{{/if}}
</span>
{{/if}}
</p>
</span>
{{/if}}
</p>
{{/if}}
{{/unless}}
</LinkTo>
{{/if}}
@ -141,18 +145,51 @@
{{/if}}
{{!-- Button column --}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-button">
<div class="flex flex-column items-end">
{{#if (or @post.isSent @post.isPublished)}}
<LinkTo @route="posts.analytics" @model={{@post}} class="gh-post-list-cta stats {{if this.isHovered "is-hovered"}}">
{{svg-jar "stats"}}
</LinkTo>
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data {{if (not-eq this.settings.membersSignupAccess "none") "gh-post-list-button"}}">
{{#if (not-eq this.settings.membersSignupAccess "none")}}
<div class="flex flex-column items-end">
{{#if (or @post.isSent @post.isPublished)}}
<LinkTo @route="posts.analytics" @model={{@post}} class="gh-post-list-cta stats {{if this.isHovered "is-hovered"}}">
{{svg-jar "stats"}}
</LinkTo>
{{else}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}">
{{svg-jar "pen"}}
</LinkTo>
{{/if}}
</div>
{{else}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}">
{{svg-jar "pen"}}
</LinkTo>
<p class="gh-content-entry-status">
{{#if @post.isScheduled}}
<span class="scheduled" data-tooltip="Published {{this.scheduledText}}">
<span class="status-dot"></span>
Scheduled
</span>
{{/if}}
{{#if @post.isDraft}}
<span class="draft">
<span class="status-dot"></span>
Draft
</span>
{{/if}}
{{#if @post.isPublished}}
<span class="published">
Published
{{#if @post.hasEmail}}
and sent
{{/if}}
</span>
{{/if}}
{{#if @post.isSent}}
<span class="sent">
Sent
</span>
{{/if}}
</p>
{{/if}}
</div>
</LinkTo>
</LinkTo>
</li>

View file

@ -146,7 +146,7 @@
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Newsletter tracking</h4>
<h4 class="gh-expandable-title">Newsletter analytics</h4>
<p class="gh-expandable-description">Track how many members are opening emails and clicking links</p>
</div>
<button type="button" class="gh-btn" {{on "click" (toggle-action "newsletterTrackingOpen" this)}} data-test-toggle-membersemail>
@ -159,7 +159,7 @@
<div class="gh-newsletter-tracking">
<div class="gh-newsletter-tracking-row">
<div>
<h4 class="gh-newsletter-tracking-title">Enable open-rate tracking</h4>
<h4 class="gh-newsletter-tracking-title">Track newsletter opens</h4>
</div>
<div class="for-switch">
<label class="switch" data-test-label="email-track-opens">
@ -177,7 +177,7 @@
</div>
<div class="gh-newsletter-tracking-row">
<div>
<h4 class="gh-newsletter-tracking-title">Enable newsletter click tracking</h4>
<h4 class="gh-newsletter-tracking-title">Track newsletter link clicks</h4>
</div>
<div class="for-switch">
<label class="switch" data-test-label="email-track-opens">
@ -200,6 +200,7 @@
</div>
{{else}}
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
@ -221,6 +222,7 @@
</div>
</div>
</div>
{{/if}}
</div>
</section>

View file

@ -1245,10 +1245,6 @@ kbd {
background: var(--whitegrey);
}
.gh-editor-post-status-btn::after {
background: var(--hairline-color-2);
}
/* Empty states */
/* ---------------------------------------------------- */

View file

@ -866,9 +866,7 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
font-weight: 500;
}
.gh-posts-list-item-labs .gh-content-entry-status .draft::before,
.gh-posts-list-item-labs .gh-content-entry-status .scheduled::before {
content: "";
.gh-posts-list-item-labs .gh-content-entry-status .status-dot {
display: inline-block;
width: 6px;
height: 6px;
@ -876,21 +874,27 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
border-radius: 999px;
}
.gh-posts-list-item-labs .gh-content-entry-status .draft::before {
border-color: var(--pink);
background: var(--pink);
}
.gh-posts-list-item-labs .gh-content-entry-status .scheduled::before {
.gh-posts-list-item-labs .gh-content-entry-status .scheduled .status-dot {
border-color: var(--green);
background: var(--green);
}
.gh-posts-list-item-labs .gh-content-entry-status .draft .status-dot {
border-color: var(--pink);
background: var(--pink);
}
.gh-posts-list-item-labs .schedule-details {
margin-left: 3px;
color: var(--midlightgrey-d1);
}
.gh-posts-list-item-labs .schedule-details.absolute {
position: absolute;
transform: translateX(-100%);
min-width: max-content;
}
.gh-content-entry-author,
.gh-content-entry-date {
display: inline-block;

View file

@ -628,17 +628,6 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone {
position: relative;
}
.gh-editor-post-status-btn::after {
position: absolute;
content: "";
display: block;
bottom: 6px;
left: 0;
right: 0;
height: 1px;
background: var(--lightgrey);
}
.gh-editor-save-trigger {
margin-right: 8px;
}