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.
- package/components/tryghost-adapter-cache-memory-ttl-5.46.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.46.0.tgz +0 -0
- package/components/{tryghost-adapter-manager-5.45.1.tgz → tryghost-adapter-manager-5.46.0.tgz} +0 -0
- package/components/tryghost-announcement-bar-settings-5.46.0.tgz +0 -0
- package/components/tryghost-api-framework-5.46.0.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.46.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.46.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.46.0.tgz +0 -0
- package/components/tryghost-constants-5.46.0.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.45.1.tgz → tryghost-custom-theme-settings-service-5.46.0.tgz} +0 -0
- package/components/{tryghost-data-generator-5.45.1.tgz → tryghost-data-generator-5.46.0.tgz} +0 -0
- package/components/tryghost-domain-events-5.46.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.46.0.tgz +0 -0
- package/components/{tryghost-email-analytics-provider-mailgun-5.45.1.tgz → tryghost-email-analytics-provider-mailgun-5.46.0.tgz} +0 -0
- package/components/tryghost-email-analytics-service-5.46.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.46.0.tgz +0 -0
- package/components/{tryghost-email-events-5.45.1.tgz → tryghost-email-events-5.46.0.tgz} +0 -0
- package/components/{tryghost-email-service-5.45.1.tgz → tryghost-email-service-5.46.0.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.46.0.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.46.0.tgz +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.45.1.tgz → tryghost-express-dynamic-redirects-5.46.0.tgz} +0 -0
- package/components/tryghost-external-media-inliner-5.46.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.46.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.46.0.tgz +0 -0
- package/components/tryghost-i18n-5.46.0.tgz +0 -0
- package/components/{tryghost-importer-handler-content-files-5.45.1.tgz → tryghost-importer-handler-content-files-5.46.0.tgz} +0 -0
- package/components/{tryghost-importer-revue-5.45.1.tgz → tryghost-importer-revue-5.46.0.tgz} +0 -0
- package/components/{tryghost-job-manager-5.45.1.tgz → tryghost-job-manager-5.46.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.46.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.46.0.tgz +0 -0
- package/components/{tryghost-link-tracking-5.45.1.tgz → tryghost-link-tracking-5.46.0.tgz} +0 -0
- package/components/{tryghost-magic-link-5.45.1.tgz → tryghost-magic-link-5.46.0.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.46.0.tgz +0 -0
- package/components/{tryghost-member-attribution-5.45.1.tgz → tryghost-member-attribution-5.46.0.tgz} +0 -0
- package/components/tryghost-member-events-5.46.0.tgz +0 -0
- package/components/{tryghost-members-api-5.45.1.tgz → tryghost-members-api-5.46.0.tgz} +0 -0
- package/components/tryghost-members-csv-5.46.0.tgz +0 -0
- package/components/tryghost-members-events-service-5.46.0.tgz +0 -0
- package/components/tryghost-members-importer-5.46.0.tgz +0 -0
- package/components/tryghost-members-offers-5.46.0.tgz +0 -0
- package/components/tryghost-members-payments-5.46.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.45.1.tgz → tryghost-members-ssr-5.46.0.tgz} +0 -0
- package/components/tryghost-members-stripe-service-5.46.0.tgz +0 -0
- package/components/{tryghost-mentions-email-report-5.45.1.tgz → tryghost-mentions-email-report-5.46.0.tgz} +0 -0
- package/components/tryghost-milestones-5.46.0.tgz +0 -0
- package/components/tryghost-minifier-5.46.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.46.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.46.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.46.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.46.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.46.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.46.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.46.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.46.0.tgz +0 -0
- package/components/tryghost-package-json-5.46.0.tgz +0 -0
- package/components/{tryghost-post-revisions-5.45.1.tgz → tryghost-post-revisions-5.46.0.tgz} +0 -0
- package/components/tryghost-posts-service-5.46.0.tgz +0 -0
- package/components/tryghost-referrers-5.46.0.tgz +0 -0
- package/components/tryghost-security-5.46.0.tgz +0 -0
- package/components/{tryghost-session-service-5.45.1.tgz → tryghost-session-service-5.46.0.tgz} +0 -0
- package/components/tryghost-settings-path-manager-5.46.0.tgz +0 -0
- package/components/{tryghost-slack-notifications-5.45.1.tgz → tryghost-slack-notifications-5.46.0.tgz} +0 -0
- package/components/{tryghost-staff-service-5.45.1.tgz → tryghost-staff-service-5.46.0.tgz} +0 -0
- package/components/{tryghost-stats-service-5.45.1.tgz → tryghost-stats-service-5.46.0.tgz} +0 -0
- package/components/{tryghost-tiers-5.45.1.tgz → tryghost-tiers-5.46.0.tgz} +0 -0
- package/components/{tryghost-update-check-service-5.45.1.tgz → tryghost-update-check-service-5.46.0.tgz} +0 -0
- package/components/tryghost-verification-trigger-5.46.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.46.0.tgz +0 -0
- package/components/{tryghost-webmentions-5.45.1.tgz → tryghost-webmentions-5.46.0.tgz} +0 -0
- package/core/built/admin/assets/{chunk.143.afd70591b785986367e5.js → chunk.143.eb5b2f48c7cdf62400d4.js} +5 -5
- package/core/built/admin/assets/{chunk.178.1c7d65593f4d77661972.js → chunk.178.2d0be6bf932cdb53766e.js} +4 -4
- package/core/built/admin/assets/{chunk.11.28a4582ffea7775d1149.js → chunk.604.e25172fcbbcc8ddcbdec.js} +627 -549
- package/core/built/admin/assets/{ghost-633127f675df595939422571208d611b.js → ghost-2e3d55ca4212a50f87aba88c26b55945.js} +27 -27
- package/core/built/admin/assets/{ghost-e778914ab060392435c4dd1c684ff04f.css → ghost-c3187d2bb18193c111d376a110c8c80d.css} +1 -1
- package/core/built/admin/assets/{ghost-dark-82ef602f56be4d1145c77432528959f8.css → ghost-dark-4948d897bf814756a3870ef564ba6a6d.css} +1 -1
- package/core/built/admin/assets/{vendor-62102dd36895b3dda3daa14883f2d2ec.js → vendor-e3de790ee48087482d42c1686d5fefd9.js} +6 -6
- package/core/built/admin/index.html +6 -6
- package/core/frontend/helpers/ghost_head.js +25 -7
- package/core/frontend/public/ghost.min.css +1 -1
- package/core/server/api/endpoints/announcements.js +12 -0
- package/core/server/api/endpoints/index.js +5 -1
- package/core/server/api/endpoints/settings-public.js +2 -10
- package/core/server/api/endpoints/utils/serializers/output/pages.js +11 -1
- package/core/server/api/endpoints/utils/serializers/output/posts.js +11 -1
- package/core/server/api/endpoints/utils/validators/input/settings.js +4 -4
- package/core/server/web/announcement/index.js +1 -0
- package/core/server/web/announcement/routes.js +15 -0
- package/core/server/web/members/app.js +9 -0
- package/core/shared/config/defaults.json +2 -2
- package/core/shared/labs.js +2 -2
- package/package.json +133 -133
- package/yarn.lock +185 -179
- package/components/tryghost-adapter-cache-memory-ttl-5.45.1.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.45.1.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.45.1.tgz +0 -0
- package/components/tryghost-api-framework-5.45.1.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.45.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.45.1.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.45.1.tgz +0 -0
- package/components/tryghost-constants-5.45.1.tgz +0 -0
- package/components/tryghost-domain-events-5.45.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.45.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.45.1.tgz +0 -0
- package/components/tryghost-email-content-generator-5.45.1.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.45.1.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.45.1.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.45.1.tgz +0 -0
- package/components/tryghost-extract-api-key-5.45.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.45.1.tgz +0 -0
- package/components/tryghost-i18n-5.45.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.45.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.45.1.tgz +0 -0
- package/components/tryghost-mailgun-client-5.45.1.tgz +0 -0
- package/components/tryghost-member-events-5.45.1.tgz +0 -0
- package/components/tryghost-members-csv-5.45.1.tgz +0 -0
- package/components/tryghost-members-events-service-5.45.1.tgz +0 -0
- package/components/tryghost-members-importer-5.45.1.tgz +0 -0
- package/components/tryghost-members-offers-5.45.1.tgz +0 -0
- package/components/tryghost-members-payments-5.45.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.45.1.tgz +0 -0
- package/components/tryghost-milestones-5.45.1.tgz +0 -0
- package/components/tryghost-minifier-5.45.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.45.1.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.45.1.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.45.1.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.45.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.45.1.tgz +0 -0
- package/components/tryghost-mw-version-match-5.45.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.45.1.tgz +0 -0
- package/components/tryghost-oembed-service-5.45.1.tgz +0 -0
- package/components/tryghost-package-json-5.45.1.tgz +0 -0
- package/components/tryghost-posts-service-5.45.1.tgz +0 -0
- package/components/tryghost-referrers-5.45.1.tgz +0 -0
- package/components/tryghost-security-5.45.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.45.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.45.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.45.1.tgz +0 -0
- /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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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-
|
|
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.
|
|
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-
|
|
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-
|
|
60
|
-
<script src="assets/chunk.
|
|
61
|
-
<script src="assets/chunk.143.
|
|
62
|
-
<script src="assets/ghost-
|
|
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(
|
|
91
|
-
|
|
90
|
+
function getAnnouncementBarHelper(data) {
|
|
91
|
+
const preview = data?.site?._preview;
|
|
92
|
+
|
|
93
|
+
if (!settingsCache.get('announcement_content') && !preview) {
|
|
92
94
|
return '';
|
|
93
95
|
}
|
|
94
|
-
|
|
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
|
-
|
|
98
|
-
'
|
|
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(
|
|
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{
|
|
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(
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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://
|
|
197
|
-
"version": "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,
|
package/core/shared/labs.js
CHANGED
|
@@ -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
|
|