mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
640499af70
closes https://github.com/TryGhost/Ghost/issues/8127 - update theme activation to manually set other themes to `active: false` in the store now that we only the active theme back from `/themes/:name/activate` endpoint - move theme warning list item rendering into `{{gh-theme-error-li error=x}}` - add `theme-warnings` modal that accepts a warnings list, title, and optional message - after activating a theme, check if the theme has any warnings or errors and display an appropriate modal informing the user
15 lines
346 B
JavaScript
15 lines
346 B
JavaScript
import ApplicationAdapter from './application';
|
|
|
|
export default ApplicationAdapter.extend({
|
|
|
|
activate(model) {
|
|
let url = `${this.buildURL('theme', model.get('id'))}activate/`;
|
|
|
|
return this.ajax(url, 'PUT', {data: {}}).then((data) => {
|
|
this.store.pushPayload(data);
|
|
return model;
|
|
});
|
|
}
|
|
|
|
});
|