mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 03:53:44 +08:00
FIX: Do not refresh all settings on save for all settings, limit to only a few
- Followup to 0e303c7f5d
- Automatically reloads site settings after saving only for the logo, logo_small and large_icon settings.
This commit is contained in:
parent
e1822034dc
commit
8b963bce37
|
@ -17,6 +17,8 @@ const CUSTOM_TYPES = [
|
||||||
"group_list"
|
"group_list"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const AUTO_REFRESH_ON_SAVE = ["logo", "logo_small", "large_icon"];
|
||||||
|
|
||||||
export default Ember.Mixin.create({
|
export default Ember.Mixin.create({
|
||||||
classNameBindings: [":row", ":setting", "overridden", "typeClass"],
|
classNameBindings: [":row", ":setting", "overridden", "typeClass"],
|
||||||
content: Ember.computed.alias("setting"),
|
content: Ember.computed.alias("setting"),
|
||||||
|
@ -113,7 +115,9 @@ export default Ember.Mixin.create({
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.set("validationMessage", null);
|
this.set("validationMessage", null);
|
||||||
this.commitBuffer();
|
this.commitBuffer();
|
||||||
|
if (AUTO_REFRESH_ON_SAVE.includes(this.get("setting.setting"))) {
|
||||||
this.afterSave();
|
this.afterSave();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user