diff --git a/app/core/src/main/resources/static/js/darkmode.js b/app/core/src/main/resources/static/js/darkmode.js
index abfe737c9..0cfd37d37 100644
--- a/app/core/src/main/resources/static/js/darkmode.js
+++ b/app/core/src/main/resources/static/js/darkmode.js
@@ -45,6 +45,25 @@ function setMode(mode) {
tables.forEach((table) => {
table.classList.add("table-dark");
});
+
+ // Handle dynamically created accordion elements
+ var accordionItems = document.querySelectorAll(".accordion-item");
+ accordionItems.forEach((item) => {
+ item.style.color = "var(--md-sys-color-on-surface)";
+ item.style.backgroundColor = "var(--md-sys-color-surface-5)";
+ item.style.border = "1px solid var(--md-sys-color-outline-variant)";
+ });
+ var accordionButtons = document.querySelectorAll(".accordion-button");
+ accordionButtons.forEach((button) => {
+ button.style.color = "var(--md-sys-color-on-surface)";
+ button.style.backgroundColor = "var(--md-sys-color-surface-5)";
+ button.style.borderColor = "var(--md-sys-color-outline-variant)";
+ });
+ var accordionBodies = document.querySelectorAll(".accordion-body");
+ accordionBodies.forEach((body) => {
+ body.style.color = "var(--md-sys-color-on-surface)";
+ body.style.backgroundColor = "var(--md-sys-color-surface-5)";
+ });
} else if (mode === "off") {
if (elements && elements.darkModeIcon) {
elements.darkModeIcon.textContent = "light_mode";
diff --git a/app/core/src/main/resources/static/js/githubVersion.js b/app/core/src/main/resources/static/js/githubVersion.js
index d71266fae..059fcccfa 100644
--- a/app/core/src/main/resources/static/js/githubVersion.js
+++ b/app/core/src/main/resources/static/js/githubVersion.js
@@ -21,19 +21,19 @@ function getDownloadUrl() {
if (machineType === 'Docker' || machineType === 'Kubernetes') {
return null;
}
-
+
const baseUrl = 'https://files.stirlingpdf.com/';
-
+
// Determine file based on machine type and security
if (machineType === 'Server-jar') {
return baseUrl + (activeSecurity ? 'Stirling-PDF-with-login.jar' : 'Stirling-PDF.jar');
}
-
+
// Client installations
if (machineType.startsWith('Client-')) {
const os = machineType.replace('Client-', ''); // win, mac, unix
const type = activeSecurity ? '-server-security' : '-server';
-
+
if (os === 'unix') {
return baseUrl + os + type + '.jar';
} else if (os === 'win') {
@@ -42,7 +42,7 @@ function getDownloadUrl() {
return baseUrl + os + '-installer.dmg';
}
}
-
+
return null;
}
@@ -145,10 +145,10 @@ async function checkForUpdate() {
console.log("updateSummary=", updateSummary);
console.log("currentVersion=" + currentVersion);
console.log("latestVersion=" + updateSummary.latest_version);
-
+
if (updateSummary.latest_version && compareVersions(updateSummary.latest_version, currentVersion) > 0) {
const priority = updateSummary.max_priority || 'normal';
-
+
if (updateBtn != null) {
// Style button based on priority
if (priority === 'urgent') {
@@ -161,11 +161,11 @@ async function checkForUpdate() {
updateBtn.classList.add("btn-outline-primary");
updateBtn.innerHTML = "Update Available";
}
-
+
// Store summary for initial display
updateBtn.setAttribute('data-update-summary', JSON.stringify(updateSummary));
updateBtn.style.display = "block";
-
+
// Add click handler for update details modal
updateBtn.onclick = function(e) {
e.preventDefault();
@@ -202,7 +202,7 @@ async function showUpdateModal() {
// Get summary data from button
const updateBtn = document.getElementById("update-btn");
const summaryData = JSON.parse(updateBtn.getAttribute('data-update-summary'));
-
+
// Utility function to escape HTML special characters
function escapeHtml(str) {
if (typeof str !== 'string') return str;
@@ -249,14 +249,14 @@ async function showUpdateModal() {
${summaryData.recommended_action ? `
Recommended Action: ${escapeHtml(summaryData.recommended_action)}` : ''}
-
+
${summaryData.any_breaking ? `
This update contains breaking changes. Please review the migration guides below.
${version.announcement.message}
@@ -342,13 +354,34 @@ async function showUpdateModal() {