ghost 5.45.1 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.46.0.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.46.0.tgz +0 -0
  3. package/components/{tryghost-adapter-manager-5.45.1.tgz → tryghost-adapter-manager-5.46.0.tgz} +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.46.0.tgz +0 -0
  5. package/components/tryghost-api-framework-5.46.0.tgz +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.46.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.46.0.tgz +0 -0
  8. package/components/tryghost-bootstrap-socket-5.46.0.tgz +0 -0
  9. package/components/tryghost-constants-5.46.0.tgz +0 -0
  10. package/components/{tryghost-custom-theme-settings-service-5.45.1.tgz → tryghost-custom-theme-settings-service-5.46.0.tgz} +0 -0
  11. package/components/{tryghost-data-generator-5.45.1.tgz → tryghost-data-generator-5.46.0.tgz} +0 -0
  12. package/components/tryghost-domain-events-5.46.0.tgz +0 -0
  13. package/components/tryghost-dynamic-routing-events-5.46.0.tgz +0 -0
  14. package/components/{tryghost-email-analytics-provider-mailgun-5.45.1.tgz → tryghost-email-analytics-provider-mailgun-5.46.0.tgz} +0 -0
  15. package/components/tryghost-email-analytics-service-5.46.0.tgz +0 -0
  16. package/components/tryghost-email-content-generator-5.46.0.tgz +0 -0
  17. package/components/{tryghost-email-events-5.45.1.tgz → tryghost-email-events-5.46.0.tgz} +0 -0
  18. package/components/{tryghost-email-service-5.45.1.tgz → tryghost-email-service-5.46.0.tgz} +0 -0
  19. package/components/tryghost-email-suppression-list-5.46.0.tgz +0 -0
  20. package/components/tryghost-event-aware-cache-wrapper-5.46.0.tgz +0 -0
  21. package/components/{tryghost-express-dynamic-redirects-5.45.1.tgz → tryghost-express-dynamic-redirects-5.46.0.tgz} +0 -0
  22. package/components/tryghost-external-media-inliner-5.46.0.tgz +0 -0
  23. package/components/tryghost-extract-api-key-5.46.0.tgz +0 -0
  24. package/components/tryghost-html-to-plaintext-5.46.0.tgz +0 -0
  25. package/components/tryghost-i18n-5.46.0.tgz +0 -0
  26. package/components/{tryghost-importer-handler-content-files-5.45.1.tgz → tryghost-importer-handler-content-files-5.46.0.tgz} +0 -0
  27. package/components/{tryghost-importer-revue-5.45.1.tgz → tryghost-importer-revue-5.46.0.tgz} +0 -0
  28. package/components/{tryghost-job-manager-5.45.1.tgz → tryghost-job-manager-5.46.0.tgz} +0 -0
  29. package/components/tryghost-link-redirects-5.46.0.tgz +0 -0
  30. package/components/tryghost-link-replacer-5.46.0.tgz +0 -0
  31. package/components/{tryghost-link-tracking-5.45.1.tgz → tryghost-link-tracking-5.46.0.tgz} +0 -0
  32. package/components/{tryghost-magic-link-5.45.1.tgz → tryghost-magic-link-5.46.0.tgz} +0 -0
  33. package/components/tryghost-mailgun-client-5.46.0.tgz +0 -0
  34. package/components/{tryghost-member-attribution-5.45.1.tgz → tryghost-member-attribution-5.46.0.tgz} +0 -0
  35. package/components/tryghost-member-events-5.46.0.tgz +0 -0
  36. package/components/{tryghost-members-api-5.45.1.tgz → tryghost-members-api-5.46.0.tgz} +0 -0
  37. package/components/tryghost-members-csv-5.46.0.tgz +0 -0
  38. package/components/tryghost-members-events-service-5.46.0.tgz +0 -0
  39. package/components/tryghost-members-importer-5.46.0.tgz +0 -0
  40. package/components/tryghost-members-offers-5.46.0.tgz +0 -0
  41. package/components/tryghost-members-payments-5.46.0.tgz +0 -0
  42. package/components/{tryghost-members-ssr-5.45.1.tgz → tryghost-members-ssr-5.46.0.tgz} +0 -0
  43. package/components/tryghost-members-stripe-service-5.46.0.tgz +0 -0
  44. package/components/{tryghost-mentions-email-report-5.45.1.tgz → tryghost-mentions-email-report-5.46.0.tgz} +0 -0
  45. package/components/tryghost-milestones-5.46.0.tgz +0 -0
  46. package/components/tryghost-minifier-5.46.0.tgz +0 -0
  47. package/components/tryghost-mw-api-version-mismatch-5.46.0.tgz +0 -0
  48. package/components/tryghost-mw-cache-control-5.46.0.tgz +0 -0
  49. package/components/tryghost-mw-error-handler-5.46.0.tgz +0 -0
  50. package/components/tryghost-mw-session-from-token-5.46.0.tgz +0 -0
  51. package/components/tryghost-mw-update-user-last-seen-5.46.0.tgz +0 -0
  52. package/components/tryghost-mw-version-match-5.46.0.tgz +0 -0
  53. package/components/tryghost-mw-vhost-5.46.0.tgz +0 -0
  54. package/components/tryghost-oembed-service-5.46.0.tgz +0 -0
  55. package/components/tryghost-package-json-5.46.0.tgz +0 -0
  56. package/components/{tryghost-post-revisions-5.45.1.tgz → tryghost-post-revisions-5.46.0.tgz} +0 -0
  57. package/components/tryghost-posts-service-5.46.0.tgz +0 -0
  58. package/components/tryghost-referrers-5.46.0.tgz +0 -0
  59. package/components/tryghost-security-5.46.0.tgz +0 -0
  60. package/components/{tryghost-session-service-5.45.1.tgz → tryghost-session-service-5.46.0.tgz} +0 -0
  61. package/components/tryghost-settings-path-manager-5.46.0.tgz +0 -0
  62. package/components/{tryghost-slack-notifications-5.45.1.tgz → tryghost-slack-notifications-5.46.0.tgz} +0 -0
  63. package/components/{tryghost-staff-service-5.45.1.tgz → tryghost-staff-service-5.46.0.tgz} +0 -0
  64. package/components/{tryghost-stats-service-5.45.1.tgz → tryghost-stats-service-5.46.0.tgz} +0 -0
  65. package/components/{tryghost-tiers-5.45.1.tgz → tryghost-tiers-5.46.0.tgz} +0 -0
  66. package/components/{tryghost-update-check-service-5.45.1.tgz → tryghost-update-check-service-5.46.0.tgz} +0 -0
  67. package/components/tryghost-verification-trigger-5.46.0.tgz +0 -0
  68. package/components/tryghost-version-notifications-data-service-5.46.0.tgz +0 -0
  69. package/components/{tryghost-webmentions-5.45.1.tgz → tryghost-webmentions-5.46.0.tgz} +0 -0
  70. package/core/built/admin/assets/{chunk.143.afd70591b785986367e5.js → chunk.143.eb5b2f48c7cdf62400d4.js} +5 -5
  71. package/core/built/admin/assets/{chunk.178.1c7d65593f4d77661972.js → chunk.178.2d0be6bf932cdb53766e.js} +4 -4
  72. package/core/built/admin/assets/{chunk.11.28a4582ffea7775d1149.js → chunk.604.e25172fcbbcc8ddcbdec.js} +627 -549
  73. package/core/built/admin/assets/{ghost-633127f675df595939422571208d611b.js → ghost-2e3d55ca4212a50f87aba88c26b55945.js} +27 -27
  74. package/core/built/admin/assets/{ghost-e778914ab060392435c4dd1c684ff04f.css → ghost-c3187d2bb18193c111d376a110c8c80d.css} +1 -1
  75. package/core/built/admin/assets/{ghost-dark-82ef602f56be4d1145c77432528959f8.css → ghost-dark-4948d897bf814756a3870ef564ba6a6d.css} +1 -1
  76. package/core/built/admin/assets/{vendor-62102dd36895b3dda3daa14883f2d2ec.js → vendor-e3de790ee48087482d42c1686d5fefd9.js} +6 -6
  77. package/core/built/admin/index.html +6 -6
  78. package/core/frontend/helpers/ghost_head.js +25 -7
  79. package/core/frontend/public/ghost.min.css +1 -1
  80. package/core/server/api/endpoints/announcements.js +12 -0
  81. package/core/server/api/endpoints/index.js +5 -1
  82. package/core/server/api/endpoints/settings-public.js +2 -10
  83. package/core/server/api/endpoints/utils/serializers/output/pages.js +11 -1
  84. package/core/server/api/endpoints/utils/serializers/output/posts.js +11 -1
  85. package/core/server/api/endpoints/utils/validators/input/settings.js +4 -4
  86. package/core/server/web/announcement/index.js +1 -0
  87. package/core/server/web/announcement/routes.js +15 -0
  88. package/core/server/web/members/app.js +9 -0
  89. package/core/shared/config/defaults.json +2 -2
  90. package/core/shared/labs.js +2 -2
  91. package/package.json +133 -133
  92. package/yarn.lock +185 -179
  93. package/components/tryghost-adapter-cache-memory-ttl-5.45.1.tgz +0 -0
  94. package/components/tryghost-adapter-cache-redis-5.45.1.tgz +0 -0
  95. package/components/tryghost-announcement-bar-settings-5.45.1.tgz +0 -0
  96. package/components/tryghost-api-framework-5.45.1.tgz +0 -0
  97. package/components/tryghost-api-version-compatibility-service-5.45.1.tgz +0 -0
  98. package/components/tryghost-audience-feedback-5.45.1.tgz +0 -0
  99. package/components/tryghost-bootstrap-socket-5.45.1.tgz +0 -0
  100. package/components/tryghost-constants-5.45.1.tgz +0 -0
  101. package/components/tryghost-domain-events-5.45.1.tgz +0 -0
  102. package/components/tryghost-dynamic-routing-events-5.45.1.tgz +0 -0
  103. package/components/tryghost-email-analytics-service-5.45.1.tgz +0 -0
  104. package/components/tryghost-email-content-generator-5.45.1.tgz +0 -0
  105. package/components/tryghost-email-suppression-list-5.45.1.tgz +0 -0
  106. package/components/tryghost-event-aware-cache-wrapper-5.45.1.tgz +0 -0
  107. package/components/tryghost-external-media-inliner-5.45.1.tgz +0 -0
  108. package/components/tryghost-extract-api-key-5.45.1.tgz +0 -0
  109. package/components/tryghost-html-to-plaintext-5.45.1.tgz +0 -0
  110. package/components/tryghost-i18n-5.45.1.tgz +0 -0
  111. package/components/tryghost-link-redirects-5.45.1.tgz +0 -0
  112. package/components/tryghost-link-replacer-5.45.1.tgz +0 -0
  113. package/components/tryghost-mailgun-client-5.45.1.tgz +0 -0
  114. package/components/tryghost-member-events-5.45.1.tgz +0 -0
  115. package/components/tryghost-members-csv-5.45.1.tgz +0 -0
  116. package/components/tryghost-members-events-service-5.45.1.tgz +0 -0
  117. package/components/tryghost-members-importer-5.45.1.tgz +0 -0
  118. package/components/tryghost-members-offers-5.45.1.tgz +0 -0
  119. package/components/tryghost-members-payments-5.45.1.tgz +0 -0
  120. package/components/tryghost-members-stripe-service-5.45.1.tgz +0 -0
  121. package/components/tryghost-milestones-5.45.1.tgz +0 -0
  122. package/components/tryghost-minifier-5.45.1.tgz +0 -0
  123. package/components/tryghost-mw-api-version-mismatch-5.45.1.tgz +0 -0
  124. package/components/tryghost-mw-cache-control-5.45.1.tgz +0 -0
  125. package/components/tryghost-mw-error-handler-5.45.1.tgz +0 -0
  126. package/components/tryghost-mw-session-from-token-5.45.1.tgz +0 -0
  127. package/components/tryghost-mw-update-user-last-seen-5.45.1.tgz +0 -0
  128. package/components/tryghost-mw-version-match-5.45.1.tgz +0 -0
  129. package/components/tryghost-mw-vhost-5.45.1.tgz +0 -0
  130. package/components/tryghost-oembed-service-5.45.1.tgz +0 -0
  131. package/components/tryghost-package-json-5.45.1.tgz +0 -0
  132. package/components/tryghost-posts-service-5.45.1.tgz +0 -0
  133. package/components/tryghost-referrers-5.45.1.tgz +0 -0
  134. package/components/tryghost-security-5.45.1.tgz +0 -0
  135. package/components/tryghost-settings-path-manager-5.45.1.tgz +0 -0
  136. package/components/tryghost-verification-trigger-5.45.1.tgz +0 -0
  137. package/components/tryghost-version-notifications-data-service-5.45.1.tgz +0 -0
  138. /package/core/built/admin/assets/{chunk.11.28a4582ffea7775d1149.js.LICENSE.txt → chunk.604.e25172fcbbcc8ddcbdec.js.LICENSE.txt} +0 -0
