Rename new Settings.saveSettings to Settings.mergeSettings
This commit is contained in:
parent
dcb2704a28
commit
0cfb6d36ca
|
@ -41,7 +41,7 @@ export default class {
|
||||||
/**
|
/**
|
||||||
* Update css in client
|
* Update css in client
|
||||||
* @param {String} scss scss to compile
|
* @param {String} scss scss to compile
|
||||||
* @param {bool} sendSource send to css editor instance
|
* @param {bool} sendSource send to css editor instance
|
||||||
*/
|
*/
|
||||||
static updateScss(scss, sendSource) {
|
static updateScss(scss, sendSource) {
|
||||||
if (sendSource)
|
if (sendSource)
|
||||||
|
@ -86,7 +86,7 @@ export default class {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send css to open editor
|
* Send css to open editor
|
||||||
* @param {any} channel
|
* @param {any} channel
|
||||||
* @param {any} data
|
* @param {any} data
|
||||||
*/
|
*/
|
||||||
static async sendToEditor(channel, data) {
|
static async sendToEditor(channel, data) {
|
||||||
|
@ -94,14 +94,14 @@ export default class {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current uncompiled scss
|
* Current uncompiled scss
|
||||||
*/
|
*/
|
||||||
static get scss() {
|
static get scss() {
|
||||||
return this._scss || '';
|
return this._scss || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set current scss
|
* Set current scss
|
||||||
*/
|
*/
|
||||||
static set scss(scss) {
|
static set scss(scss) {
|
||||||
this.updateScss(scss, true);
|
this.updateScss(scss, true);
|
||||||
|
|
|
@ -113,7 +113,7 @@ export default class {
|
||||||
return setting ? setting.value : undefined;
|
return setting ? setting.value : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static saveSettings(set_id, newSettings, settingsUpdated) {
|
static mergeSettings(set_id, newSettings, settingsUpdated) {
|
||||||
const set = this.getSet(set_id);
|
const set = this.getSet(set_id);
|
||||||
if (!set) return;
|
if (!set) return;
|
||||||
const updatedSettings = [];
|
const updatedSettings = [];
|
||||||
|
@ -132,6 +132,7 @@ export default class {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.saveSettings();
|
||||||
return settingsUpdated ? settingsUpdated(updatedSettings) : updatedSettings;
|
return settingsUpdated ? settingsUpdated(updatedSettings) : updatedSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default class {
|
||||||
static internalSettings(set_id) {
|
static internalSettings(set_id) {
|
||||||
const set = Settings.getSet(set_id);
|
const set = Settings.getSet(set_id);
|
||||||
if (!set) return;
|
if (!set) return;
|
||||||
return this.settings(set.headertext, set.settings, null, null, newSettings => Settings.saveSettings(set.id, newSettings));
|
return this.settings(set.headertext, set.settings, null, null, newSettings => Settings.mergeSettings(set.id, newSettings));
|
||||||
}
|
}
|
||||||
|
|
||||||
static contentSettings(content) {
|
static contentSettings(content) {
|
||||||
|
|
Loading…
Reference in New Issue