Fix settings not being saved correctly
This commit is contained in:
parent
d9b4404075
commit
72e7a42c8d
@ -341,7 +341,7 @@ async function dictSettingsInitialize() {
|
|||||||
document.querySelector('#dict-extra-template'),
|
document.querySelector('#dict-extra-template'),
|
||||||
options.dictionaries
|
options.dictionaries
|
||||||
);
|
);
|
||||||
dictionaryUI.save = () => apiOptionsSave();
|
dictionaryUI.save = () => settingsSaveOptions();
|
||||||
|
|
||||||
document.querySelector('#dict-purge-button').addEventListener('click', (e) => onDictionaryPurgeButtonClick(e), false);
|
document.querySelector('#dict-purge-button').addEventListener('click', (e) => onDictionaryPurgeButtonClick(e), false);
|
||||||
document.querySelector('#dict-purge-confirm').addEventListener('click', (e) => onDictionaryPurge(e), false);
|
document.querySelector('#dict-purge-confirm').addEventListener('click', (e) => onDictionaryPurge(e), false);
|
||||||
@ -397,7 +397,7 @@ async function updateMainDictionarySelect(options, dictionaries) {
|
|||||||
|
|
||||||
if (options.general.mainDictionary !== value) {
|
if (options.general.mainDictionary !== value) {
|
||||||
options.general.mainDictionary = value;
|
options.general.mainDictionary = value;
|
||||||
apiOptionsSave();
|
settingsSaveOptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ async function onDictionaryMainChanged(e) {
|
|||||||
const optionsContext = getOptionsContext();
|
const optionsContext = getOptionsContext();
|
||||||
const options = await apiOptionsGet(optionsContext);
|
const options = await apiOptionsGet(optionsContext);
|
||||||
options.general.mainDictionary = value;
|
options.general.mainDictionary = value;
|
||||||
apiOptionsSave();
|
settingsSaveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ async function profileFormWrite(optionsFull) {
|
|||||||
$('#profile-add-condition-group')
|
$('#profile-add-condition-group')
|
||||||
);
|
);
|
||||||
profileConditionsContainer.save = () => {
|
profileConditionsContainer.save = () => {
|
||||||
apiOptionsSave();
|
settingsSaveOptions();
|
||||||
conditionsClearCaches(profileConditionsDescriptor);
|
conditionsClearCaches(profileConditionsDescriptor);
|
||||||
};
|
};
|
||||||
profileConditionsContainer.isolate = utilBackgroundIsolate;
|
profileConditionsContainer.isolate = utilBackgroundIsolate;
|
||||||
@ -166,7 +166,7 @@ async function onProfileOptionsChanged(e) {
|
|||||||
|
|
||||||
const optionsFull = await apiOptionsGetFull();
|
const optionsFull = await apiOptionsGetFull();
|
||||||
await profileFormRead(optionsFull);
|
await profileFormRead(optionsFull);
|
||||||
await apiOptionsSave();
|
await settingsSaveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onTargetProfileChanged() {
|
async function onTargetProfileChanged() {
|
||||||
@ -188,7 +188,7 @@ async function onProfileAdd() {
|
|||||||
optionsFull.profiles.push(profile);
|
optionsFull.profiles.push(profile);
|
||||||
currentProfileIndex = optionsFull.profiles.length - 1;
|
currentProfileIndex = optionsFull.profiles.length - 1;
|
||||||
await profileOptionsUpdateTarget(optionsFull);
|
await profileOptionsUpdateTarget(optionsFull);
|
||||||
await apiOptionsSave();
|
await settingsSaveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onProfileRemove(e) {
|
async function onProfileRemove(e) {
|
||||||
@ -226,7 +226,7 @@ async function onProfileRemoveConfirm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await profileOptionsUpdateTarget(optionsFull);
|
await profileOptionsUpdateTarget(optionsFull);
|
||||||
await apiOptionsSave();
|
await settingsSaveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onProfileNameChanged() {
|
function onProfileNameChanged() {
|
||||||
|
@ -318,7 +318,7 @@ async function audioSettingsInitialize() {
|
|||||||
const optionsContext = getOptionsContext();
|
const optionsContext = getOptionsContext();
|
||||||
const options = await apiOptionsGet(optionsContext);
|
const options = await apiOptionsGet(optionsContext);
|
||||||
audioSourceUI = new AudioSourceUI.Container(options.audio.sources, $('.audio-source-list'), $('.audio-source-add'));
|
audioSourceUI = new AudioSourceUI.Container(options.audio.sources, $('.audio-source-list'), $('.audio-source-add'));
|
||||||
audioSourceUI.save = () => apiOptionsSave();
|
audioSourceUI.save = () => settingsSaveOptions();
|
||||||
|
|
||||||
textToSpeechInitialize();
|
textToSpeechInitialize();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user