@@ -9105,7 +9105,7 @@ return e.__sentryEmberConfig=e.__sentryEmberConfig??{},e.__sentryEmberConfig}()
9105
9105
  Object.assign(o,i),t.init(i)}e.InitSentryForEmber=i,e.instrumentRoutePerformance=e.init=e.getActiveTransaction=void 0,Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(n,r)||r in e&&e[r]===t[r]||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}}))}))
9106
9106
  const o=()=>t.getCurrentHub()?.getScope()?.getTransaction()
9107
9107
  e.getActiveTransaction=o
9108
- e.instrumentRoutePerformance=e=>{const t=async(e,t,n,i)=>{const a=(0,r.timestampWithMs)(),s=await n(...i),l=o()
9108
+ e.instrumentRoutePerformance=e=>{const t=async(e,t,n,i)=>{const a=(0,r.timestampInSeconds)(),s=await n(...i),l=o()
9109
9109
  return l?(l.startChild({op:e,description:t,startTimestamp:a}).finish(),s):s}
9110
9110
  return{[e.name]:class extends e{beforeModel(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n]
9111
9111
  return t("ui.ember.route.before_model",this.fullRouteName,super.beforeModel.bind(this),r)}async model(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n]
@@ -9129,10 +9129,10 @@ if(i&&u){const t=e.recognize(u)
9129
9129
  s=n({name:`route:${t.name}`,op:"pageload",tags:{url:u,toRoute:t.name,"routing.instrumentation":"@sentry/ember"}})}const c=function(e,t){t||(s.finish(),a().off("end",c))}
9130
9130
  return e.on("routeWillChange",(t=>{const{fromRoute:r,toRoute:i}=function(e,t){const r=e?.from?.name
9131
9131
  return{fromRoute:r,toRoute:e&&e.to?e.to.name:t.currentRouteName}}(t,e)
9132
- s?.finish(),s=n({name:`route:${i}`,op:"navigation",tags:{fromRoute:r,toRoute:i,"routing.instrumentation":"@sentry/ember"}}),l=s.startChild({op:"ui.ember.transition",description:`route:${r} -> route:${i}`})})),e.on("routeDidChange",(()=>{l&&s&&(l.finish(),o?s.finish():a().on("end",c))})),{startTransaction:n}}function l(e,t){const r={payload:e,now:(0,n.timestampWithMs)()}
9132
+ s?.finish(),s=n({name:`route:${i}`,op:"navigation",tags:{fromRoute:r,toRoute:i,"routing.instrumentation":"@sentry/ember"}}),l=s.startChild({op:"ui.ember.transition",description:`route:${r} -> route:${i}`})})),e.on("routeDidChange",(()=>{l&&s&&(l.finish(),o?s.finish():a().on("end",c))})),{startTransaction:n}}function l(e,t){const r={payload:e,now:(0,n.timestampInSeconds)()}
9133
9133
  t[e.object]=r}function u(e,t,i,o){const a=t[e.object]
9134
9134
  if(!a)return
9135
- const s=(0,n.timestampWithMs)()
9135
+ const s=(0,n.timestampInSeconds)()
9136
9136
  if(1e3*(s-a.now)>=o){const t=(0,r.getActiveTransaction)()
9137
9137
  t?.startChild({op:i,description:e.containerKey||e.object,startTimestamp:a.now,endTimestamp:s})}}function c(e){const t="@sentry/ember:initial-load-start",i="@sentry/ember:initial-load-end"
9138
9138
  let{HAS_PERFORMANCE:o,HAS_PERFORMANCE_TIMING:a}=function(){const e=window.performance,t=Boolean(e&&e.clearMarks&&e.clearMeasures),r=Boolean(e.measure&&e.getEntriesByName&&void 0!==n.browserPerformanceTimeOrigin)
@@ -9154,8 +9154,8 @@ let o,s
9154
9154
  const l=["actions","routerTransitions","render","afterRender","destroy"]
9155
9155
  a().on("begin",((e,t)=>{if(t)return
9156
9156
  const a=(0,r.getActiveTransaction)()
9157
- a&&(s&&s.finish(),o=(0,n.timestampWithMs)(),l.forEach((e=>{Ember.run.scheduleOnce(e,null,(()=>{Ember.run.scheduleOnce(e,null,(()=>{if(o){const t=(0,n.timestampWithMs)()
9158
- 1e3*(t-o)>=(i??5)&&a?.startChild({op:`ui.ember.runloop.${e}`,startTimestamp:o,endTimestamp:t}).finish(),o=void 0}(0,r.getActiveTransaction)()&&(o=(0,n.timestampWithMs)())}))}))})))})),a().on("end",((e,t)=>{t||s&&(s.finish(),s=void 0)}))}(o),function(e){const{disableInstrumentComponents:t,minimumComponentRenderDuration:r,enableComponentDefinitions:n}=e
9157
+ a&&(s&&s.finish(),o=(0,n.timestampInSeconds)(),l.forEach((e=>{Ember.run.scheduleOnce(e,null,(()=>{Ember.run.scheduleOnce(e,null,(()=>{if(o){const t=(0,n.timestampInSeconds)()
9158
+ 1e3*(t-o)>=(i??5)&&a?.startChild({op:`ui.ember.runloop.${e}`,startTimestamp:o,endTimestamp:t}).finish(),o=void 0}(0,r.getActiveTransaction)()&&(o=(0,n.timestampInSeconds)())}))}))})))})),a().on("end",((e,t)=>{t||s&&(s.finish(),s=void 0)}))}(o),function(e){const{disableInstrumentComponents:t,minimumComponentRenderDuration:r,enableComponentDefinitions:n}=e
9159
9159
  if(t)return
9160
9160
  const i=r??2,o={},a={}
9161
9161
  Ember.Instrumentation.subscribe("render.component",{before(e,t,r){l(r,o)},after(e,t,r,n){u(r,o,"ui.ember.component.render",i)}}),n&&Ember.Instrumentation.subscribe("render.getComponentDefinition",{before(e,t,r){l(r,a)},after(e,t,r,n){u(r,a,"ui.ember.component.definition",0)}})}(o),c(o)}Object.defineProperty(e,"__esModule",{value:!0}),e._instrumentEmberRouter=s,e.default=void 0,e.initialize=o,e.instrumentForPerformance=d
