diff --git a/Website/apiConnector.js b/Website/apiConnector.js
index 43276b1..dd07d41 100644
--- a/Website/apiConnector.js
+++ b/Website/apiConnector.js
@@ -163,6 +163,11 @@ function UpdateDownloadLocation(downloadLocation){
PostData(uri);
}
+function ChangeStyleSheet(sheet){
+ var uri = `${apiUri}/Settings/ChangeStyleSheet?styleSheet=${sheet}`;
+ PostData(uri);
+}
+
function UpdateKomga(komgaUrl, komgaAuth){
var uri = `${apiUri}/LibraryConnectors/Update?libraryConnector=Komga&komgaUrl=${komgaUrl}&komgaAuth=${komgaAuth}`;
PostData(uri);
diff --git a/Website/index.html b/Website/index.html
index 10bda53..ef7a60a 100644
--- a/Website/index.html
+++ b/Website/index.html
@@ -3,7 +3,7 @@
Tranga
-
+
@@ -91,6 +91,10 @@
Configured: ✅❌
+
+
+
+
diff --git a/Website/interaction.js b/Website/interaction.js
index 5fcaf1d..9d81bc4 100644
--- a/Website/interaction.js
+++ b/Website/interaction.js
@@ -37,6 +37,7 @@ const settingKavitaConfigured = document.querySelector("#kavitaConfigured");
const settingGotifyConfigured = document.querySelector("#gotifyConfigured");
const settingLunaseaConfigured = document.querySelector("#lunaseaConfigured");
const settingApiUri = document.querySelector("#settingApiUri");
+const settingMangaHoverCheckbox = document.querySelector("#mangaHoverCheckbox");
const newMangaPopup = document.querySelector("#newMangaPopup");
const newMangaConnector = document.querySelector("#newMangaConnector");
const newMangaTitle = document.querySelector("#newMangaTitle");
@@ -271,11 +272,19 @@ function OpenSettings(){
settingGotifyAppToken.value = "";
settingLunaseaWebhook.value = "";
settingApiUri.value = "";
+ settingMangaHoverCheckbox.checked = false;
GetSettings().then((json) => {
//console.log(json);
settingDownloadLocation.innerText = json.downloadLocation;
settingApiUri.placeholder = apiUri;
+ if (json.styleSheet == 'default') {
+ settingMangaHoverCheckbox.checked = false;
+ document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css');
+ } else {
+ settingMangaHoverCheckbox.checked = true;
+ document.getElementById('pagestyle').setAttribute('href', 'styles/style_mangahover.css');
+ }
});
GetLibraryConnectors().then((json) => {
//console.log(json);
@@ -328,6 +337,15 @@ function UpdateSettings(){
setCookie("apiUri", apiUri);
Setup();
}
+
+ // If the checkbox is checked, set the style to style_mangahover.css and
+ if (document.getElementById("mangaHoverCheckbox").checked == true){
+ ChangeStyleSheet('hover')
+ console.log('Changing theme to mangahover')
+ } else {
+ ChangeStyleSheet('default');
+ console.log('Changing theme to default')
+ }
if(settingKomgaUrl.value != "" &&
settingKomgaUser.value != "" &&
@@ -373,7 +391,6 @@ function UpdateJobs(){
monitoringJobsCount = json.length;
}
});
-
GetWaitingJobs().then((json) => {
jobsQueuedTag.innerText = json.length;
diff --git a/Website/style_default.css b/Website/styles/style_default.css
similarity index 100%
rename from Website/style_default.css
rename to Website/styles/style_default.css
diff --git a/Website/style_mangahover.css b/Website/styles/style_mangahover.css
similarity index 100%
rename from Website/style_mangahover.css
rename to Website/styles/style_mangahover.css