mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: display custom sections with default theme
also cleans up mechanism for previewing themes, cleans up naming, gets rid of old janky "preview_style", secures local theme key
This commit is contained in:
@@ -81,7 +81,7 @@ export default Ember.Controller.extend({
|
||||
});
|
||||
},
|
||||
|
||||
previewUrl: url('model.key', '/?preview-style=%@'),
|
||||
previewUrl: url('model.id', '/admin/themes/%@/preview'),
|
||||
|
||||
maximizeIcon: function() {
|
||||
return this.get('maximized') ? 'compress' : 'expand';
|
||||
@@ -95,9 +95,6 @@ export default Ember.Controller.extend({
|
||||
return !this.get('model.changed') || this.get('model.isSaving');
|
||||
}.property('model.changed', 'model.isSaving'),
|
||||
|
||||
undoPreviewUrl: url('/?preview-style='),
|
||||
defaultStyleUrl: url('/?preview-style=default'),
|
||||
|
||||
actions: {
|
||||
save() {
|
||||
this.get('model').saveChanges("theme_fields");
|
||||
|
||||
@@ -25,6 +25,8 @@ export default Ember.Controller.extend({
|
||||
return descriptions.reject(d=>Em.isBlank(d));
|
||||
},
|
||||
|
||||
previewUrl: url('model.id', '/admin/themes/%@/preview'),
|
||||
|
||||
@computed("colorSchemeId", "model.color_scheme_id")
|
||||
colorSchemeChanged(colorSchemeId, existingId) {
|
||||
colorSchemeId = colorSchemeId === null ? null : parseInt(colorSchemeId);
|
||||
|
||||
Reference in New Issue
Block a user