@@ -14082,4 +14082,4 @@ return void 0===n&&(n=(0,t.createStorage)(null,(()=>!1)),r.set(e,n)),n}dirtyStor
14082
14082
  r&&(0,t.setValue)(r,null)}constructor(e){o(this,"storages",new WeakMap),o(this,"vals",void 0),this.vals=new WeakSet(e)}has(e){return(0,t.getValue)(this.storageFor(e)),this.vals.has(e)}add(e){return this.vals.add(e),this.dirtyStorageFor(e),this}delete(e){return this.dirtyStorageFor(e),this.vals.delete(e)}get[i](){return this.vals[Symbol.toStringTag]}}e.TrackedWeakSet=s,Object.setPrototypeOf(s.prototype,WeakSet.prototype)})),define("tracked-built-ins/index",["exports","tracked-built-ins/-private/decorator","tracked-built-ins/-private/array","tracked-built-ins/-private/object","tracked-built-ins/-private/map","tracked-built-ins/-private/set"],(function(e,t,r,n,i,o){"use strict"
14083
14083
  Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TrackedArray",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"TrackedMap",{enumerable:!0,get:function(){return i.TrackedMap}}),Object.defineProperty(e,"TrackedObject",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"TrackedSet",{enumerable:!0,get:function(){return o.TrackedSet}}),Object.defineProperty(e,"TrackedWeakMap",{enumerable:!0,get:function(){return i.TrackedWeakMap}}),Object.defineProperty(e,"TrackedWeakSet",{enumerable:!0,get:function(){return o.TrackedWeakSet}}),Object.defineProperty(e,"tracked",{enumerable:!0,get:function(){return t.default}})}))
14084
14084
 
14085
- //# sourceMappingURL=vendor-62102dd36895b3dda3daa14883f2d2ec.map
14085
+ //# sourceMappingURL=vendor-e3de790ee48087482d42c1686d5fefd9.map
@@ -8,7 +8,7 @@
8
8
  <title>Ghost Admin</title>
9
9
 
10
10
 
11
- <meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.45%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22ember-websockets%22%3A%7B%22socketIO%22%3Atrue%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />
11
+ <meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.46%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22ember-websockets%22%3A%7B%22socketIO%22%3Atrue%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />
12
12
 
13
13
  <meta name="HandheldFriendly" content="True" />
14
14
  <meta name="MobileOptimized" content="320" />
@@ -37,7 +37,7 @@
37
37
  </style>
38
38
 
39
39
  <link integrity="" rel="stylesheet" href="assets/vendor-3e6947aa681f0fb82b193090e520dc73.css">
40
- <link integrity="" rel="stylesheet" href="assets/ghost-e778914ab060392435c4dd1c684ff04f.css" title="light">
40
+ <link integrity="" rel="stylesheet" href="assets/ghost-c3187d2bb18193c111d376a110c8c80d.css" title="light">
41
41
 
42
42
 
43
43
  </head>
@@ -56,9 +56,9 @@
56
56
 
57
57
  <div id="ember-basic-dropdown-wormhole"></div>
58
58
 
59
- <script src="assets/vendor-62102dd36895b3dda3daa14883f2d2ec.js"></script>
60
- <script src="assets/chunk.11.28a4582ffea7775d1149.js"></script>
61
- <script src="assets/chunk.143.afd70591b785986367e5.js"></script>
62
- <script src="assets/ghost-633127f675df595939422571208d611b.js"></script>
59
+ <script src="assets/vendor-e3de790ee48087482d42c1686d5fefd9.js"></script>
60
+ <script src="assets/chunk.604.e25172fcbbcc8ddcbdec.js"></script>
61
+ <script src="assets/chunk.143.eb5b2f48c7cdf62400d4.js"></script>
62
+ <script src="assets/ghost-2e3d55ca4212a50f87aba88c26b55945.js"></script>
63
63
  </body>
64
64
  </html>
@@ -87,17 +87,35 @@ function getSearchHelper(frontendKey) {
87
87
  return helper;
88
88
  }
89
89
 
90
- function getAnnouncementBarHelper(frontendKey) {
91
- if (!settingsCache.get('announcement_content')) {
90
+ function getAnnouncementBarHelper(data) {
91
+ const preview = data?.site?._preview;
92
+
93
+ if (!settingsCache.get('announcement_content') && !preview) {
92
94
  return '';
93
95
  }
94
- const adminUrl = urlUtils.getAdminUrl() || urlUtils.getSiteUrl();
96
+
95
97
  const {scriptUrl} = getFrontendAppConfig('announcementBar');
98
+ const siteUrl = urlUtils.getSiteUrl();
99
+ const announcementUrl = new URL('members/api/announcement/', siteUrl);
96
100
  const attrs = {
97
- key: frontendKey,
98
- 'announcement-bar': adminUrl,
99
- api: urlUtils.urlFor('api', {type: 'content'}, true)
101
+ 'announcement-bar': siteUrl,
102
+ 'api-url': announcementUrl
100
103
  };
104
+
105
+ if (preview) {
106
+ const searchParam = new URLSearchParams(preview);
107
+ const announcement = searchParam.get('announcement');
108
+ const announcementBackground = searchParam.has('announcement_bg') ? searchParam.get('announcement_bg') : '';
109
+ const announcementVisibility = searchParam.has('announcement_vis');
110
+
111
+ if (!announcement || !announcementVisibility) {
112
+ return;
113
+ }
114
+ attrs.announcement = escapeExpression(announcement);
115
+ attrs['announcement-background'] = escapeExpression(announcementBackground);
116
+ attrs.preview = true;
117
+ }
118
+
101
119
  const dataAttrs = getDataAttributes(attrs);
102
120
  let helper = `<script defer src="${scriptUrl}" ${dataAttrs} crossorigin="anonymous"></script>`;
103
121
 
@@ -247,7 +265,7 @@ module.exports = async function ghost_head(options) { // eslint-disable-line cam
247
265
  if (!_.includes(context, 'amp')) {
248
266
  head.push(getMembersHelper(options.data, frontendKey));
249
267
  head.push(getSearchHelper(frontendKey));
250
- head.push(getAnnouncementBarHelper(frontendKey));
268
+ head.push(getAnnouncementBarHelper(options.data));
251
269
  try {
252
270
  head.push(getWebmentionDiscoveryLink());
253
271
  } catch (err) {
@@ -1 +1 @@
1
- /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.black{color:#15171a}.darkgrey{color:#394047}.midgrey{color:#7c8b9a}.lightgrey{color:#ced4d9}.blue{color:#14b8ff}.red{color:#f50b23}.orange{color:#ffb41f}.green{color:#30cf43}.darkgrey-hover:hover{color:#394047}.midgrey-hover:hover{color:#7c8b9a}.lightgrey-hover:hover{color:#ced4d9}.blue-hover:hover{color:#14b8ff}.red-hover:hover{color:#f50b23}.orange-hover:hover{color:#ffb41f}.green-hover:hover{color:#30cf43}*,:after,:before{box-sizing:border-box}html{overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:62.5%;line-height:1.65;letter-spacing:.2px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body,html{width:100%;height:100%}body{overflow:auto;overflow-x:hidden;color:#343f44;font-size:1.4rem}.gh-view{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}h1,h2{margin:0 0 .3em;color:#343f44;line-height:1.15em;text-rendering:optimizeLegibility;text-indent:-1px;font-size:2.9rem}@media (max-width:500px){h1{font-size:2.4rem}}.gh-input{display:block;padding:10px 12px;width:100%;height:40px;border:1px solid #d6e3eb;border-radius:4px;color:#4b5b62;font-size:1.6rem;line-height:1em;font-weight:300;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;transition:border-color .15s linear;-webkit-appearance:none}.gh-input:focus{outline:0;border-color:#b4cbda}.gh-btn{display:inline-block;outline:none;border:1px solid #d6e3eb;color:#829aa8;text-decoration:none!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#829aa8;border-radius:5px;transition:all .2s ease;-webkit-font-smoothing:subpixel-antialiased}.gh-btn span{display:block;padding:0 12px;height:33px;font-size:1.3rem;line-height:33px;font-weight:400;text-align:center;letter-spacing:.2px;border-radius:4px}.gh-btn:hover{border-color:#b4cbda}.gh-btn-hover-blue:hover{border-color:#3eb0ef;color:#3eb0ef}.gh-btn-blue{padding:1px;border:0;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.1);fill:#fff;background:linear-gradient(#3da1d6,#2288bf);box-shadow:0 1px 0 rgba(0,0,0,.12);transition:none!important}.gh-btn-blue span{background:linear-gradient(#4ab6f0,#2fa5e4 60%,#2fa5e4 90%,#38a9e5);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.gh-btn-blue:active,.gh-btn-blue:focus{background:#1e78a9}.gh-btn-blue:active span,.gh-btn-blue:focus span{background:#29a0e0;box-shadow:none}.gh-btn-block{display:block;width:100%}.gh-input-icon{position:relative;display:block}.gh-input-icon svg{position:absolute;top:50%;left:10px;z-index:2;height:14px;width:auto;fill:color(var(--midgrey) l(15%));transform:translateY(-7px)}.gh-input-icon input{padding-left:35px}.gh-app{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;height:100%}.gh-viewport{overflow:hidden;max-height:100%}.gh-main,.gh-viewport{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex}.gh-main{position:relative;background:#fff;overflow-y:auto}.gh-flow{overflow-y:auto;min-height:100%;background:linear-gradient(315deg,#efefef,#fff)}.gh-flow,.gh-flow-content-wrap{flex-grow:1;display:flex;flex-direction:column}.gh-flow-content-wrap{flex-shrink:0;justify-content:center;align-items:center;margin:0 24px;padding-bottom:8vh}.gh-flow-content-wrap .site-icon{width:70px;height:70px;border-radius:3px}.gh-flow-content{display:flex;flex-direction:column;max-width:520px;width:100%;margin:4rem 0 6rem;padding:40px;background:#fff;color:var(--darkgrey);font-size:1.9rem;line-height:1.5em;font-weight:300;border-radius:3px;box-shadow:0 2.8px 2.2px rgba(0,0,0,.02),0 6.7px 5.3px rgba(0,0,0,.02),0 12.5px 10px rgba(0,0,0,.02),0 22.3px 17.9px rgba(0,0,0,.03),0 41.8px 33.4px rgba(0,0,0,.03),0 100px 80px rgba(0,0,0,.05)}.gh-flow-content.unsubscribe{align-items:center;justify-content:center;max-width:560px;min-height:200px;margin:4rem 0;text-align:center}@media (max-width:500px){.gh-flow-content{padding:0;background:transparent;box-shadow:none}}.gh-flow-content header{display:flex;flex-direction:column;align-items:center}.gh-flow-content h1{margin-bottom:24px;color:#15171a;font-size:4.1rem;font-weight:700;line-height:1.15em}.gh-flow-content.unsubscribe h1{font-size:3.2rem}@media (max-width:600px){.gh-flow-content.unsubscribe h1,.gh-flow-content h1{font-size:6vw}}.gh-flow-content.unsubscribe p{margin:0 0 .4em;color:#394047;font-size:1.8rem}@media (max-width:500px){.gh-flow-content.unsubscribe p{font-size:1.6rem;line-height:1.5}}.gh-flow-content .gh-btn{display:block;margin:20px auto 0;max-width:400px}.gh-flow-content .form-group{position:relative;margin-bottom:2.5rem}.gh-flow-content .form-group.error .gh-input{border-color:#f50b23;box-shadow:0 0 0 3px rgba(239,24,24,.15)}.gh-flow-content .main-error{position:absolute;right:0;margin:0;color:#7c8b9a;font-size:1.35rem;font-weight:400;text-align:center;user-select:text}.gh-flow-em{font-weight:500}.unsubscribe-footer{text-align:center;font-size:1.5rem}@media (max-width:500px){.unsubscribe-footer{padding:0 24px;font-size:1.4rem;line-height:1.4em}}.unsubscribe-footer p{color:#7c8b9a;margin:0 0 .4rem}.unsubscribe-footer a{color:#15171a;text-decoration:none}.unsubscribe-footer a:hover{text-decoration:underline}.gh-signin{margin-bottom:1.5rem}.gh-signin .gh-input,.gh-signin .gh-input:-webkit-autofill:first-line{height:54px;padding:12px 16px;font-size:1.8rem;border-radius:8px}.gh-signin .gh-input::placeholder{color:#abb4be;font-weight:400;opacity:1}.gh-signin .gh-input::-webkit-input-placeholder{color:#abb4be;font-weight:400}.gh-signin .gh-input:-ms-input-placeholder{color:#abb4be;font-weight:400}.gh-signin .gh-input::-moz-placeholder{color:#abb4be;font-weight:400;opacity:1}.gh-signin .gh-input:focus{border-color:#30cf43;box-shadow:0 0 0 3px rgba(26,170,96,.15)}.gh-signin .gh-btn{margin:0;width:100%;height:54px;max-width:unset;margin-top:32px;background:#15171a;font-weight:300;line-height:54px;border-radius:8px;transition:all .4s ease;-webkit-font-smoothing:subpixel-antialiased}.gh-signin .gh-btn span{color:#fff;font-size:1.8rem}.error-content{flex-grow:1;justify-content:center;user-select:text;padding:8vw}.error-content,.error-details{display:flex;align-items:center}.error-details{margin-bottom:4rem}.error-ghost{margin:15px;height:115px}@media (max-width:630px){.error-ghost{display:none}}.error-code{margin:0;color:#c5d2d9;font-size:10vw;font-weight:600;line-height:.9em;letter-spacing:-.4vw}.error-description{margin:0;padding:0;border:none;color:#54666d;font-size:2.3rem;font-weight:300;line-height:1.3em}.error-message{display:flex;flex-direction:column;margin:15px;align-items:center}.error-message a{font-size:1.4rem;line-height:1;margin:8px 0}.error-link{background-color:transparent;color:#5ba4e5;transition:background .3s,color .3s;text-decoration:none}.error-stack{margin:1rem auto;padding:2rem;max-width:800px;background-color:hsla(0,0%,100%,.3)}.error-stack-list{margin:0;padding:0;list-style-type:none}.error-stack-list li{display:block}.error-stack-list li:before{content:"\21AA";display:inline-block;margin-right:.5rem;color:#bbb;font-size:1.2rem}.error-stack-function{font-weight:700}
1
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-family:sans-serif}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.black{color:#15171a}.darkgrey{color:#394047}.midgrey{color:#7c8b9a}.lightgrey{color:#ced4d9}.blue{color:#14b8ff}.red{color:#f50b23}.orange{color:#ffb41f}.green{color:#30cf43}.darkgrey-hover:hover{color:#394047}.midgrey-hover:hover{color:#7c8b9a}.lightgrey-hover:hover{color:#ced4d9}.blue-hover:hover{color:#14b8ff}.red-hover:hover{color:#f50b23}.orange-hover:hover{color:#ffb41f}.green-hover:hover{color:#30cf43}*,:after,:before{box-sizing:border-box}html{-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:62.5%;letter-spacing:.2px;line-height:1.65;overflow:hidden}body,html{height:100%;width:100%}body{color:#343f44;font-size:1.4rem;overflow:auto;overflow-x:hidden}.gh-view{-ms-flex-positive:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1}h1,h2{color:#343f44;font-size:2.9rem;line-height:1.15em;margin:0 0 .3em;text-indent:-1px;text-rendering:optimizeLegibility}@media (max-width:500px){h1{font-size:2.4rem}}.gh-input{-webkit-appearance:none;border:1px solid #d6e3eb;border-radius:4px;color:#4b5b62;display:block;font-size:1.6rem;font-weight:300;height:40px;line-height:1em;padding:10px 12px;transition:border-color .15s linear;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;width:100%}.gh-input:focus{border-color:#b4cbda;outline:0}.gh-btn{fill:#829aa8;-webkit-font-smoothing:subpixel-antialiased;border:1px solid #d6e3eb;border-radius:5px;color:#829aa8;display:inline-block;outline:none;text-decoration:none!important;transition:all .2s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gh-btn span{border-radius:4px;display:block;font-size:1.3rem;font-weight:400;height:33px;letter-spacing:.2px;line-height:33px;padding:0 12px;text-align:center}.gh-btn:hover{border-color:#b4cbda}.gh-btn-hover-blue:hover{border-color:#3eb0ef;color:#3eb0ef}.gh-btn-blue{fill:#fff;background:linear-gradient(#3da1d6,#2288bf);border:0;box-shadow:0 1px 0 rgba(0,0,0,.12);color:#fff;padding:1px;text-shadow:0 -1px 0 rgba(0,0,0,.1);transition:none!important}.gh-btn-blue span{background:linear-gradient(#4ab6f0,#2fa5e4 60%,#2fa5e4 90%,#38a9e5);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.gh-btn-blue:active,.gh-btn-blue:focus{background:#1e78a9}.gh-btn-blue:active span,.gh-btn-blue:focus span{background:#29a0e0;box-shadow:none}.gh-btn-block{display:block;width:100%}.gh-input-icon{display:block;position:relative}.gh-input-icon svg{fill:color(var(--midgrey) l(15%));height:14px;left:10px;position:absolute;top:50%;transform:translateY(-7px);width:auto;z-index:2}.gh-input-icon input{padding-left:35px}.gh-app{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden}.gh-viewport{max-height:100%;overflow:hidden}.gh-main,.gh-viewport{-ms-flex-positive:1;display:-ms-flexbox;display:flex;flex-grow:1}.gh-main{background:#fff;overflow-y:auto;position:relative}.gh-flow{background:linear-gradient(315deg,#efefef,#fff);min-height:100%;overflow-y:auto}.gh-flow,.gh-flow-content-wrap{display:flex;flex-direction:column;flex-grow:1}.gh-flow-content-wrap{align-items:center;flex-shrink:0;justify-content:center;margin:0 24px;padding-bottom:8vh}.gh-flow-content-wrap .site-icon{border-radius:3px;height:70px;width:70px}.gh-flow-content{background:#fff;border-radius:3px;box-shadow:0 2.8px 2.2px rgba(0,0,0,.02),0 6.7px 5.3px rgba(0,0,0,.02),0 12.5px 10px rgba(0,0,0,.02),0 22.3px 17.9px rgba(0,0,0,.03),0 41.8px 33.4px rgba(0,0,0,.03),0 100px 80px rgba(0,0,0,.05);color:var(--darkgrey);display:flex;flex-direction:column;font-size:1.9rem;font-weight:300;line-height:1.5em;margin:4rem 0 6rem;max-width:520px;padding:40px;width:100%}.gh-flow-content.unsubscribe{align-items:center;justify-content:center;margin:4rem 0;max-width:560px;min-height:200px;text-align:center}@media (max-width:500px){.gh-flow-content{background:transparent;box-shadow:none;padding:0}}.gh-flow-content header{align-items:center;display:flex;flex-direction:column}.gh-flow-content h1{color:#15171a;font-size:4.1rem;font-weight:700;line-height:1.15em;margin-bottom:24px}.gh-flow-content.unsubscribe h1{font-size:3.2rem}@media (max-width:600px){.gh-flow-content h1,.gh-flow-content.unsubscribe h1{font-size:6vw}}.gh-flow-content.unsubscribe p{color:#394047;font-size:1.8rem;margin:0 0 .4em}@media (max-width:500px){.gh-flow-content.unsubscribe p{font-size:1.6rem;line-height:1.5}}.gh-flow-content .gh-btn{display:block;margin:20px auto 0;max-width:400px}.gh-flow-content .form-group{margin-bottom:2.5rem;position:relative}.gh-flow-content .form-group.error .gh-input{border-color:#f50b23;box-shadow:0 0 0 3px rgba(239,24,24,.15)}.gh-flow-content .main-error{color:#7c8b9a;font-size:1.35rem;font-weight:400;margin:0;position:absolute;right:0;text-align:center;user-select:text}.gh-flow-em{font-weight:500}.unsubscribe-footer{font-size:1.5rem;text-align:center}@media (max-width:500px){.unsubscribe-footer{font-size:1.4rem;line-height:1.4em;padding:0 24px}}.unsubscribe-footer p{color:#7c8b9a;margin:0 0 .4rem}.unsubscribe-footer a{color:#15171a;text-decoration:none}.unsubscribe-footer a:hover{text-decoration:underline}.gh-signin{margin-bottom:1.5rem}.gh-signin .gh-input,.gh-signin .gh-input:-webkit-autofill:first-line{border-radius:8px;font-size:1.8rem;height:54px;padding:12px 16px}.gh-signin .gh-input::placeholder{color:#abb4be;font-weight:400;opacity:1}.gh-signin .gh-input::-webkit-input-placeholder{color:#abb4be;font-weight:400}.gh-signin .gh-input:-ms-input-placeholder{color:#abb4be;font-weight:400}.gh-signin .gh-input::-moz-placeholder{color:#abb4be;font-weight:400;opacity:1}.gh-signin .gh-input:focus{border-color:#30cf43;box-shadow:0 0 0 3px rgba(26,170,96,.15)}.gh-signin .gh-btn{-webkit-font-smoothing:subpixel-antialiased;background:#15171a;border-radius:8px;font-weight:300;height:54px;line-height:54px;margin:0;margin-top:32px;max-width:unset;transition:all .4s ease;width:100%}.gh-signin .gh-btn span{color:#fff;font-size:1.8rem}.error-content{flex-grow:1;justify-content:center;padding:8vw;user-select:text}.error-content,.error-details{align-items:center;display:flex}.error-details{margin-bottom:4rem}.error-ghost{height:115px;margin:15px}@media (max-width:630px){.error-ghost{display:none}}.error-code{color:#c5d2d9;font-size:10vw;font-weight:600;letter-spacing:-.4vw;line-height:.9em;margin:0}.error-description{border:none;color:#54666d;font-size:2.3rem;font-weight:300;line-height:1.3em;margin:0;padding:0}.error-message{align-items:center;display:flex;flex-direction:column;margin:15px}.error-message a{font-size:1.4rem;line-height:1;margin:8px 0}.error-link{background-color:transparent;color:#5ba4e5;text-decoration:none;transition:background .3s,color .3s}.error-stack{background-color:hsla(0,0%,100%,.3);margin:1rem auto;max-width:800px;padding:2rem}.error-stack-list{list-style-type:none;margin:0;padding:0}.error-stack-list li{display:block}.error-stack-list li:before{color:#bbb;content:"\21AA";display:inline-block;font-size:1.2rem;margin-right:.5rem}.error-stack-function{font-weight:700}
@@ -0,0 +1,12 @@
1
+ const announcementBarSettings = require('../../services/announcement-bar-service');
2
+
3
+ module.exports = {
4
+ docName: 'announcement',
5
+
6
+ browse: {
7
+ permissions: true,
8
+ query(frame) {
9
+ return announcementBarSettings.getAnnouncementSettings(frame.options.context?.member);
10
+ }
11
+ }
12
+ };
@@ -77,6 +77,10 @@ module.exports = {
77
77
  return apiFramework.pipeline(require('./settings'), localUtils);
78
78
  },
79
79
 
80
+ get announcements() {
81
+ return apiFramework.pipeline(require('./announcements'), localUtils);
82
+ },
83
+
80
84
  get membersStripeConnect() {
81
85
  return apiFramework.pipeline(require('./members-stripe-connect'), localUtils);
82
86
  },
@@ -239,5 +243,5 @@ module.exports = {
239
243
 
240
244
  get feedbackMembers() {
241
245
  return apiFramework.pipeline(require('./feedback-members'), localUtils, 'members');
242
- }
246
+ }
243
247
  };
@@ -1,25 +1,17 @@
1
1
  const settingsCache = require('../../../shared/settings-cache');
2
2
  const urlUtils = require('../../../shared/url-utils');
3
3
  const ghostVersion = require('@tryghost/version');
4
- const announcementBarSettings = require('../../services/announcement-bar-service');
5
- const labs = require('../../../shared/labs');
6
4
 
7
5
  module.exports = {
8
6
  docName: 'settings',
9
7
 
10
8
  browse: {
11
9
  permissions: true,
12
- query(frame) {
13
- let announcementSettings;
14
- if (labs.isSet('announcementBar')) {
15
- announcementSettings = announcementBarSettings.getAnnouncementSettings(frame.options.context?.member);
16
- }
17
-
10
+ query() {
18
11
  // @TODO: decouple settings cache from API knowledge
19
12
  // The controller fetches models (or cached models) and the API frame for the target API version formats the response.
20
13
  return Object.assign({},
21
- settingsCache.getPublic(),
22
- announcementSettings, {
14
+ settingsCache.getPublic(), {
23
15
  url: urlUtils.urlFor('home', true),
24
16
  version: ghostVersion.safe
25
17
  }
@@ -52,6 +52,16 @@ module.exports = {
52
52
  },
53
53
 
54
54
  bulkDestroy(bulkActionResult, _apiConfig, frame) {
55
- frame.response = bulkActionResult;
55
+ frame.response = {
56
+ bulk: {
57
+ meta: {
58
+ stats: {
59
+ successful: bulkActionResult.successful,
60
+ unsuccessful: bulkActionResult.unsuccessful
61
+ },
62
+ errors: bulkActionResult.errors
63
+ }
64
+ }
65
+ };
56
66
  }
57
67
  };
@@ -56,6 +56,16 @@ module.exports = {
56
56
  },
57
57
 
58
58
  bulkDestroy(bulkActionResult, _apiConfig, frame) {
59
- frame.response = bulkActionResult;
59
+ frame.response = {
60
+ bulk: {
61
+ meta: {
62
+ stats: {
63
+ successful: bulkActionResult.successful,
64
+ unsuccessful: bulkActionResult.unsuccessful
65
+ },
66
+ errors: bulkActionResult.errors
67
+ }
68
+ }
69
+ };
60
70
  }
61
71
  };
@@ -3,6 +3,7 @@ const _ = require('lodash');
3
3
  const {ValidationError} = require('@tryghost/errors');
4
4
  const validator = require('@tryghost/validator');
5
5
  const tpl = require('@tryghost/tpl');
6
+ const AnnouncementBarSettings = require('@tryghost/announcement-bar-settings');
6
7
 
7
8
  const messages = {
8
9
  invalidEmailReceived: 'Please send a valid email',
@@ -68,11 +69,10 @@ module.exports = {
68
69
  // NOTE: safe to parse because of array validation up top
69
70
  const visibilityValues = JSON.parse(setting.value);
70
71
 
71
- // NOTE: combination of 'free_members' & 'paid_members' makes just a 'members' filter
72
72
  const validVisibilityValues = [
73
- 'visitors', // Logged out visitors
74
- 'free_members', // Free members
75
- 'paid_members' // Paid members
73
+ AnnouncementBarSettings.VisibilityValues.VISITORS,
74
+ AnnouncementBarSettings.VisibilityValues.FREE_MEMBERS,
75
+ AnnouncementBarSettings.VisibilityValues.PAID_MEMBERS
76
76
  ];
77
77
 
78
78
  if (visibilityValues.length) {
@@ -0,0 +1 @@
1
+ module.exports = require('./routes');
@@ -0,0 +1,15 @@
1
+ const express = require('../../../shared/express');
2
+ const api = require('../../api').endpoints;
3
+ const {http} = require('@tryghost/api-framework');
4
+ const shared = require('../shared');
5
+
6
+ module.exports = function apiRoutes() {
7
+ const router = express.Router('announcements');
8
+
9
+ // shouldn't be cached as it depends on member's context
10
+ router.use(shared.middleware.cacheControl('private'));
11
+
12
+ router.get('/', http(api.announcements.browse));
13
+
14
+ return router;
15
+ };
@@ -14,6 +14,7 @@ const {http} = require('@tryghost/api-framework');
14
14
  const api = require('../../api').endpoints;
15
15
 
16
16
  const commentRouter = require('../comments');
17
+ const announcementRouter = require('../announcement');
17
18
 
18
19
  module.exports = function setupMembersApp() {
19
20
  debug('Members App setup start');
@@ -79,6 +80,14 @@ module.exports = function setupMembersApp() {
79
80
  http(api.feedbackMembers.add)
80
81
  );
81
82
 
83
+ // Announcement
84
+ membersApp.use(
85
+ '/api/announcement',
86
+ labs.enabledMiddleware('announcementBar'),
87
+ middleware.loadMemberSession,
88
+ announcementRouter()
89
+ );
90
+
82
91
  // API error handling
83
92
  membersApp.use('/api', errorHandler.resourceNotFound);
84
93
  membersApp.use('/api', errorHandler.handleJSONResponse(sentry));
@@ -193,8 +193,8 @@
193
193
  "version": "0.12"
194
194
  },
195
195
  "editor": {
196
- "url": "https://unpkg.com/@tryghost/koenig-lexical@~{version}/dist/koenig-lexical.umd.js",
197
- "version": "0.0"
196
+ "url": "https://cdn.jsdelivr.net/ghost/koenig-lexical@~{version}/dist/koenig-lexical.umd.js",
197
+ "version": "0.1"
198
198
  },
199
199
  "tenor": {
200
200
  "googleApiKey": null,
@@ -21,7 +21,8 @@ const GA_FEATURES = [
21
21
  'audienceFeedback',
22
22
  'themeErrorsNotification',
23
23
  'emailErrors',
24
- 'outboundLinkTagging'
24
+ 'outboundLinkTagging',
25
+ 'announcementBar'
25
26
  ];
26
27
 
27
28
  // NOTE: this allowlist is meant to be used to filter out any unexpected
@@ -42,7 +43,6 @@ const ALPHA_FEATURES = [
42
43
  'makingItRain',
43
44
  'postHistory',
44
45
  'postDiffing',
45
- 'announcementBar',
46
46
  'imageEditor'
47
47
  ];
48
48