2
0

Remove Enter input from settings, instead update all settings on click of "Update" Button.

resolves #38
This commit is contained in:
glax 2023-07-30 17:27:47 +02:00
parent 1afa3df316
commit 98ec0b837f

View File

@ -70,13 +70,6 @@ createDownloadChapterTaskButton.addEventListener("click", () => {
OpenDownloadChapterTaskPopup(); OpenDownloadChapterTaskPopup();
}); });
publicationTaskStart.addEventListener("click", () => StartTaskClick()); publicationTaskStart.addEventListener("click", () => StartTaskClick());
settingApiUri.addEventListener("keypress", (event) => {
if(event.key === "Enter"){
apiUri = settingApiUri.value;
setTimeout(() => GetSettingsClick(), 100);
document.cookie = `apiUri=${apiUri};`;
}
});
searchPublicationQuery.addEventListener("keypress", (event) => { searchPublicationQuery.addEventListener("keypress", (event) => {
if(event.key === "Enter"){ if(event.key === "Enter"){
NewSearch(); NewSearch();
@ -353,6 +346,11 @@ function UpdateLibrarySettings(){
UpdateLunaSea(settingLunaseaWebhook.value); UpdateLunaSea(settingLunaseaWebhook.value);
} }
if(settingApiUri.value != ""){
apiUri = settingApiUri.value;
document.cookie = `apiUri=${apiUri};`;
}
setTimeout(() => GetSettingsClick(), 200); setTimeout(() => GetSettingsClick(), 200);
} }