Ghost/core/server/services/themes/index.js
Kevin Ansfield cabf78e938 Cleaned up customThemeSettings labs flag
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
2022-01-03 17:45:25 +00:00

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
}
};