diff --git a/apps/admin-x-framework/src/api/newsletters.ts b/apps/admin-x-framework/src/api/newsletters.ts index 5f9fdf55d5..6e6bd102ed 100644 --- a/apps/admin-x-framework/src/api/newsletters.ts +++ b/apps/admin-x-framework/src/api/newsletters.ts @@ -21,7 +21,7 @@ export type Newsletter = { show_header_title: boolean; title_font_category: string; title_alignment: string; - show_subhead: boolean; + show_subtitle: boolean; show_feature_image: boolean; body_font_category: string; footer_content: string | null; diff --git a/apps/admin-x-framework/src/test/responses/newsletters.json b/apps/admin-x-framework/src/test/responses/newsletters.json index 49c51b2668..179e57b9f6 100644 --- a/apps/admin-x-framework/src/test/responses/newsletters.json +++ b/apps/admin-x-framework/src/test/responses/newsletters.json @@ -19,7 +19,7 @@ "show_header_title": true, "title_font_category": "serif", "title_alignment": "center", - "show_subhead": true, + "show_subtitle": true, "show_feature_image": true, "body_font_category": "serif", "footer_content": "", diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx index bd7b93315b..139920ac3b 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx @@ -421,10 +421,10 @@ const Sidebar: React.FC<{ {(hasNewsletterSubtitle && newsletter.show_post_title_section) && updateNewsletter({show_subhead: e.target.checked})} + onChange={e => updateNewsletter({show_subtitle: e.target.checked})} /> } = ({newsletter}) => showFeedback={showFeedback} showLatestPosts={newsletter.show_latest_posts} showPostTitleSection={newsletter.show_post_title_section} - showSubhead={newsletter.show_subhead} showSubscriptionDetails={newsletter.show_subscription_details} + showSubtitle={newsletter.show_subtitle} siteTitle={title} titleAlignment={newsletter.title_alignment} titleFontCategory={newsletter.title_font_category} diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx index abf2f490fa..650f22318e 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx @@ -18,7 +18,7 @@ const NewsletterPreviewContent: React.FC<{ headerTitle?: string | null; headerSubtitle?: string | null; showPostTitleSection: boolean; - showSubhead: boolean; + showSubtitle: boolean; titleAlignment?: string; titleFontCategory?: string; bodyFontCategory?: string; @@ -50,7 +50,7 @@ const NewsletterPreviewContent: React.FC<{ headerTitle, headerSubtitle, showPostTitleSection, - showSubhead, + showSubtitle, titleAlignment, titleFontCategory, bodyFontCategory, @@ -134,7 +134,7 @@ const NewsletterPreviewContent: React.FC<{ )} style={{color: titleColor}}> Your email newsletter - {(hasNewsletterSubtitle && showSubhead) && ( + {(hasNewsletterSubtitle && showSubtitle) && (

, "status": "active", @@ -2466,7 +2466,7 @@ exports[`Newsletters API Can't add multiple newsletters with same name 2: [heade Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "891", + "content-length": "892", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2567,8 +2567,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "naughty-newsletter", "sort_order": 3, "status": "active", @@ -2588,7 +2588,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Adding a new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "922", + "content-length": "923", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2627,8 +2627,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "archived-newsletter", "sort_order": 3, "status": "archived", @@ -2648,7 +2648,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Adding an ar Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "926", + "content-length": "927", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2728,8 +2728,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "default-newsletter", "sort_order": 0, "status": "archived", @@ -2749,7 +2749,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Archiving a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "889", + "content-length": "890", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2784,8 +2784,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -2805,7 +2805,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Editing an a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "956", + "content-length": "957", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2840,8 +2840,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -2861,7 +2861,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Editing an a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "958", + "content-length": "959", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2917,7 +2917,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5501", + "content-length": "5507", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2951,8 +2951,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2972,7 +2972,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "945", + "content-length": "946", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3007,8 +3007,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3028,7 +3028,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "945", + "content-length": "946", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3062,8 +3062,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3083,7 +3083,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3118,8 +3118,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3139,7 +3139,7 @@ exports[`Newsletters API Managed email with custom sending domain Can clear send Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "938", + "content-length": "939", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3174,8 +3174,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3195,7 +3195,7 @@ exports[`Newsletters API Managed email with custom sending domain Can keep sende Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "945", + "content-length": "946", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3235,8 +3235,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3256,7 +3256,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "993", + "content-length": "994", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3550,8 +3550,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3571,7 +3571,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "954", + "content-length": "955", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3606,8 +3606,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3627,7 +3627,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3662,8 +3662,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3683,7 +3683,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "938", + "content-length": "939", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3718,8 +3718,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3739,7 +3739,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set sender Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "962", + "content-length": "963", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3877,7 +3877,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5491", + "content-length": "5497", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3911,8 +3911,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3932,7 +3932,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3967,8 +3967,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3988,7 +3988,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "945", + "content-length": "946", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4078,8 +4078,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4099,7 +4099,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4133,8 +4133,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4154,7 +4154,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "925", + "content-length": "926", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4194,8 +4194,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4215,7 +4215,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "983", + "content-length": "984", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4255,8 +4255,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4276,7 +4276,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "983", + "content-length": "984", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4365,8 +4365,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4386,7 +4386,7 @@ exports[`Newsletters API Managed email without custom sending domain Can clear s Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "928", + "content-length": "929", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4421,8 +4421,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4442,7 +4442,7 @@ exports[`Newsletters API Managed email without custom sending domain Can keep se Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4592,8 +4592,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4613,7 +4613,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "983", + "content-length": "984", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4852,8 +4852,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4873,7 +4873,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "925", + "content-length": "926", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4908,8 +4908,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4929,7 +4929,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "928", + "content-length": "929", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4964,8 +4964,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4985,7 +4985,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5020,8 +5020,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5041,7 +5041,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set sen Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "943", + "content-length": "944", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5200,8 +5200,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5221,7 +5221,7 @@ exports[`Newsletters API Self hoster without managed email Can change sender_ema Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "954", + "content-length": "955", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5256,8 +5256,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5277,7 +5277,7 @@ exports[`Newsletters API Self hoster without managed email Can clear sender_emai Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "942", + "content-length": "943", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5367,8 +5367,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5388,7 +5388,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "942", + "content-length": "943", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5423,8 +5423,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5444,7 +5444,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "936", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5479,8 +5479,8 @@ Object { "show_header_title": true, "show_latest_posts": false, "show_post_title_section": true, - "show_subhead": false, "show_subscription_details": false, + "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5500,7 +5500,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "938", + "content-length": "939", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/unit/server/data/schema/integrity.test.js b/ghost/core/test/unit/server/data/schema/integrity.test.js index dfd2f8625a..a805052d8f 100644 --- a/ghost/core/test/unit/server/data/schema/integrity.test.js +++ b/ghost/core/test/unit/server/data/schema/integrity.test.js @@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route */ describe('DB version integrity', function () { // Only these variables should need updating - const currentSchemaHash = 'd861a9b5a0a061b1f45f417d93029461'; + const currentSchemaHash = '8e52be4cf84cae82a406e5a153ecbd43'; const currentFixturesHash = 'a489d615989eab1023d4b8af0ecee7fd'; const currentSettingsHash = '5c957ceb48c4878767d7d3db484c592d'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; diff --git a/ghost/email-service/lib/EmailRenderer.js b/ghost/email-service/lib/EmailRenderer.js index e83bb386f5..b7682dc896 100644 --- a/ghost/email-service/lib/EmailRenderer.js +++ b/ghost/email-service/lib/EmailRenderer.js @@ -1046,7 +1046,7 @@ class EmailRenderer { newsletter: { name: newsletter.get('name'), showPostTitleSection: newsletter.get('show_post_title_section'), - showSubhead: newsletter.get('show_subhead'), + showSubtitle: newsletter.get('show_subtitle'), showCommentCta: newsletter.get('show_comment_cta') && this.#settingsCache.get('comments_enabled') !== 'off' && !hasEmailOnlyFlag, showSubscriptionDetails: newsletter.get('show_subscription_details') }, diff --git a/ghost/email-service/lib/email-templates/template-old.hbs b/ghost/email-service/lib/email-templates/template-old.hbs index 083c44785a..074e8442e4 100644 --- a/ghost/email-service/lib/email-templates/template-old.hbs +++ b/ghost/email-service/lib/email-templates/template-old.hbs @@ -80,7 +80,7 @@ {{#hasFeature 'newsletterSubtitle'}} - {{#if (and newsletter.showSubhead post.customExcerpt)}} + {{#if (and newsletter.showSubtitle post.customExcerpt)}}

{{post.customExcerpt}}

diff --git a/ghost/email-service/test/email-renderer.test.js b/ghost/email-service/test/email-renderer.test.js index 78ec113d58..7534d7b413 100644 --- a/ghost/email-service/test/email-renderer.test.js +++ b/ghost/email-service/test/email-renderer.test.js @@ -1780,7 +1780,7 @@ describe('Email renderer', function () { const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is a subtitle'})); const newsletter = createModel({ show_post_title_section: true, - show_subhead: true + show_subtitle: true }); const segment = null; const options = {}; @@ -1801,7 +1801,7 @@ describe('Email renderer', function () { const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is a subtitle'})); const newsletter = createModel({ show_post_title_section: true, - show_subhead: false + show_subtitle: false }); const segment = null; const options = {}; @@ -1823,7 +1823,7 @@ describe('Email renderer', function () { const post = createModel(Object.assign({}, basePost, {custom_excerpt: null})); const newsletter = createModel({ show_post_title_section: true, - show_subhead: true + show_subtitle: true }); const segment = null; const options = {};