mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Swapped feature
card setting for isAvailable
no issue - the number of properties that cards have in their definition was growing so it made sense to drop the single-use `feature` property in favor of the `isAvailable` property that can perform the same functionality
This commit is contained in:
parent
4ca14b8eee
commit
5268ad1f77
2 changed files with 5 additions and 9 deletions
|
@ -18,10 +18,6 @@ export default class CardIsAvailableHelper extends Helper {
|
|||
cardIsAvailable = cardIsAvailable && this.config.get('enableDeveloperExperiments');
|
||||
}
|
||||
|
||||
if (card.feature) {
|
||||
cardIsAvailable = cardIsAvailable && get(this.feature, card.feature);
|
||||
}
|
||||
|
||||
if (postType && card.postType) {
|
||||
cardIsAvailable = cardIsAvailable && card.postType === postType;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ export const CARD_MENU = [
|
|||
matches: ['button'],
|
||||
type: 'card',
|
||||
replaceArg: 'button',
|
||||
feature: 'buttonCard'
|
||||
isAvailable: 'feature.buttonCard'
|
||||
},
|
||||
{
|
||||
label: 'Callout',
|
||||
|
@ -165,7 +165,7 @@ export const CARD_MENU = [
|
|||
matches: ['callout'],
|
||||
type: 'card',
|
||||
replaceArg: 'callout',
|
||||
feature: 'calloutCard'
|
||||
isAvailable: 'feature.calloutCard'
|
||||
},
|
||||
{
|
||||
label: 'Toggle',
|
||||
|
@ -174,7 +174,7 @@ export const CARD_MENU = [
|
|||
matches: ['toggle'],
|
||||
type: 'card',
|
||||
replaceArg: 'toggle',
|
||||
feature: 'accordionCard'
|
||||
isAvailable: 'feature.accordionCard'
|
||||
}]
|
||||
},
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ export const CARD_MENU = [
|
|||
payload: {
|
||||
imageSelector: 'tenor'
|
||||
},
|
||||
feature: 'gifsCard'
|
||||
isAvailable: 'feature.gifsCard'
|
||||
},
|
||||
{
|
||||
label: 'Vimeo',
|
||||
|
@ -272,7 +272,7 @@ export const CARD_MENU = [
|
|||
type: 'card',
|
||||
replaceArg: 'embed',
|
||||
params: ['url'],
|
||||
feature: 'nftCard'
|
||||
isAvailable: 'feature.nftCard'
|
||||
},
|
||||
{
|
||||
label: 'Other...',
|
||||
|
|
Loading…
Add table
Reference in a new issue