0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added new settings for pintura editor integration (#16682)

refs https://github.com/TryGhost/Team/issues/3034

- adds 3 new settings for managing pintura image editor integration in
admin
- `pintura` setting controls the enabling of the feature
- `pintura_css_url` is used to store path to pintura css file uploaded
on integration page
- `pintura_js_url` is used to store path to pintura js file uploaded on
integration page
This commit is contained in:
Rishabh Garg 2023-04-20 19:19:56 +05:30 committed by GitHub
parent 71052cb33e
commit bd127eae6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,22 @@
const {combineTransactionalMigrations, addSetting} = require('../../utils');
module.exports = combineTransactionalMigrations(
addSetting({
key: 'pintura',
value: 'false',
type: 'boolean',
group: 'pintura'
}),
addSetting({
key: 'pintura_js_url',
value: null,
type: 'string',
group: 'pintura'
}),
addSetting({
key: 'pintura_css_url',
value: null,
type: 'string',
group: 'pintura'
})
);

View file

@ -533,5 +533,27 @@
},
"type": "boolean"
}
},
"pintura": {
"pintura": {
"defaultValue": "false",
"validations": {
"isIn": [
[
"true",
"false"
]
]
},
"type": "boolean"
},
"pintura_js_url": {
"defaultValue": null,
"type": "string"
},
"pintura_css_url": {
"defaultValue": null,
"type": "string"
}
}
}

View file

@ -236,7 +236,7 @@ describe('Exporter', function () {
// NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength
// This is a reminder to think about the importer/exporter scenarios ;)
const allowedKeysLength = 79;
const allowedKeysLength = 82;
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
});
});

View file

@ -37,7 +37,7 @@ describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = '00c8616470de50a6716369511a39eca9';
const currentFixturesHash = '869ceb3302303494c645f4201540ead3';
const currentSettingsHash = '7b80d26ccced791da70ca5c753959689';
const currentSettingsHash = 'e417c8e87e736f9421358117eb94af02';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
// If this test is failing, then it is likely a change has been made that requires a DB version bump,