mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 13:43:49 +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"
|
||||
];
|
||||
|
||||
const AUTO_REFRESH_ON_SAVE = ["logo", "logo_small", "large_icon"];
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
classNameBindings: [":row", ":setting", "overridden", "typeClass"],
|
||||
content: Ember.computed.alias("setting"),
|
||||
|
@ -113,7 +115,9 @@ export default Ember.Mixin.create({
|
|||
.then(() => {
|
||||
this.set("validationMessage", null);
|
||||
this.commitBuffer();
|
||||
this.afterSave();
|
||||
if (AUTO_REFRESH_ON_SAVE.includes(this.get("setting.setting"))) {
|
||||
this.afterSave();
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user