This commit is contained in:
glax 2023-05-24 20:57:17 +02:00
parent ad971fb065
commit 68e80bc066
2 changed files with 24 additions and 1 deletions

View File

@ -79,7 +79,14 @@
</viewport>
<settingstab id="settingstab">
<p>Download Location: <span id="downloadLocation"></span></p>
<komga-settings>
<label for="komgaUrl"></label><input placeholder="URL" id="komgaUrl" type="text">
<label for="komgaUsername"></label><input placeholder="Username" id="komgaUsername" type="text">
<label for="komgaPassword"></label><input placeholder="Password" id="komgaPassword" type="password">
<label for="komgaUpdateTime">Update Time</label><input id="komgaUpdateTime" type="time" value="00:01">
<input type="submit" value="Update" onclick="UpdateSettingsClick()">;
</komga-settings>
</settingstab>
<script src="apiConnector.js"></script>

View File

@ -39,6 +39,12 @@ const pubviewcover = document.querySelector("#pubviewcover");
const publicationDelete = document.querySelector("publication-delete");
const publicationAdd = document.querySelector("publication-add");
const closetaskpopup = document.querySelector("#closePopupImg");
const settingDownloadLocation = document.querySelector("#downloadLocation");
const settingKomgaUrl = document.querySelector("#komgaURL");
const settingKomgaUser = document.querySelector("#komgaUsername");
const settingKomgaPass = document.querySelector("#komgaPassword");
const settingKomgaTime = document.querySelector("#komgaUpdateTime");
settingsCog.addEventListener("click", () => slide());
closetaskpopup.addEventListener("click", () => HideAddTaskPopup());
@ -193,6 +199,16 @@ const fadeInTiming = {
fill: "forwards"
}
function GetSettingsClick(){
}
function UpdateSettingsClick(){
var auth = atob(`${settingKomgaUser.value}:${settingKomgaPass.value}`)
UpdateSettings(settingDownloadLocation.value, settingKomgaUrl.value, auth);
CreateTask("UpdateKomgaLibrary", settingKomgaTime.value, "","","");
}
//Resets the tasks shown
ResetContent();
//Get Tasks and show them