0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36: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,9 +66,11 @@
{{/if}} {{/if}}
</span> </span>
</p> </p>
{{#if (not-eq this.settings.membersSignupAccess "none")}}
<p class="gh-content-entry-status"> <p class="gh-content-entry-status">
{{#if @post.isScheduled}} {{#if @post.isScheduled}}
<span class="scheduled" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}> <span class="scheduled" {{on "mouseover" (fn (mut this.isStateHovered) true)}} {{on "mouseleave" (fn (mut this.isStateHovered) false)}}>
<span class="status-dot"></span>
Scheduled Scheduled
{{#if this.isStateHovered}} {{#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> <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>
@ -78,6 +80,7 @@
{{#if @post.isDraft}} {{#if @post.isDraft}}
<span class="draft"> <span class="draft">
<span class="status-dot"></span>
Draft Draft
</span> </span>
{{/if}} {{/if}}
@ -103,6 +106,7 @@
</span> </span>
{{/if}} {{/if}}
</p> </p>
{{/if}}
{{/unless}} {{/unless}}
</LinkTo> </LinkTo>
{{/if}} {{/if}}
@ -141,7 +145,8 @@
{{/if}} {{/if}}
{{!-- Button column --}} {{!-- Button column --}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-button"> <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"> <div class="flex flex-column items-end">
{{#if (or @post.isSent @post.isPublished)}} {{#if (or @post.isSent @post.isPublished)}}
<LinkTo @route="posts.analytics" @model={{@post}} class="gh-post-list-cta stats {{if this.isHovered "is-hovered"}}"> <LinkTo @route="posts.analytics" @model={{@post}} class="gh-post-list-cta stats {{if this.isHovered "is-hovered"}}">
@ -153,6 +158,38 @@
</LinkTo> </LinkTo>
{{/if}} {{/if}}
</div> </div>
{{else}}
<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}}
</LinkTo> </LinkTo>
</li> </li>

View file

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

View file

@ -1245,10 +1245,6 @@ kbd {
background: var(--whitegrey); background: var(--whitegrey);
} }
.gh-editor-post-status-btn::after {
background: var(--hairline-color-2);
}
/* Empty states */ /* 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; font-weight: 500;
} }
.gh-posts-list-item-labs .gh-content-entry-status .draft::before, .gh-posts-list-item-labs .gh-content-entry-status .status-dot {
.gh-posts-list-item-labs .gh-content-entry-status .scheduled::before {
content: "";
display: inline-block; display: inline-block;
width: 6px; width: 6px;
height: 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; border-radius: 999px;
} }
.gh-posts-list-item-labs .gh-content-entry-status .draft::before { .gh-posts-list-item-labs .gh-content-entry-status .scheduled .status-dot {
border-color: var(--pink);
background: var(--pink);
}
.gh-posts-list-item-labs .gh-content-entry-status .scheduled::before {
border-color: var(--green); border-color: var(--green);
background: 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 { .gh-posts-list-item-labs .schedule-details {
margin-left: 3px; margin-left: 3px;
color: var(--midlightgrey-d1); 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-author,
.gh-content-entry-date { .gh-content-entry-date {
display: inline-block; display: inline-block;

View file

@ -628,17 +628,6 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone {
position: relative; 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 { .gh-editor-save-trigger {
margin-right: 8px; margin-right: 8px;
} }