FEATURE: Add auto update field to themes (#11102)

Themes marked for auto update will be automatically updated when
Discourse is updated. This is triggered by discourse_docker or
docker_manager running Rake task 'themes:update'.
This commit is contained in:
Dan Ungureanu
2020-11-16 14:44:09 +02:00
committed by GitHub
parent 0853208d67
commit bc8423a1bf
8 changed files with 48 additions and 7 deletions

View File

@ -35,6 +35,11 @@ export default Controller.extend({
childThemesNames: mapBy("model.childThemes", "name"),
extraFiles: filterBy("model.theme_fields", "target", "extra_js"),
@discourseComputed("model.component", "model.remote_theme")
showCheckboxes() {
return !this.model.component || this.model.remote_theme;
},
@discourseComputed("model.editedFields")
editedFieldsFormatted() {
const descriptions = [];
@ -304,6 +309,10 @@ export default Controller.extend({
this.model.saveChanges("user_selectable");
},
applyAutoUpdateable() {
this.model.saveChanges("auto_update");
},
addChildTheme() {
let themeId = parseInt(this.selectedChildThemeId, 10);
let theme = this.allThemes.findBy("id", themeId);