mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
cabf78e938
closes https://github.com/TryGhost/Team/issues/1164 - `customThemeSettings` feature is GA so any conditionals can be cleaned up - removed conditional loading of custom theme settings and associated API routes - removed event trigger for reloading custom theme settings when the feature flag is toggled - removed flag from labs GA list
34 lines
865 B
JavaScript
34 lines
865 B
JavaScript
const activate = require('./activate');
|
|
const themeLoader = require('./loader');
|
|
const storage = require('./storage');
|
|
const getJSON = require('./to-json');
|
|
const installer = require('./installer');
|
|
|
|
const settingsCache = require('../../../shared/settings-cache');
|
|
|
|
module.exports = {
|
|
/*
|
|
* Load the currently active theme
|
|
*/
|
|
init: async () => {
|
|
const themeName = settingsCache.get('active_theme');
|
|
|
|
return activate.loadAndActivate(themeName);
|
|
},
|
|
/**
|
|
* Load all inactive themes
|
|
*/
|
|
loadInactiveThemes: themeLoader.loadAllThemes,
|
|
/**
|
|
* Methods used in the API
|
|
*/
|
|
api: {
|
|
getJSON,
|
|
activate: activate.activate,
|
|
getZip: storage.getZip,
|
|
setFromZip: storage.setFromZip,
|
|
installFromGithub: installer.installFromGithub,
|
|
destroy: storage.destroy
|
|
}
|
|
};
|