ghost 5.59.3 → 5.60.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.60.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.60.0.tgz +0 -0
- package/components/tryghost-adapter-manager-5.60.0.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.60.0.tgz +0 -0
- package/components/{tryghost-api-framework-5.59.3.tgz → tryghost-api-framework-5.60.0.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.60.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.60.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.60.0.tgz +0 -0
- package/components/tryghost-collections-5.60.0.tgz +0 -0
- package/components/tryghost-constants-5.60.0.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.60.0.tgz +0 -0
- package/components/tryghost-data-generator-5.60.0.tgz +0 -0
- package/components/tryghost-domain-events-5.60.0.tgz +0 -0
- package/components/tryghost-donations-5.60.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.60.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.60.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.60.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.60.0.tgz +0 -0
- package/components/tryghost-email-events-5.60.0.tgz +0 -0
- package/components/tryghost-email-service-5.60.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.60.0.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.60.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.60.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.60.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.60.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.60.0.tgz +0 -0
- package/components/tryghost-i18n-5.60.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.60.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.60.0.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.60.0.tgz +0 -0
- package/components/tryghost-job-manager-5.60.0.tgz +0 -0
- package/components/tryghost-link-redirects-5.60.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.60.0.tgz +0 -0
- package/components/tryghost-link-tracking-5.60.0.tgz +0 -0
- package/components/tryghost-magic-link-5.60.0.tgz +0 -0
- package/components/tryghost-mail-events-5.60.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.60.0.tgz +0 -0
- package/components/tryghost-member-attribution-5.60.0.tgz +0 -0
- package/components/tryghost-member-events-5.60.0.tgz +0 -0
- package/components/tryghost-members-api-5.60.0.tgz +0 -0
- package/components/tryghost-members-csv-5.60.0.tgz +0 -0
- package/components/tryghost-members-events-service-5.60.0.tgz +0 -0
- package/components/tryghost-members-importer-5.60.0.tgz +0 -0
- package/components/{tryghost-members-offers-5.59.3.tgz → tryghost-members-offers-5.60.0.tgz} +0 -0
- package/components/tryghost-members-payments-5.60.0.tgz +0 -0
- package/components/tryghost-members-ssr-5.60.0.tgz +0 -0
- package/components/{tryghost-members-stripe-service-5.59.3.tgz → tryghost-members-stripe-service-5.60.0.tgz} +0 -0
- package/components/tryghost-mentions-email-report-5.60.0.tgz +0 -0
- package/components/tryghost-milestones-5.60.0.tgz +0 -0
- package/components/tryghost-minifier-5.60.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.60.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.60.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.60.0.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.59.3.tgz → tryghost-mw-error-handler-5.60.0.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.60.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.60.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.60.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.60.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.60.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.60.0.tgz +0 -0
- package/components/tryghost-package-json-5.60.0.tgz +0 -0
- package/components/tryghost-post-events-5.60.0.tgz +0 -0
- package/components/tryghost-post-revisions-5.60.0.tgz +0 -0
- package/components/tryghost-posts-service-5.60.0.tgz +0 -0
- package/components/tryghost-referrers-5.60.0.tgz +0 -0
- package/components/tryghost-security-5.60.0.tgz +0 -0
- package/components/tryghost-session-service-5.60.0.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.60.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.60.0.tgz +0 -0
- package/components/tryghost-staff-service-5.60.0.tgz +0 -0
- package/components/tryghost-stats-service-5.60.0.tgz +0 -0
- package/components/{tryghost-tiers-5.59.3.tgz → tryghost-tiers-5.60.0.tgz} +0 -0
- package/components/tryghost-update-check-service-5.60.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.60.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.60.0.tgz +0 -0
- package/components/tryghost-webmentions-5.60.0.tgz +0 -0
- package/content/themes/casper/assets/built/casper.js +1 -1
- package/content/themes/casper/assets/built/casper.js.map +1 -1
- package/content/themes/casper/assets/built/screen.css +1 -1
- package/content/themes/casper/assets/built/screen.css.map +1 -1
- package/content/themes/casper/assets/css/screen.css +503 -0
- package/content/themes/casper/assets/images/default-skin.png +0 -0
- package/content/themes/casper/assets/images/default-skin.svg +1 -0
- package/content/themes/casper/assets/images/preloader.gif +0 -0
- package/content/themes/casper/assets/js/lib/photoswipe-ui-default.min.js +4 -0
- package/content/themes/casper/assets/js/lib/photoswipe.min.js +4 -0
- package/content/themes/casper/assets/js/lightbox.js +109 -0
- package/content/themes/casper/default.hbs +3 -0
- package/content/themes/casper/package.json +1 -1
- package/content/themes/casper/partials/lightbox.hbs +41 -0
- package/core/built/admin/assets/{chunk.143.44acd3b3bfbed7805b34.js → chunk.143.88cad5b682130d4a2e2e.js} +5 -5
- package/core/built/admin/assets/{chunk.178.83acef3f2c763431432f.js → chunk.178.cf63585e0c59dc316a42.js} +4 -4
- package/core/built/admin/assets/{chunk.208.c7452bf9df2ebbf93206.js → chunk.208.735d31e95ce6fbd467b8.js} +12 -10
- package/core/built/admin/assets/ghost-c2c2b6cf53d999c72995cafa4166b9fb.css +1 -0
- package/core/built/admin/assets/ghost-dark-d44be1f4bc4e8920af2416d1e56a341f.css +1 -0
- package/core/built/admin/assets/{ghost-24496fd514838a397808c3a992e5818c.js → ghost-fc7b85b759f27e607667914dcd685402.js} +21 -21
- package/core/built/admin/index.html +5 -5
- package/core/frontend/helpers/comments.js +3 -3
- package/core/frontend/utils/frontend-apps.js +3 -0
- package/core/server/models/base/bookshelf.js +1 -1
- package/core/server/models/collection.js +33 -0
- package/core/server/services/collections/BookshelfCollectionsRepository.js +27 -14
- package/core/shared/config/defaults.json +1 -2
- package/package.json +150 -150
- package/yarn.lock +479 -441
- package/components/tryghost-adapter-cache-memory-ttl-5.59.3.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.59.3.tgz +0 -0
- package/components/tryghost-adapter-manager-5.59.3.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.59.3.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.59.3.tgz +0 -0
- package/components/tryghost-audience-feedback-5.59.3.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.59.3.tgz +0 -0
- package/components/tryghost-collections-5.59.3.tgz +0 -0
- package/components/tryghost-constants-5.59.3.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.59.3.tgz +0 -0
- package/components/tryghost-data-generator-5.59.3.tgz +0 -0
- package/components/tryghost-domain-events-5.59.3.tgz +0 -0
- package/components/tryghost-donations-5.59.3.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.59.3.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.59.3.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.59.3.tgz +0 -0
- package/components/tryghost-email-content-generator-5.59.3.tgz +0 -0
- package/components/tryghost-email-events-5.59.3.tgz +0 -0
- package/components/tryghost-email-service-5.59.3.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.59.3.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.59.3.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.59.3.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.59.3.tgz +0 -0
- package/components/tryghost-extract-api-key-5.59.3.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.59.3.tgz +0 -0
- package/components/tryghost-i18n-5.59.3.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.59.3.tgz +0 -0
- package/components/tryghost-importer-revue-5.59.3.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.59.3.tgz +0 -0
- package/components/tryghost-job-manager-5.59.3.tgz +0 -0
- package/components/tryghost-link-redirects-5.59.3.tgz +0 -0
- package/components/tryghost-link-replacer-5.59.3.tgz +0 -0
- package/components/tryghost-link-tracking-5.59.3.tgz +0 -0
- package/components/tryghost-magic-link-5.59.3.tgz +0 -0
- package/components/tryghost-mail-events-5.59.3.tgz +0 -0
- package/components/tryghost-mailgun-client-5.59.3.tgz +0 -0
- package/components/tryghost-member-attribution-5.59.3.tgz +0 -0
- package/components/tryghost-member-events-5.59.3.tgz +0 -0
- package/components/tryghost-members-api-5.59.3.tgz +0 -0
- package/components/tryghost-members-csv-5.59.3.tgz +0 -0
- package/components/tryghost-members-events-service-5.59.3.tgz +0 -0
- package/components/tryghost-members-importer-5.59.3.tgz +0 -0
- package/components/tryghost-members-payments-5.59.3.tgz +0 -0
- package/components/tryghost-members-ssr-5.59.3.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.59.3.tgz +0 -0
- package/components/tryghost-milestones-5.59.3.tgz +0 -0
- package/components/tryghost-minifier-5.59.3.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.59.3.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.59.3.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.59.3.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.59.3.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.59.3.tgz +0 -0
- package/components/tryghost-mw-version-match-5.59.3.tgz +0 -0
- package/components/tryghost-mw-vhost-5.59.3.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.59.3.tgz +0 -0
- package/components/tryghost-oembed-service-5.59.3.tgz +0 -0
- package/components/tryghost-package-json-5.59.3.tgz +0 -0
- package/components/tryghost-post-events-5.59.3.tgz +0 -0
- package/components/tryghost-post-revisions-5.59.3.tgz +0 -0
- package/components/tryghost-posts-service-5.59.3.tgz +0 -0
- package/components/tryghost-referrers-5.59.3.tgz +0 -0
- package/components/tryghost-security-5.59.3.tgz +0 -0
- package/components/tryghost-session-service-5.59.3.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.59.3.tgz +0 -0
- package/components/tryghost-slack-notifications-5.59.3.tgz +0 -0
- package/components/tryghost-staff-service-5.59.3.tgz +0 -0
- package/components/tryghost-stats-service-5.59.3.tgz +0 -0
- package/components/tryghost-update-check-service-5.59.3.tgz +0 -0
- package/components/tryghost-verification-trigger-5.59.3.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.59.3.tgz +0 -0
- package/components/tryghost-webmentions-5.59.3.tgz +0 -0
- package/core/built/admin/assets/ghost-92cf97efa3969188bb2bec0155536d1d.css +0 -1
- package/core/built/admin/assets/ghost-dark-64031cd0a165ea4a338ab05129f863ab.css +0 -1
- /package/core/built/admin/assets/{chunk.208.c7452bf9df2ebbf93206.js.LICENSE.txt → chunk.208.735d31e95ce6fbd467b8.js.LICENSE.txt} +0 -0
|
@@ -1333,20 +1333,20 @@ function l(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,config
|
|
|
1333
1333
|
return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
1334
1334
|
const c=Ember.HTMLBars.template({id:"CpBZwhiT",block:'{"symbols":["&attrs"],"statements":[[11,"div"],[24,0,"flex flex-column h-100"],[24,"data-test-nav-menu","design"],[17,1],[4,[38,0],["gh-nav-contextual"],null],[12],[2,"\\n "],[10,"header"],[14,0,"gh-nav-header no-accordion"],[12],[2,"\\n "],[8,"link-to",[[24,0,"gh-nav-menu-back-button"],[24,"data-test-link","back-to-settings"]],[["@route"],["settings"]],[["default"],[{"statements":[[2,"Settings"]],"parameters":[]}]]],[2,"\\n "],[1,[30,[36,1],["arrow-right-small"],null]],[2," Announcement bar\\n "],[13],[2,"\\n "],[10,"section"],[14,0,"gh-nav-body gh-nav-design"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-nav-top"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-nav-list gh-nav-main"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-nav-design-settings"],[12],[2,"\\n "],[10,"form"],[12],[2,"\\n "],[8,"announcement-settings/content",[],[["@onChange"],[[32,0,["updatePreview"]]]],null],[2,"\\n "],[8,"announcement-settings/background",[],[["@onChange"],[[32,0,["updatePreview"]]]],null],[2,"\\n "],[8,"announcement-settings/visibility",[],[["@onChange"],[[32,0,["updatePreview"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"],[13]],"hasEval":false,"upvars":["css-transition","svg-jar"]}',moduleName:"ghost-admin/components/gh-nav-menu/announcement-bar.hbs"})
|
|
1335
1335
|
let d=(n=Ember.inject.service,r=Ember._action,a=class extends t.default{constructor(...e){super(...e),l(this,"themeManagement",s,this),l(this,"config",o,this)}updatePreview(){this.themeManagement.updatePreviewHtmlTask.perform()}},s=u(a.prototype,"themeManagement",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),o=u(a.prototype,"config",[i.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u(a.prototype,"updatePreview",[r],Object.getOwnPropertyDescriptor(a.prototype,"updatePreview"),a.prototype),a)
|
|
1336
|
-
e.default=d,Ember._setComponentTemplate(c,d)})),define("ghost-admin/components/gh-nav-menu/design",["exports","@glimmer/component","ghost-admin/decorators/inject"],(function(e,t,i){var n,r,a,s,o,l,u,c,d,p,m,h,b,g,f,v,y
|
|
1337
|
-
function
|
|
1336
|
+
e.default=d,Ember._setComponentTemplate(c,d)})),define("ghost-admin/components/gh-nav-menu/design",["exports","@glimmer/component","ghost-admin/decorators/inject"],(function(e,t,i){var n,r,a,s,o,l,u,c,d,p,m,h,b,g,f,v,y,w
|
|
1337
|
+
function k(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function E(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e
|
|
1338
1338
|
var i=e[Symbol.toPrimitive]
|
|
1339
1339
|
if(void 0!==i){var n=i.call(e,t||"default")
|
|
1340
1340
|
if("object"!=typeof n)return n
|
|
1341
1341
|
throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string")
|
|
1342
|
-
return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function
|
|
1342
|
+
return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function P(e,t,i,n,r){var a={}
|
|
1343
1343
|
return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
1344
|
-
const
|
|
1345
|
-
let
|
|
1344
|
+
const O=Ember.HTMLBars.template({id:"Q5k86lxK",block:'{"symbols":["group","isOpen","isOpen","&attrs"],"statements":[[11,"div"],[24,0,"flex flex-column h-100"],[24,"data-test-nav-menu","design"],[17,4],[4,[38,8],["gh-nav-contextual"],null],[12],[2,"\\n "],[10,"header"],[14,0,"gh-nav-header"],[12],[2,"\\n "],[8,"link-to",[[24,0,"gh-nav-menu-back-button"],[24,"data-test-link","back-to-settings"]],[["@route"],["settings"]],[["default"],[{"statements":[[2,"Settings"]],"parameters":[]}]]],[2,"\\n "],[1,[30,[36,0],["arrow-right-small"],null]],[2," Design\\n "],[13],[2,"\\n "],[10,"section"],[14,0,"gh-nav-body gh-nav-design"],[12],[2,"\\n "],[11,"div"],[24,0,"gh-nav-top"],[4,[38,3],["click",[32,0,["transitionBackToIndex"]]],null],[12],[2,"\\n "],[10,"div"],[14,0,"gh-nav-list gh-nav-main"],[12],[2,"\\n "],[8,"link-to",[[24,0,"gh-nav-menu-title"],[4,[38,3],["click",[32,0,["closeAllSections"]]],null]],[["@route","@current-when"],["settings.design","settings.design.index"]],[["default"],[{"statements":[[2,"Site design"]],"parameters":[]}]]],[2,"\\n\\n"],[6,[37,6],[[30,[36,5],[[32,0,["openSection"]],"brand"],null]],null,[["default"],[{"statements":[[2," "],[11,"button"],[16,0,[31,["gh-nav-design-tab ",[30,[36,1],[[32,3],"active"],null]]]],[24,"data-test-nav-toggle","general"],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["toggleSection"]],"brand"],null]],null],[12],[2,"\\n "],[1,[30,[36,0],["paintbrush"],null]],[2," Brand\\n "],[10,"span"],[14,0,"gh-nav-button-expand"],[12],[1,[30,[36,0],[[30,[36,1],[[32,3],"arrow-up-stroke","arrow-down-stroke"],null]],null]],[13],[2,"\\n "],[13],[2,"\\n"],[6,[37,4],[[32,3]],null,[["default"],[{"statements":[[2," "],[10,"div"],[14,0,"gh-nav-design-settings"],[14,"data-test-nav-group","general"],[12],[2,"\\n "],[8,"settings/design/general-settings-form",[],[["@didUpdate"],[[30,[36,7],[[32,0,["themeManagement","updatePreviewHtmlTask"]]],null]]],null],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]]],"parameters":[3]}]]],[2,"\\n"],[6,[37,10],[[30,[36,9],[[30,[36,9],[[32,0,["customThemeSettings","settingGroups"]]],null]],null]],null,[["default"],[{"statements":[[6,[37,6],[[30,[36,5],[[32,0,["openSection"]],[32,1,["key"]]],null]],null,[["default"],[{"statements":[[2," "],[11,"button"],[16,0,[31,["gh-nav-design-tab ",[30,[36,1],[[32,2],"active"],null]]]],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["toggleSection"]],[32,1,["key"]]],null]],null],[12],[2,"\\n "],[1,[30,[36,0],[[32,1,["icon"]]],null]],[2," "],[1,[32,1,["name"]]],[2,"\\n "],[10,"span"],[14,0,"gh-nav-button-expand"],[12],[1,[30,[36,0],[[30,[36,1],[[32,2],"arrow-up-stroke","arrow-down-stroke"],null]],null]],[13],[2,"\\n "],[13],[2,"\\n\\n"],[6,[37,4],[[32,2]],null,[["default"],[{"statements":[[2," "],[10,"div"],[14,0,"gh-nav-design-settings"],[15,"data-test-nav-group",[32,1,["key"]]],[12],[2,"\\n "],[8,"settings/design/theme-settings-form",[],[["@themeSettings","@onChange"],[[32,1,["settings"]],[32,0,["handleThemeSettingChange"]]]],null],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]]],"parameters":[2]}]]]],"parameters":[1]}]]],[2," "],[13],[2,"\\n "],[13],[2,"\\n\\n "],[10,"div"],[14,0,"gh-nav-bottom"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-change-theme"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-nav-design-tab"],[12],[2,"\\n "],[8,"link-to",[[24,"aria-label","Change theme"],[24,"data-test-nav","change-theme"],[4,[38,3],["click",[32,0,["closeAllSections"]]],null]],[["@route"],["settings.design.change-theme"]],[["default"],[{"statements":[],"parameters":[]}]]],[2,"\\n "],[10,"div"],[12],[2,"\\n "],[10,"span"],[12],[2,"Change theme"],[13],[2,"\\n "],[10,"span"],[14,0,"active-theme"],[14,"data-test-text","current-theme"],[12],[2,"Current: "],[1,[32,0,["activeTheme","name"]]],[6,[37,1],[[32,0,["activeTheme","package","version"]]],null,[["default"],[{"statements":[[2," - v"],[1,[32,0,["activeTheme","package","version"]]]],"parameters":[]}]]],[6,[37,1],[[32,0,["activeTheme","package","docs"]]],null,[["default"],[{"statements":[[10,"a"],[14,0,"gh-theme-docs"],[15,6,[31,[[32,0,["activeTheme","package","docs"]]]]],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[12],[1,[30,[36,0],["book-open"],[["width","height"],["12","12"]]]],[13]],"parameters":[]}]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"gh-nav-design-tabicon"],[12],[1,[30,[36,0],["sync"],null]],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"],[13]],"hasEval":false,"upvars":["svg-jar","if","fn","on","liquid-if","eq","let","perform","css-transition","-track-array","each"]}',moduleName:"ghost-admin/components/gh-nav-menu/design.hbs"})
|
|
1345
|
+
let j=(n=Ember.inject.service,r=Ember.inject.service,a=Ember.inject.service,s=Ember.inject.service,o=Ember.inject.service,l=Ember._tracked,u=Ember._action,c=Ember._action,d=Ember._action,p=Ember._action,m=class extends t.default{constructor(){super(...arguments),k(this,"customThemeSettings",h,this),k(this,"router",b,this),k(this,"settings",g,this),k(this,"store",f,this),k(this,"themeManagement",v,this),k(this,"config",y,this),k(this,"openSection",w,this),E(this,"themes",this.store.peekAll("theme")),this.store.findAll("theme"),"settings.design.index"===this.router.currentRouteName&&this.openDefaultSection(),this.routeDidChangeHandler=Ember.run.bind(this,this.handleRouteDidChange),this.router.on("routeDidChange",this.routeDidChangeHandler)}willDestroy(){super.willDestroy(...arguments),this.router.off("routeDidChange",this.routeDidChangeHandler)}get activeTheme(){return this.themes.findBy("active",!0)}toggleSection(e){if(this.openSection===e)this.openSection=null
|
|
1346
1346
|
else{this.openSection=e
|
|
1347
1347
|
const t=this.customThemeSettings.KNOWN_GROUPS.findBy("key",e)
|
|
1348
|
-
t&&t.previewType?this.themeManagement.setPreviewType(t.previewType):this.themeManagement.setPreviewType("homepage")}}transitionBackToIndex(){"settings.design.index"!==this.router.currentRouteName&&this.router.transitionTo("settings.design.index")}closeAllSections(){this.openSection=null}openDefaultSection(){Ember.isEmpty(this.customThemeSettings.settings)&&(this.openSection="brand")}handleRouteDidChange(e){e.isAborted||"settings.design.index"!==e.to?.name||this.openDefaultSection()}},
|
|
1349
|
-
e.default=
|
|
1348
|
+
t&&t.previewType?this.themeManagement.setPreviewType(t.previewType):this.themeManagement.setPreviewType("homepage")}}transitionBackToIndex(){"settings.design.index"!==this.router.currentRouteName&&this.router.transitionTo("settings.design.index")}closeAllSections(){this.openSection=null}handleThemeSettingChange(){this.customThemeSettings.rebuildSettingGroups(),this.themeManagement.updatePreviewHtmlTask.perform()}openDefaultSection(){Ember.isEmpty(this.customThemeSettings.settings)&&(this.openSection="brand")}handleRouteDidChange(e){e.isAborted||"settings.design.index"!==e.to?.name||this.openDefaultSection()}},h=P(m.prototype,"customThemeSettings",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),b=P(m.prototype,"router",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=P(m.prototype,"settings",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=P(m.prototype,"store",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=P(m.prototype,"themeManagement",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=P(m.prototype,"config",[i.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=P(m.prototype,"openSection",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P(m.prototype,"toggleSection",[u],Object.getOwnPropertyDescriptor(m.prototype,"toggleSection"),m.prototype),P(m.prototype,"transitionBackToIndex",[c],Object.getOwnPropertyDescriptor(m.prototype,"transitionBackToIndex"),m.prototype),P(m.prototype,"closeAllSections",[d],Object.getOwnPropertyDescriptor(m.prototype,"closeAllSections"),m.prototype),P(m.prototype,"handleThemeSettingChange",[p],Object.getOwnPropertyDescriptor(m.prototype,"handleThemeSettingChange"),m.prototype),m)
|
|
1349
|
+
e.default=j,Ember._setComponentTemplate(O,j)})),define("ghost-admin/components/gh-nav-menu/footer",["exports","ghost-admin/components/modals/design/theme-errors","ember-basic-dropdown/utils/calculate-position","ghost-admin/decorators/inject"],(function(e,t,i,n){var r,a,s,o,l,u,c,d,p,m,h,b,g,f,v,y,w,k,E
|
|
1350
1350
|
function P(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function O(e,t,i,n,r){var a={}
|
|
1351
1351
|
return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
1352
1352
|
const j=Ember.HTMLBars.template({id:"NvmhK+DW",block:'{"symbols":["dropdown","menuItem"],"statements":[[10,"div"],[14,0,"gh-nav-bottom"],[12],[2,"\\n"],[6,[37,2],[[32,0,["hasThemeErrors"]]],null,[["default"],[{"statements":[[2," "],[11,"button"],[24,0,"gh-footer-toast gh-theme-error-toast"],[24,4,"button"],[4,[38,7],["click",[30,[36,6],[[32,0,["openThemeErrors"]],null],null]],null],[12],[2,"\\n "],[10,"span"],[14,0,"gh-footer-toast-title gh-notification-title"],[12],[2,"Your theme contains errors"],[13],[2,"\\n "],[10,"span"],[14,0,"gh-footer-toast-p"],[12],[2,"Some functionality on your site may be limited →"],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]],[2,"\\n "],[8,"gh-referral-invite",[],[["@hasThemeErrors"],[[32,0,["hasThemeErrors"]]]],null],[2,"\\n\\n "],[10,"div"],[14,0,"flex items-center justify-between"],[12],[2,"\\n "],[10,"div"],[14,0,"pe-all"],[12],[2,"\\n "],[8,"gh-basic-dropdown",[],[["@horizontalPosition","@verticalPosition","@calculatePosition"],["left","above",[32,0,["userDropdownPosition"]]]],[["default"],[{"statements":[[2,"\\n "],[8,[32,1,["Trigger"]],[[24,0,"outline-0 pointer"]],[[],[]],[["default"],[{"statements":[[2,"\\n "],[10,"div"],[14,0,"flex-auto flex items-center"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-user-avatar relative"],[15,5,[30,[36,8],[[32,0,["session","user","profileImageUrl"]]],null]],[12],[2,"\\n "],[6,[37,2],[[32,0,["whatsNew","hasNew"]]],null,[["default"],[{"statements":[[10,"span"],[14,0,"absolute dib ba b--white br-100 gh-whats-new-badge-account"],[12],[13]],"parameters":[]}]]],[2,"\\n "],[13],[2,"\\n "],[1,[30,[36,0],["arrow-down"],[["class"],["w3 mr1 fill-darkgrey"]]]],[2,"\\n "],[13],[2,"\\n "]],"parameters":[]}]]],[2,"\\n\\n "],[8,[32,1,["Content"]],[[16,0,[31,["gh-nav-menu-dropdown ",[30,[36,2],[[32,0,["session","user","isContributor"]],"gh-nav-menu-dropdown-contributor"],null]]]]],[[],[]],[["default"],[{"statements":[[2,"\\n "],[10,"ul"],[14,0,"dropdown-menu dropdown-triangle-top"],[14,"role","menu"],[12],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-account-menu-header"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-user-avatar relative"],[15,5,[30,[36,8],[[32,0,["session","user","profileImageUrl"]]],null]],[12],[13],[2,"\\n "],[10,"div"],[14,0,"gh-user-info"],[12],[2,"\\n "],[10,"h4"],[14,0,"gh-user-name"],[12],[1,[32,0,["session","user","name"]]],[13],[2,"\\n "],[10,"span"],[14,0,"gh-user-email"],[12],[1,[32,0,["session","user","email"]]],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"li"],[14,0,"divider"],[14,"role","separator"],[12],[13],[2,"\\n\\n"],[6,[37,2],[[32,0,["session","user","isContributor"]]],null,[["default","else"],[{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[8,"link-to",[[24,0,"dropdown-item"],[24,"tabindex","-1"],[24,"data-test-nav","posts"]],[["@route","@query","@role"],["posts",[30,[36,5],null,[["entry"],[null]]],"menuitem"]],[["default"],[{"statements":[[2,"\\n Posts\\n "]],"parameters":[]}]]],[2,"\\n "],[13],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[10,"a"],[15,6,[31,[[32,0,["config","blogUrl"]],"/"]]],[14,0,"dropdown-item"],[14,"role","menuitem"],[14,"tabindex","-1"],[14,"title","Open site in new tab"],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[12],[2,"View site"],[13],[2,"\\n "],[13],[2,"\\n "],[10,"li"],[14,0,"divider"],[14,"role","separator"],[12],[13],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[8,"link-to",[[24,0,"dropdown-item"],[24,"tabindex","-1"],[24,"data-test-nav","whatsnew"]],[["@route","@query","@role"],["whatsnew",[30,[36,5],null,[["entry"],[null]]],"menuitem"]],[["default"],[{"statements":[[2,"\\n What\'s new?\\n"],[6,[37,2],[[32,0,["whatsNew","hasNew"]]],null,[["default"],[{"statements":[[2," "],[10,"div"],[14,0,"flex-grow-1 flex justify-end"],[12],[10,"span"],[14,0,"dib w2 h2 top-0 right-0 bg-green br-100"],[12],[13],[13],[2,"\\n"]],"parameters":[]}]]],[2," "]],"parameters":[]}]]],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[8,"link-to",[[24,0,"dropdown-item"],[24,"tabindex","-1"],[24,"data-test-nav","user-profile"]],[["@route","@model","@role"],["settings.staff.user",[32,0,["session","user","slug"]],"menuitem"]],[["default"],[{"statements":[[2,"\\n Your profile\\n "]],"parameters":[]}]]],[2,"\\n "],[13],[2,"\\n\\n"],[6,[37,9],[[32,0,["session","user","isContributor"]]],null,[["default"],[{"statements":[[2," "],[10,"li"],[14,0,"divider"],[14,"role","separator"],[12],[13],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[10,"a"],[14,0,"dropdown-item"],[14,"role","menuitem"],[14,"tabindex","-1"],[14,6,"https://ghost.org/help?utm_source=admin&utm_campaign=help"],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[12],[2,"\\n Help center\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[10,"a"],[14,0,"dropdown-item"],[14,"role","menuitem"],[14,"tabindex","-1"],[14,6,"https://ghost.org/resources?utm_source=admin&utm_campaign=resources"],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[12],[2,"\\n Resources & guides\\n "],[13],[2,"\\n "],[13],[2,"\\n\\n"],[6,[37,2],[[32,0,["showDropdownExtension"]]],null,[["default"],[{"statements":[[6,[37,4],[[30,[36,3],[[30,[36,3],[[32,0,["config","clientExtensions","dropdown","items"]]],null]],null]],null,[["default"],[{"statements":[[6,[37,2],[[32,2,["divider"]]],null,[["default","else"],[{"statements":[[2," "],[10,"li"],[14,0,"divider"],[14,"role","separator"],[12],[13],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[10,"a"],[15,6,[31,[[32,2,["href"]]]]],[14,"target","_blank"],[15,0,[31,["dropdown-item ",[32,2,["classes"]]]]],[14,"role","menuitem"],[14,"tabindex","-1"],[14,"rel","noopener noreferrer"],[12],[2,"\\n "],[1,[32,2,["text"]]],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]]],"parameters":[2]}]]]],"parameters":[]}]]],[2," "],[10,"li"],[14,0,"divider"],[14,"role","separator"],[12],[13],[2,"\\n"]],"parameters":[]}]]],[2,"\\n "],[10,"li"],[12],[2,"\\n "],[8,"link-to",[[24,0,"dropdown-item user-menu-signout"],[24,"tabindex","-1"]],[["@route","@role"],["signout","menuitem"]],[["default"],[{"statements":[[2,"\\n Sign out\\n "]],"parameters":[]}]]],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "]],"parameters":[]}]]],[2,"\\n "]],"parameters":[1]}]]],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"flex items-center pe-all"],[12],[2,"\\n"],[6,[37,2],[[30,[36,10],[[32,0,["session","user"]]],null]],null,[["default"],[{"statements":[[6,[37,2],[[30,[36,1],["adminXSettings"],null]],null,[["default","else"],[{"statements":[[2," "],[8,"link-to",[[24,0,"gh-nav-bottom-tabicon"],[24,"data-test-nav","settings"]],[["@route","@current-when"],["settings-x",[32,0,["isSettingsRoute"]]]],[["default"],[{"statements":[[1,[30,[36,0],["settings"],null]]],"parameters":[]}]]],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[8,"link-to",[[24,0,"gh-nav-bottom-tabicon"],[24,"data-test-nav","settings"]],[["@route","@current-when"],["settings",[32,0,["isSettingsRoute"]]]],[["default"],[{"statements":[[1,[30,[36,0],["settings"],null]]],"parameters":[]}]]],[2,"\\n"]],"parameters":[]}]]]],"parameters":[]}]]],[6,[37,2],[[32,0,["session","user","isEditor"]]],null,[["default"],[{"statements":[[2," "],[8,"link-to",[[24,0,"gh-nav-bottom-tabicon"],[24,"data-test-nav","settings"]],[["@route","@current-when"],["settings.staff",[32,0,["isSettingsRoute"]]]],[["default"],[{"statements":[[1,[30,[36,0],["settings"],null]]],"parameters":[]}]]],[2,"\\n"]],"parameters":[]}]]],[2," "],[10,"div"],[14,0,"nightshift-toggle-container"],[12],[2,"\\n "],[11,"div"],[16,0,[31,["nightshift-toggle ",[30,[36,2],[[32,0,["feature","nightShift"]],"on"],null]]]],[4,[38,12],[[32,0],[30,[36,11],["nightShift",[32,0,["feature"]]],null]],null],[12],[2,"\\n "],[10,"div"],[14,0,"sun"],[12],[1,[30,[36,0],["sun"],null]],[13],[2,"\\n "],[10,"div"],[14,0,"moon"],[12],[1,[30,[36,0],["moon"],null]],[13],[2,"\\n "],[10,"div"],[14,0,"thumb"],[12],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"],[13],[2,"\\n"]],"hasEval":false,"upvars":["svg-jar","feature","if","-track-array","each","hash","fn","on","background-image-style","unless","gh-user-can-admin","toggle","action"]}',moduleName:"ghost-admin/components/gh-nav-menu/footer.hbs"})
|
|
@@ -3065,7 +3065,7 @@ e.default=v,Ember._setComponentTemplate(f,v)})),define("ghost-admin/components/s
|
|
|
3065
3065
|
const t=Ember.HTMLBars.template({id:"O3WzWNZ+",block:'{"symbols":["&attrs","@didUpdate"],"statements":[[11,"div"],[24,0,"gh-stack"],[17,1],[12],[2,"\\n "],[8,"settings/form-fields/site-description",[[24,0,"gh-stack-item gh-setting-first"]],[["@didUpdate"],[[32,2]]],null],[2,"\\n "],[8,"settings/form-fields/accent-color",[[24,0,"gh-stack-item gh-setting"]],[["@didUpdate"],[[32,2]]],null],[2,"\\n "],[8,"settings/form-fields/publication-icon",[[24,0,"gh-stack-item gh-setting"]],[["@didUpdate"],[[32,2]]],null],[2,"\\n "],[8,"settings/form-fields/publication-logo",[[24,0,"gh-stack-item gh-setting"]],[["@didUpdate"],[[32,2]]],null],[2,"\\n "],[8,"settings/form-fields/publication-cover",[[24,0,"gh-stack-item gh-setting"]],[["@didUpdate"],[[32,2]]],null],[2,"\\n"],[13]],"hasEval":false,"upvars":[]}',moduleName:"ghost-admin/components/settings/design/general-settings-form.hbs"})
|
|
3066
3066
|
var i=Ember._setComponentTemplate(t,Ember._templateOnlyComponent())
|
|
3067
3067
|
e.default=i})),define("ghost-admin/components/settings/design/theme-settings-form",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
3068
|
-
const t=Ember.HTMLBars.template({id:"
|
|
3068
|
+
const t=Ember.HTMLBars.template({id:"8ASjymqq",block:'{"symbols":["setting","index","@onChange","@themeSettings"],"statements":[[10,"div"],[14,0,"gh-stack"],[12],[2,"\\n "],[10,"form"],[12],[2,"\\n"],[6,[37,3],[[30,[36,2],[[30,[36,2],[[32,4]],null]],null]],null,[["default"],[{"statements":[[6,[37,1],[[30,[36,0],[[32,1,["type"]],"select"],null]],null,[["default"],[{"statements":[[2," "],[8,"custom-theme-settings/select",[],[["@setting","@index","@onChange"],[[32,1],[32,2],[32,3]]],null],[2,"\\n"]],"parameters":[]}]]],[6,[37,1],[[30,[36,0],[[32,1,["type"]],"boolean"],null]],null,[["default"],[{"statements":[[2," "],[8,"custom-theme-settings/boolean",[],[["@setting","@index","@onChange"],[[32,1],[32,2],[32,3]]],null],[2,"\\n"]],"parameters":[]}]]],[6,[37,1],[[30,[36,0],[[32,1,["type"]],"color"],null]],null,[["default"],[{"statements":[[2," "],[8,"custom-theme-settings/color",[],[["@setting","@index","@onChange"],[[32,1],[32,2],[32,3]]],null],[2,"\\n"]],"parameters":[]}]]],[6,[37,1],[[30,[36,0],[[32,1,["type"]],"text"],null]],null,[["default"],[{"statements":[[2," "],[8,"custom-theme-settings/text",[],[["@setting","@index","@onChange"],[[32,1],[32,2],[32,3]]],null],[2,"\\n"]],"parameters":[]}]]],[6,[37,1],[[30,[36,0],[[32,1,["type"]],"image"],null]],null,[["default"],[{"statements":[[2," "],[8,"custom-theme-settings/image",[],[["@setting","@index","@onChange"],[[32,1],[32,2],[32,3]]],null],[2,"\\n"]],"parameters":[]}]]]],"parameters":[1,2]}]]],[2," "],[13],[2,"\\n"],[13]],"hasEval":false,"upvars":["eq","if","-track-array","each"]}',moduleName:"ghost-admin/components/settings/design/theme-settings-form.hbs"})
|
|
3069
3069
|
var i=Ember._setComponentTemplate(t,Ember._templateOnlyComponent())
|
|
3070
3070
|
e.default=i})),define("ghost-admin/components/settings/form-fields/accent-color",["exports","@glimmer/component","ember-concurrency"],(function(e,t,i){var n,r,a,s,o,l
|
|
3071
3071
|
function u(e,t,i,n,r){var a={}
|
|
@@ -4659,7 +4659,7 @@ return i.ops.source&&i.ops.source.sendAction("action",i.obj),i.ops.target&&i.ops
|
|
|
4659
4659
|
e.default=i})),define("ghost-admin/models/custom-theme-setting-list",["exports","@ember-data/model"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4660
4660
|
var i=t.default.extend({customThemeSettings:(0,t.hasMany)("custom-theme-setting")})
|
|
4661
4661
|
e.default=i})),define("ghost-admin/models/custom-theme-setting",["exports","@ember-data/model"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4662
|
-
var i=t.default.extend({key:(0,t.attr)("string"),type:(0,t.attr)("string"),description:(0,t.attr)("string"),options:(0,t.attr)(),default:(0,t.attr)("string"),value:(0,t.attr)(),group:(0,t.attr)("string")})
|
|
4662
|
+
var i=t.default.extend({key:(0,t.attr)("string"),type:(0,t.attr)("string"),description:(0,t.attr)("string"),options:(0,t.attr)(),default:(0,t.attr)("string"),value:(0,t.attr)(),group:(0,t.attr)("string"),visibility:(0,t.attr)("string")})
|
|
4663
4663
|
e.default=i})),define("ghost-admin/models/email",["exports","@ember-data/model"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4664
4664
|
var i=t.default.extend({error:(0,t.attr)("string"),html:(0,t.attr)("string"),plaintext:(0,t.attr)("string"),stats:(0,t.attr)("json-string"),status:(0,t.attr)("string"),subject:(0,t.attr)("string"),submittedAtUTC:(0,t.attr)("moment-utc"),uuid:(0,t.attr)("string"),recipientFilter:(0,t.attr)("string"),emailCount:(0,t.attr)("number",{defaultValue:0}),deliveredCount:(0,t.attr)("number",{defaultValue:0}),openedCount:(0,t.attr)("number",{defaultValue:0}),failedCount:(0,t.attr)("number",{defaultValue:0}),trackOpens:(0,t.attr)("boolean"),trackClicks:(0,t.attr)("boolean"),feedbackEnabled:(0,t.attr)("boolean"),createdAtUTC:(0,t.attr)("moment-utc"),createdBy:(0,t.attr)("string"),updatedAtUTC:(0,t.attr)("moment-utc"),updatedBy:(0,t.attr)("string"),post:(0,t.belongsTo)("post"),isSuccess:Ember.computed.equal("status","submitted"),isFailure:Ember.computed.equal("status","failed"),openRate:Ember.computed("emailCount","openedCount",(function(){let{emailCount:e,openedCount:t}=this
|
|
4665
4665
|
return 0===e?0:Math.round(t/e*100)})),retry(){return this.store.adapterFor("email").retry(this)}})
|
|
@@ -5657,25 +5657,25 @@ t.blogUrl=t.url.replace(/\/$/,""),t.blogTitle=t.title,delete t.url,delete t.titl
|
|
|
5657
5657
|
Ember.setProperties(this.config,t)}},s=d(a.prototype,"ajax",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),o=d(a.prototype,"ghostPaths",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),l=d(a.prototype,"session",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=d(a.prototype,"config",[t.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),a)
|
|
5658
5658
|
e.default=p})),define("ghost-admin/services/cookies",["exports","ember-cookies/services/cookies"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
5659
5659
|
var i=t.default
|
|
5660
|
-
e.default=i})),define("ghost-admin/services/custom-theme-settings",["exports","ember-concurrency"],(function(e,t){var
|
|
5661
|
-
function
|
|
5660
|
+
e.default=i})),define("ghost-admin/services/custom-theme-settings",["exports","@tryghost/nql","ember-concurrency"],(function(e,t,i){var n,r,a,s,o,l,u
|
|
5661
|
+
function c(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function d(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e
|
|
5662
5662
|
var i=e[Symbol.toPrimitive]
|
|
5663
5663
|
if(void 0!==i){var n=i.call(e,t||"default")
|
|
5664
5664
|
if("object"!=typeof n)return n
|
|
5665
5665
|
throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string")
|
|
5666
|
-
return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function
|
|
5666
|
+
return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function p(e,t,i,n,r){var a={}
|
|
5667
5667
|
return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
5668
|
-
let
|
|
5668
|
+
let m=(n=Ember.inject.service,r=Ember._tracked,a=Ember._tracked,s=class extends Ember.Service{constructor(...e){super(...e),c(this,"store",o,this),c(this,"settings",l,this),c(this,"settingGroups",u,this),d(this,"_hasLoaded",!1),d(this,"KNOWN_GROUPS",[{key:"homepage",name:"Homepage",icon:"house",previewType:"homepage"},{key:"post",name:"Post",icon:"post",previewType:"post"}])}get isDirty(){return!!this.settings.find((e=>e.hasDirtyAttributes))}get keyValueObject(){const e={}
|
|
5669
5669
|
return this.settings.forEach((t=>{e[t.key]=t.value})),e}load(){return this.loadTask.perform()}reload(){return this._hasLoaded=!1,this.loadTask.perform()}*loadTask(){if(this.hasLoaded)return this.settings
|
|
5670
5670
|
Ember.run((()=>this.store.unloadAll("custom-theme-setting")))
|
|
5671
5671
|
const e=yield this.store.findAll("custom-theme-setting")
|
|
5672
5672
|
return this.settings=e,this.settingGroups=this._buildSettingGroups(e),this._hasLoaded=!0,this.settings}save(){return this.saveTask.perform()}*saveTask(){if(Ember.isEmpty(this.settings))return this.settings
|
|
5673
5673
|
const e=this.store.createRecord("custom-theme-setting-list",{customThemeSettings:this.settings})
|
|
5674
|
-
return yield e.save(),this.store.unloadRecord(e),this.settings}rollback(){this.settings.forEach((e=>e.rollbackAttributes()))}_buildSettingGroups(e){if(!e||!e.length)return[]
|
|
5675
|
-
const
|
|
5676
|
-
return
|
|
5677
|
-
|
|
5678
|
-
e.default=
|
|
5674
|
+
return yield e.save(),this.store.unloadRecord(e),this.settings}rollback(){this.settings.forEach((e=>e.rollbackAttributes()))}rebuildSettingGroups(){this.settingGroups=this._buildSettingGroups(this.settings)}_buildSettingGroups(e){if(!e||!e.length)return[]
|
|
5675
|
+
const i=this.KNOWN_GROUPS.map((e=>e.key)),n=[],r=e.filter((e=>!i.includes(e.group)))
|
|
5676
|
+
return r.length&&n.push({key:"site-wide",name:"Site-wide",icon:"view-site",settings:r}),this.KNOWN_GROUPS.forEach((i=>{const r=e.filter((e=>e.group===i.key)).filter((e=>!e.visibility||(0,t.default)(e.visibility).queryJSON(this.keyValueObject)))
|
|
5677
|
+
r.length&&n.push(Object.assign({},i,{settings:r}))})),n}},o=p(s.prototype,"store",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),l=p(s.prototype,"settings",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),u=p(s.prototype,"settingGroups",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),p(s.prototype,"loadTask",[i.task],Object.getOwnPropertyDescriptor(s.prototype,"loadTask"),s.prototype),p(s.prototype,"saveTask",[i.task],Object.getOwnPropertyDescriptor(s.prototype,"saveTask"),s.prototype),s)
|
|
5678
|
+
e.default=m})),define("ghost-admin/services/custom-views",["exports","ghost-admin/components/modals/custom-view-form","ghost-admin/mixins/validation-engine","ember-concurrency"],(function(e,t,i,n){var r,a,s,o,l,u,c,d,p,m
|
|
5679
5679
|
function h(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function b(e,t,i,n,r){var a={}
|
|
5680
5680
|
return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
5681
5681
|
const g=["midgrey","blue","green","red","teal","purple","yellow","orange","pink"],f=Ember.Object.extend(i.default,{validationType:"customView",name:"",route:"",color:"",filter:null,isNew:!1,isDefault:!1,init(){this._super(...arguments),this.filter||(this.filter={}),this.color||(this.color=g[Math.floor(Math.random()*g.length)])},toJSON(){return{name:this.name,route:this.route,color:this.color,filter:this.filter}}}),v=[{route:"posts",name:"Drafts",color:"midgrey",icon:"pen",filter:{type:"draft"}},{route:"posts",name:"Scheduled",color:"midgrey",icon:"clock",filter:{type:"scheduled"}},{route:"posts",name:"Published",color:"midgray",icon:"published-post",filter:{type:"published"}}].map((e=>f.create(Object.assign({},e,{isDefault:!0}))))
|
|
@@ -5842,7 +5842,7 @@ try{return JSON.parse(e)||{}}catch(t){return{}}}get accessibility(){let e=this.g
|
|
|
5842
5842
|
try{return JSON.parse(e)||{}}catch(t){return{}}}fetch(){return this.settings.fetch().then((()=>(this.set("_user",this.session.user),this._setAdminTheme().then((()=>!0)))))}update(e,t,i={}){let n=i.user?"accessibility":"labs",r=this.get(i.user?"_user":"settings"),a=this.get(n)
|
|
5843
5843
|
return Ember.set(a,e,t),i.requires&&!0===t&&i.requires.forEach((e=>{Ember.set(a,e,!0)})),r.set(n,JSON.stringify(a)),r.save().then((()=>(this.notifyPropertyChange(n),this.get(`${n}.${e}`)))).catch((t=>{if(r.rollbackAttributes(),this.notifyPropertyChange(n),!t)throw new Ember.Error(`Validation of the feature service ${i.user?"user":"settings"} model failed when updating ${n}.`)
|
|
5844
5844
|
return this.notifications.showAPIError(t),this.get(`${n}.${e}`)}))}_setAdminTheme(e){let i=e
|
|
5845
|
-
return void 0===i&&(i=e||this.nightShift),this.lazyLoader.loadStyle("dark","assets/ghost-dark-
|
|
5845
|
+
return void 0===i&&(i=e||this.nightShift),this.lazyLoader.loadStyle("dark","assets/ghost-dark-d44be1f4bc4e8920af2416d1e56a341f.css",!0).then((()=>{(0,t.default)("link[title=dark]").prop("disabled",!i)})).catch((()=>{(0,t.default)("link[title=dark]").prop("disabled",!0)}))}},D=ue(M.prototype,"lazyLoader",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=ue(M.prototype,"notifications",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I=ue(M.prototype,"session",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=ue(M.prototype,"settings",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=ue(M.prototype,"store",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=ue(M.prototype,"config",[i.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=ue(M.prototype,"emailAnalytics",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=ue(M.prototype,"nightShift",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=ue(M.prototype,"referralInviteDismissed",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=ue(M.prototype,"urlCache",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=ue(M.prototype,"lexicalEditor",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=ue(M.prototype,"lexicalMultiplayer",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$=ue(M.prototype,"audienceFeedback",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y=ue(M.prototype,"webmentions",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=ue(M.prototype,"websockets",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=ue(M.prototype,"stripeAutomaticTax",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=ue(M.prototype,"emailCustomization",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),J=ue(M.prototype,"i18n",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X=ue(M.prototype,"announcementBar",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z=ue(M.prototype,"signupCard",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Q=ue(M.prototype,"signupForm",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ee=ue(M.prototype,"collections",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),te=ue(M.prototype,"adminXSettings",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ie=ue(M.prototype,"mailEvents",[j],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ne=ue(M.prototype,"collectionsCard",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),re=ue(M.prototype,"importMemberTier",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ae=ue(M.prototype,"tipsAndDonations",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),se=ue(M.prototype,"convertToLexical",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ue(M.prototype,"labs",[S],Object.getOwnPropertyDescriptor(M.prototype,"labs"),M.prototype),ue(M.prototype,"accessibility",[C],Object.getOwnPropertyDescriptor(M.prototype,"accessibility"),M.prototype),M)
|
|
5846
5846
|
e.default=de})),define("ghost-admin/services/frontend",["exports","fetch","validator","ghost-admin/decorators/inject"],(function(e,t,i,n){var r,a,s,o,l,u
|
|
5847
5847
|
function c(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function d(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e
|
|
5848
5848
|
var i=e[Symbol.toPrimitive]
|
|
@@ -6579,6 +6579,6 @@ var n=t.default.create({properties:["name","event","targetUrl","secret"],name(e)
|
|
|
6579
6579
|
e.default=n})),define("ghost-admin/views/application",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
6580
6580
|
var t=Ember.Component.extend({})
|
|
6581
6581
|
e.default=t})),define("ghost-admin/config/environment",[],(function(){try{var e="ghost-admin/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),i={default:JSON.parse(decodeURIComponent(t))}
|
|
6582
|
-
return Object.defineProperty(i,"__esModule",{value:!0}),i}catch(n){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("ghost-admin/app").default.create({version:"5.
|
|
6582
|
+
return Object.defineProperty(i,"__esModule",{value:!0}),i}catch(n){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("ghost-admin/app").default.create({version:"5.60",name:"ghost-admin"})
|
|
6583
6583
|
|
|
6584
|
-
//# sourceMappingURL=ghost-
|
|
6584
|
+
//# sourceMappingURL=ghost-fc7b85b759f27e607667914dcd685402.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%22cdnUrl%22%3A%22%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%22cdnUrl%22%3A%22%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.60%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-c2c2b6cf53d999c72995cafa4166b9fb.css" title="light">
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
</head>
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
<div id="ember-basic-dropdown-wormhole"></div>
|
|
58
58
|
|
|
59
59
|
<script src="assets/vendor-fff5b0b3c122441beb3170947ae27b9d.js"></script>
|
|
60
|
-
<script src="assets/chunk.208.
|
|
61
|
-
<script src="assets/chunk.143.
|
|
62
|
-
<script src="assets/ghost-
|
|
60
|
+
<script src="assets/chunk.208.735d31e95ce6fbd467b8.js"></script>
|
|
61
|
+
<script src="assets/chunk.143.88cad5b682130d4a2e2e.js"></script>
|
|
62
|
+
<script src="assets/ghost-fc7b85b759f27e607667914dcd685402.js"></script>
|
|
63
63
|
</body>
|
|
64
64
|
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const {SafeString} = require('../services/handlebars');
|
|
2
|
-
const {urlUtils, getFrontendKey, settingsCache} = require('../services/proxy');
|
|
2
|
+
const {labs, urlUtils, getFrontendKey, settingsCache} = require('../services/proxy');
|
|
3
3
|
const {getFrontendAppConfig, getDataAttributes} = require('../utils/frontend-apps');
|
|
4
4
|
|
|
5
5
|
module.exports = async function comments(options) {
|
|
@@ -50,14 +50,14 @@ module.exports = async function comments(options) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const frontendKey = await getFrontendKey();
|
|
53
|
-
const {scriptUrl
|
|
53
|
+
const {scriptUrl} = getFrontendAppConfig('comments');
|
|
54
54
|
|
|
55
55
|
const data = {
|
|
56
|
+
locale: labs.isSet('i18n') ? (settingsCache.get('locale') || 'en') : undefined,
|
|
56
57
|
'ghost-comments': urlUtils.getSiteUrl(),
|
|
57
58
|
api: urlUtils.urlFor('api', {type: 'content'}, true),
|
|
58
59
|
admin: urlUtils.urlFor('admin', true),
|
|
59
60
|
key: frontendKey,
|
|
60
|
-
styles: stylesUrl,
|
|
61
61
|
title: title,
|
|
62
62
|
count: count,
|
|
63
63
|
'post-id': this.id,
|
|
@@ -80,7 +80,7 @@ ghostBookshelf.plugin('bookshelf-relations', {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
// CASE: disable after hook for specific relations
|
|
83
|
-
if (['permissions_roles', 'members_newsletters'
|
|
83
|
+
if (['permissions_roles', 'members_newsletters'].indexOf(existing.relatedData.joinTableName) !== -1) {
|
|
84
84
|
return Promise.resolve();
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -4,6 +4,39 @@ const urlUtils = require('../../shared/url-utils');
|
|
|
4
4
|
const Collection = ghostBookshelf.Model.extend({
|
|
5
5
|
tableName: 'collections',
|
|
6
6
|
|
|
7
|
+
hooks: {
|
|
8
|
+
belongsToMany: {
|
|
9
|
+
/**
|
|
10
|
+
* @this {Collection}
|
|
11
|
+
* @param {*} existing
|
|
12
|
+
* @param {*} targets
|
|
13
|
+
* @param {*} options
|
|
14
|
+
*/
|
|
15
|
+
after(existing, targets, options) {
|
|
16
|
+
if (this.get('type') === 'automatic') {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const queryOptions = {
|
|
21
|
+
query: {
|
|
22
|
+
where: {}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return Promise.all(targets.models.map((target, index) => {
|
|
27
|
+
queryOptions.query.where[existing.relatedData.otherKey] = target.id;
|
|
28
|
+
|
|
29
|
+
return existing.updatePivot({
|
|
30
|
+
sort_order: index
|
|
31
|
+
}, {
|
|
32
|
+
...options,
|
|
33
|
+
...queryOptions
|
|
34
|
+
});
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
7
40
|
formatOnWrite(attrs) {
|
|
8
41
|
if (attrs.feature_image) {
|
|
9
42
|
attrs.feature_image = urlUtils.toTransformReady(attrs.feature_image);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
const logger = require('@tryghost/logging');
|
|
1
2
|
const Collection = require('@tryghost/collections').Collection;
|
|
3
|
+
const sentry = require('../../../shared/sentry');
|
|
2
4
|
/**
|
|
3
5
|
* @typedef {import('@tryghost/collections/src/CollectionRepository')} CollectionRepository
|
|
4
6
|
*/
|
|
@@ -61,24 +63,35 @@ module.exports = class BookshelfCollectionsRepository {
|
|
|
61
63
|
withRelated: ['collectionPosts']
|
|
62
64
|
});
|
|
63
65
|
|
|
64
|
-
return await Promise.all(models.map(model => this.#modelToCollection(model)));
|
|
66
|
+
return (await Promise.all(models.map(model => this.#modelToCollection(model)))).filter(entity => !!entity);
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
#modelToCollection(model) {
|
|
69
|
+
async #modelToCollection(model) {
|
|
68
70
|
const json = model.toJSON();
|
|
71
|
+
let filter = json.filter;
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
if (json.type === 'automatic' && typeof filter !== 'string') {
|
|
74
|
+
filter = '';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
try {
|
|
78
|
+
return await Collection.create({
|
|
79
|
+
id: json.id,
|
|
80
|
+
slug: json.slug,
|
|
81
|
+
title: json.title,
|
|
82
|
+
description: json.description,
|
|
83
|
+
filter: filter,
|
|
84
|
+
type: json.type,
|
|
85
|
+
featureImage: json.feature_image,
|
|
86
|
+
posts: json.collectionPosts.map(collectionPost => collectionPost.post_id),
|
|
87
|
+
createdAt: json.created_at,
|
|
88
|
+
updatedAt: json.updated_at
|
|
89
|
+
});
|
|
90
|
+
} catch (err) {
|
|
91
|
+
logger.error(err);
|
|
92
|
+
sentry.captureException(err);
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
82
95
|
}
|
|
83
96
|
|
|
84
97
|
/**
|
|
@@ -195,8 +195,7 @@
|
|
|
195
195
|
},
|
|
196
196
|
"comments": {
|
|
197
197
|
"url": "https://cdn.jsdelivr.net/ghost/comments-ui@~{version}/umd/comments-ui.min.js",
|
|
198
|
-
"
|
|
199
|
-
"version": "0.12"
|
|
198
|
+
"version": "0.13"
|
|
200
199
|
},
|
|
201
200
|
"editor": {
|
|
202
201
|
"url": "https://cdn.jsdelivr.net/ghost/koenig-lexical@~{version}/dist/koenig-lexical.umd.js",
|