mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 14:22:07 +03:00
58fda5bad2
no issue - We had previously allowed accent_color setting for member site settings behind portal flag, but Ghost Admin also needs the public site setting with accent color to correctly reflect the accent color when flag is switched on - Removes deletion of accent color setting when behind the Portal flag OR dev experiment flag
32 lines
976 B
JavaScript
32 lines
976 B
JavaScript
const ghostVersion = require('../../lib/ghost-version');
|
|
const settingsCache = require('../../services/settings/cache');
|
|
const urlUtils = require('../../../shared/url-utils');
|
|
const config = require('../../../shared/config');
|
|
|
|
const site = {
|
|
docName: 'site',
|
|
|
|
read: {
|
|
permissions: false,
|
|
query() {
|
|
const response = {
|
|
title: settingsCache.get('title'),
|
|
description: settingsCache.get('description'),
|
|
logo: settingsCache.get('logo'),
|
|
accent_color: settingsCache.get('accent_color'),
|
|
url: urlUtils.urlFor('home', true),
|
|
version: ghostVersion.safe
|
|
};
|
|
|
|
// accent_color is currently an experimental feature
|
|
if (!config.get('enableDeveloperExperiments') && !config.get('portal')) {
|
|
delete response.accent_color;
|
|
}
|
|
|
|
return response;
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = site;
|