Fixes https://github.com/C9Glax/tranga/issues/171 Overwrites for settingsg that weren't changed on the frontend.

This commit is contained in:
glax 2024-04-22 21:53:12 +02:00
parent 5b52577610
commit 38572a3a46

View File

@ -560,8 +560,8 @@ function OpenSettings(){
GetSettings().then((json) => {
//console.log(json);
settingApiUri.value = apiUri;
settingUserAgent.value = json.userAgent;
settingApiUri.placeholder = apiUri;
settingUserAgent.placeholder = json.userAgent;
//console.log(json.styleSheet);
});
GetRateLimits().then((json) => {
@ -578,15 +578,15 @@ function OpenSettings(){
switch(libraryConnectorTypes[connector.libraryType]){
case "Kavita":
settingKavitaConfigured.setAttribute("configuration", "Active");
settingKavitaUrl.value = connector.baseUrl;
settingKavitaUser.value = "***";
settingKavitaPass.value = "***";
settingKavitaUrl.placeholder = connector.baseUrl;
settingKavitaUser.placeholder = "***";
settingKavitaPass.placeholder = "***";
break;
case "Komga":
settingKomgaConfigured.setAttribute("configuration", "Active");
settingKomgaUrl.value = connector.baseUrl;
settingKomgaUser.value = "***";
settingKomgaPass.value = "***";
settingKomgaUrl.placeholder = connector.baseUrl;
settingKomgaUser.placeholder = "***";
settingKomgaPass.placeholder = "***";
break;
default:
console.log("Unknown type");
@ -599,18 +599,18 @@ function OpenSettings(){
json.forEach(connector => {
switch(notificationConnectorTypes[connector.notificationConnectorType]){
case "Gotify":
settingGotifyUrl.value = connector.endpoint;
settingGotifyAppToken.value = "***";
settingGotifyUrl.placeholder = connector.endpoint;
settingGotifyAppToken.placeholder = "***";
settingGotifyConfigured.setAttribute("configuration", "Active");
break;
case "LunaSea":
settingLunaseaConfigured.setAttribute("configuration", "Active");
settingLunaseaWebhook.value = connector.id;
settingLunaseaWebhook.placeholder = connector.id;
break;
case "Ntfy":
settingNtfyConfigured.setAttribute("configuration", "Active");
settingNtfyEndpoint.value = connector.endpoint;
settingNtfyAuth.value = "***";
settingNtfyEndpoint.placeholder = connector.endpoint;
settingNtfyAuth.placeholder = "***";
break;
default:
console.log("Unknown type");