From fe7c0c2aefe171368ea94990ca46e310795c501f Mon Sep 17 00:00:00 2001 From: Yannick Reekmans Date: Tue, 25 Aug 2020 12:08:37 +0000 Subject: [PATCH] Add v3.31.2 --- core/server/api/canary/members.js | 14 ++++++++++++-- core/server/services/mega/template.js | 16 +++++----------- package.json | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/core/server/api/canary/members.js b/core/server/api/canary/members.js index b15f9705b7..dc9574de39 100644 --- a/core/server/api/canary/members.js +++ b/core/server/api/canary/members.js @@ -610,7 +610,7 @@ module.exports = { invalid.count = invalid.count + 1; } }); - }).then(() => { + }).then(async () => { // NOTE: grouping by context because messages can contain unique data like "customer_id" const groupedErrors = _.groupBy(invalid.errors, 'context'); const uniqueErrors = _.uniqBy(invalid.errors, 'context'); @@ -634,6 +634,11 @@ module.exports = { invalid.errors = outputErrors; + if (imported.count === 0 && importLabel) { + await models.Label.destroy(Object.assign({}, {id: importLabel.id}, frame.options)); + importLabel = null; + } + return { meta: { stats: { @@ -714,7 +719,7 @@ module.exports = { importSetLabels, createdBy }); - }).then((result) => { + }).then(async (result) => { invalid.errors = invalid.errors.concat(result.invalid.errors); invalid.count += result.invalid.count; imported.count += result.imported.count; @@ -741,6 +746,11 @@ module.exports = { invalid.errors = outputErrors; + if (imported.count === 0 && importLabel) { + await models.Label.destroy(Object.assign({}, {id: importLabel.id}, frame.options)); + importLabel = null; + } + return { meta: { stats: { diff --git a/core/server/services/mega/template.js b/core/server/services/mega/template.js index 141ab3426c..8dd1671b4d 100644 --- a/core/server/services/mega/template.js +++ b/core/server/services/mega/template.js @@ -407,22 +407,16 @@ figure blockquote p { } .kg-bookmark-thumbnail { - position: relative; min-width: 140px; max-width: 180px; - max-height: 100%; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + border-radius: 0 2px 2px 0; } .kg-bookmark-thumbnail img { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border-radius: 0 3px 3px 0; - - object-fit: cover; - max-height: 100%; + display: none; } .kg-bookmark-metadata { diff --git a/package.json b/package.json index dd002e7145..85abd1d429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghost", - "version": "3.31.1", + "version": "3.31.2", "description": "The professional publishing platform", "author": "Ghost Foundation", "homepage": "https://ghost.org", @@ -51,7 +51,7 @@ "@tryghost/job-manager": "0.1.0", "@tryghost/kg-card-factory": "2.1.2", "@tryghost/kg-default-atoms": "2.0.2", - "@tryghost/kg-default-cards": "2.6.0", + "@tryghost/kg-default-cards": "2.6.1", "@tryghost/kg-markdown-html-renderer": "2.0.2", "@tryghost/kg-mobiledoc-html-renderer": "3.0.1", "@tryghost/magic-link": "0.4.13", diff --git a/yarn.lock b/yarn.lock index 7dbac675b5..164f05808f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -452,10 +452,10 @@ resolved "https://registry.yarnpkg.com/@tryghost/kg-default-atoms/-/kg-default-atoms-2.0.2.tgz#b8a1143bb0fa559cd46a96181c91771a35a3547b" integrity sha512-cV9FcTatyyf6QgOgNJ56sZmxu+rj3W105owcJatGuNtMx4hWrKupnvzxt7HXNBlAzwNrct7m9trrDFk+ghj1xw== -"@tryghost/kg-default-cards@2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-2.6.0.tgz#c5662c6c0c8017ad798a9c28204220478755688d" - integrity sha512-r/820/Y+WxYcDTYxytfBeScABqBP13tXPrUlClnsWGGaTXTSsLOT8goDyuR+P1Q8U+ezYJQkk1EvdE55aDDEOw== +"@tryghost/kg-default-cards@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-2.6.1.tgz#36a6b8f6bf68ec14e2d00848cd66faf2fbe06207" + integrity sha512-EsLqsW4b59M1B5PyAybVI6zaNY5EJQ/1IQBmw3eVLGY4yJURzkQbcNygZgQ/0xXtjC5zypHMJiYuvgalf63QMw== dependencies: "@tryghost/kg-markdown-html-renderer" "^2.0.2" "@tryghost/url-utils" "^0.6.14"