diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 928b0ec96..644378d12 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -49,7 +49,7 @@ "java.configuration.updateBuildConfiguration": "interactive", "java.format.enabled": true, "java.format.settings.profile": "GoogleStyle", - "java.format.settings.google.version": "1.25.2", + "java.format.settings.google.version": "1.26.0", "java.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting", "java.saveActions.cleanup": true, "java.cleanup.actions": [ diff --git a/.github/workflows/PR-Demo-Comment-with-react.yml b/.github/workflows/PR-Demo-Comment-with-react.yml index fb196ca3a..105fb60b1 100644 --- a/.github/workflows/PR-Demo-Comment-with-react.yml +++ b/.github/workflows/PR-Demo-Comment-with-react.yml @@ -186,7 +186,7 @@ jobs: file: ./Dockerfile push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:pr-${{ needs.check-comment.outputs.pr_number }} - build-args: VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }} + build-args: VERSION_TAG=alpha platforms: linux/amd64 - name: Set up SSH diff --git a/.github/workflows/multiOSReleases.yml b/.github/workflows/multiOSReleases.yml index b8c463bf6..28a5bd32b 100644 --- a/.github/workflows/multiOSReleases.yml +++ b/.github/workflows/multiOSReleases.yml @@ -2,13 +2,13 @@ name: Test Installers Build on: workflow_dispatch: - release: - types: [created] inputs: test_mode: - description: "Run in test mode (skips release step)" + description: "Run in test mode (skip release step)" required: false default: "false" + release: + types: [created] permissions: contents: read @@ -175,7 +175,7 @@ jobs: STIRLING_PDF_DESKTOP_UI: true BROWSER_OPEN: true - - name: ☕ Set up JDK (x86_64) + - name: Set up JDK (x86_64) if: matrix.os == 'macos-latest' run: | curl -L -o jdk.tar.gz https://cdn.azul.com/zulu/bin/zulu17.56.15-ca-jdk17.0.14-macosx_x64.tar.gz @@ -200,10 +200,10 @@ jobs: ls -lah ./build/jpackage/ mkdir ./binaries if [ "${{ matrix.os }}" = "windows-latest" ]; then - mv "./build/jpackage/Stirling-PDF-${{ needs.read_versions.outputs.version }}.exe" "./binaries/Stirling-PDF-win-installer.exe" + mv "./build/jpackage/Stirling PDF-${{ needs.read_versions.outputs.version }}.exe" "./binaries/Stirling-PDF-win-installer.exe" elif [ "${{ matrix.os }}" = "macos-latest" ]; then - mv "./build/jpackage/Stirling-PDF-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-installer.dmg" - mv "./build/jpackage/x86_64/Stirling-PDF (x86_64)-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-x86_64-installer.dmg" + mv "./build/jpackage/Stirling PDF-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-installer.dmg" + mv "./build/jpackage/x86_64/Stirling PDF (x86_64)-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-x86_64-installer.dmg" else mv "./build/jpackage/stirling-pdf_${{ needs.read_versions.outputs.version }}-1_amd64.deb" "./binaries/Stirling-PDF-linux-installer.deb" fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc27b0731..c792e50a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.10 + rev: v0.11.6 hooks: - id: ruff args: @@ -22,7 +22,7 @@ repos: files: \.(html|css|js|py|md)$ exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js) - repo: https://github.com/gitleaks/gitleaks - rev: v8.24.0 + rev: v8.24.3 hooks: - id: gitleaks - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/.vscode/settings.json b/.vscode/settings.json index 2119b6263..a4be4d0cd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,7 @@ "java.configuration.updateBuildConfiguration": "interactive", "java.format.enabled": true, "java.format.settings.profile": "GoogleStyle", - "java.format.settings.google.version": "1.25.2", + "java.format.settings.google.version": "1.26.0", "java.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting", // (DE) Aktiviert Kommentare im Java-Format. // (EN) Enables comments in Java formatting. diff --git a/DeveloperGuide.md b/DeveloperGuide.md index 8a4b53b6b..bbf8b8677 100644 --- a/DeveloperGuide.md +++ b/DeveloperGuide.md @@ -153,6 +153,7 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 ``` diff --git a/build.gradle b/build.gradle index b49b03c01..5c0bc9741 100644 --- a/build.gradle +++ b/build.gradle @@ -116,10 +116,10 @@ jpackage { input = "build/libs" destination = "${projectDir}/build/jpackage" mainJar = "Stirling-PDF-${project.version}.jar" - appName = "Stirling-PDF" + appName = "Stirling PDF" appVersion = project.version // appVersion = "2005.45.1" - vendor = "Stirling-Software" + vendor = "Stirling PDF Inc" appDescription = "Stirling PDF - Your Local PDF Editor" icon = "src/main/resources/static/favicon.ico" verbose = true @@ -151,7 +151,7 @@ jpackage { winShortcutPrompt = true // Lets user choose whether to create shortcuts winDirChooser = true // Allows users to choose installation directory winPerUserInstall = false - winMenuGroup = "Stirling Software" + winMenuGroup = "Stirling PDF" winUpgradeUuid = "2a43ed0c-b8c2-40cf-89e1-751129b87641" // Unique identifier for updates winHelpUrl = "https://github.com/Stirling-Tools/Stirling-PDF" winUpdateUrl = "https://github.com/Stirling-Tools/Stirling-PDF/releases" @@ -164,8 +164,8 @@ jpackage { appVersion = getMacVersion(project.version.toString()) icon = "src/main/resources/static/favicon.icns" type = "dmg" - macPackageIdentifier = "Stirling-PDF" - macPackageName = "Stirling-PDF" + macPackageIdentifier = "Stirling PDF" + macPackageName = "Stirling PDF" macAppCategory = "public.app-category.productivity" macSign = false // Enable signing macAppStore = false // Not targeting App Store initially @@ -249,18 +249,32 @@ tasks.register('jpackageMacX64') { def result = exec { commandLine 'jpackage', - '--type', 'dmg', - '--name', 'Stirling-PDF (x86_64)', - '--input', 'build/libs', - '--main-jar', "Stirling-PDF-${project.version}.jar", - '--main-class', 'org.springframework.boot.loader.launch.JarLauncher', - '--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"), - '--dest', 'build/jpackage/x86_64', - '--icon', 'src/main/resources/static/favicon.icns', - '--app-version', getMacVersion(project.version.toString()), - '--mac-package-name', 'Stirling-PDF (x86_64)', - '--mac-package-identifier', 'Stirling-PDF (x86_64)', - '--mac-app-category', 'public.app-category.productivity' + '--type', 'dmg', + '--name', 'Stirling PDF (x86_64)', + '--input', 'build/libs', + '--main-jar', "Stirling-PDF-${project.version}.jar", + '--main-class', 'org.springframework.boot.loader.launch.JarLauncher', + '--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"), + '--dest', 'build/jpackage/x86_64', + '--icon', 'src/main/resources/static/favicon.icns', + '--app-version', getMacVersion(project.version.toString()), + '--mac-package-name', 'Stirling PDF (x86_64)', + '--mac-package-identifier', 'Stirling PDF (x86_64)', + '--mac-app-category', 'public.app-category.productivity', + + // Java options + '--java-options', '-DBROWSER_OPEN=true', + '--java-options', '-DSTIRLING_PDF_DESKTOP_UI=true', + '--java-options', '-Djava.awt.headless=false', + '--java-options', '-Dapple.awt.UIElement=true', + '--java-options', '--add-opens=java.base/java.lang=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/java.awt.event=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED' + standardOutput = outputStream errorOutput = errorStream ignoreExitValue = true @@ -365,7 +379,7 @@ spotless { java { target project.fileTree('src').include('**/*.java') - googleJavaFormat("1.25.2").aosp().reorderImports(false) + googleJavaFormat("1.26.0").aosp().reorderImports(false) importOrder("java", "javax", "org", "com", "net", "io", "jakarta", "lombok", "me", "stirling") toggleOffOn() @@ -423,7 +437,7 @@ dependencies { } //security updates - implementation "org.springframework:spring-webmvc:6.2.5" + implementation "org.springframework:spring-webmvc:6.2.6" implementation("io.github.pixee:java-security-toolkit:1.2.1") @@ -447,7 +461,7 @@ dependencies { implementation "org.springframework.boot:spring-boot-starter-oauth2-client:$springBootVersion" implementation "org.springframework.session:spring-session-core:3.4.2" - implementation "org.springframework:spring-jdbc:6.2.5" + implementation "org.springframework:spring-jdbc:6.2.6" implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5' // Don't upgrade h2database @@ -523,7 +537,7 @@ dependencies { implementation "org.commonmark:commonmark-ext-gfm-tables:0.24.0" // https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17 implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0" - implementation "com.fathzer:javaluator:3.0.5" + implementation "com.fathzer:javaluator:3.0.6" implementation 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8' diff --git a/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml b/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml index 729684681..f36cd5bc7 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml @@ -32,4 +32,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml b/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml index b79631b6e..c04da1912 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml @@ -36,6 +36,7 @@ services: SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf" SYSTEM_DATASOURCE_USERNAME: "admin" SYSTEM_DATASOURCE_PASSWORD: "stirling" + SHOW_SURVEY: "true" restart: on-failure:5 db: diff --git a/exampleYmlFiles/docker-compose-latest-fat-security.yml b/exampleYmlFiles/docker-compose-latest-fat-security.yml index 5d01f33f0..d9e4fa5a9 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-security.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-security.yml @@ -30,4 +30,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-security-with-sso.yml b/exampleYmlFiles/docker-compose-latest-security-with-sso.yml index 9b86d4cc2..1514dd7d8 100644 --- a/exampleYmlFiles/docker-compose-latest-security-with-sso.yml +++ b/exampleYmlFiles/docker-compose-latest-security-with-sso.yml @@ -38,4 +38,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-security.yml b/exampleYmlFiles/docker-compose-latest-security.yml index b79ea8016..ccd3a41c6 100644 --- a/exampleYmlFiles/docker-compose-latest-security.yml +++ b/exampleYmlFiles/docker-compose-latest-security.yml @@ -30,4 +30,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml b/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml index 8f3932f7a..c59713b71 100644 --- a/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml +++ b/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml @@ -27,4 +27,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-ultra-lite.yml b/exampleYmlFiles/docker-compose-latest-ultra-lite.yml index d194be21c..6148f7251 100644 --- a/exampleYmlFiles/docker-compose-latest-ultra-lite.yml +++ b/exampleYmlFiles/docker-compose-latest-ultra-lite.yml @@ -26,4 +26,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest.yml b/exampleYmlFiles/docker-compose-latest.yml index 7dec8a959..51266ee8b 100644 --- a/exampleYmlFiles/docker-compose-latest.yml +++ b/exampleYmlFiles/docker-compose-latest.yml @@ -28,4 +28,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java index ce3c94435..e4bd06312 100644 --- a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java +++ b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java @@ -390,7 +390,7 @@ public class KeygenLicenseVerifier { // Extract max users and isEnterprise from policy or metadata int users = policyObj.optInt("users", 0); isEnterpriseLicense = policyObj.optBoolean("isEnterprise", false); - + if (users > 0) { applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users", users); @@ -402,7 +402,7 @@ public class KeygenLicenseVerifier { users = metadata.optInt("users", 1); applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users (from metadata)", users); - + // Check for isEnterprise flag in metadata isEnterpriseLicense = metadata.optBoolean("isEnterprise", false); } else { @@ -411,7 +411,7 @@ public class KeygenLicenseVerifier { log.info("Using default of 1 user for license"); } } - + } return true; @@ -507,16 +507,16 @@ public class KeygenLicenseVerifier { .path("users") .asInt(0); applicationProperties.getPremium().setMaxUsers(users); - + // Extract isEnterprise flag - isEnterpriseLicense = + isEnterpriseLicense = jsonResponse .path("data") .path("attributes") .path("metadata") .path("isEnterprise") .asBoolean(false); - + log.info(applicationProperties.toString()); } else { diff --git a/src/main/java/stirling/software/SPDF/config/security/UserService.java b/src/main/java/stirling/software/SPDF/config/security/UserService.java index 464676710..cc12332a6 100644 --- a/src/main/java/stirling/software/SPDF/config/security/UserService.java +++ b/src/main/java/stirling/software/SPDF/config/security/UserService.java @@ -423,6 +423,8 @@ public class UserService implements UserServiceInterface { if (principal instanceof UserDetails detailsUser) { return detailsUser.getUsername(); + } else if (principal instanceof stirling.software.SPDF.model.User domainUser) { + return domainUser.getUsername(); } else if (principal instanceof OAuth2User oAuth2User) { return oAuth2User.getAttribute( applicationProperties.getSecurity().getOauth2().getUseAsUsername()); diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java index a9e1f4103..96a65fc46 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java @@ -208,7 +208,8 @@ public class PipelineDirectoryProcessor { // Check against allowed extensions boolean isAllowed = allowAllFiles - || inputExtensions.contains(extension); + || inputExtensions.contains( + extension.toLowerCase()); if (!isAllowed) { log.info( "Skipping file with unsupported extension: {} ({})", diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java index c3d212115..2833ee99e 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java @@ -112,7 +112,8 @@ public class PipelineProcessor { for (Resource file : outputFiles) { boolean hasInputFileType = false; for (String extension : inputFileTypes) { - if ("ALL".equals(extension) || file.getFilename().endsWith(extension)) { + if ("ALL".equals(extension) + || file.getFilename().toLowerCase().endsWith(extension)) { hasInputFileType = true; MultiValueMap body = new LinkedMultiValueMap<>(); body.add("fileInput", file); @@ -166,7 +167,9 @@ public class PipelineProcessor { .filter( file -> finalinputFileTypes.stream() - .anyMatch(file.getFilename()::endsWith)) + .anyMatch( + file.getFilename().toLowerCase() + ::endsWith)) .toList(); } // Check if there are matching files diff --git a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java index 3341d0054..0fdd8e9ce 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java @@ -67,6 +67,9 @@ public class HomeWebController { @GetMapping("/") public String home(Model model) { model.addAttribute("currentPage", "home"); + String showSurvey = System.getenv("SHOW_SURVEY"); + boolean showSurveyValue = showSurvey == null || "true".equalsIgnoreCase(showSurvey); + model.addAttribute("showSurveyFromDocker", showSurveyValue); return "home"; } diff --git a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java index c1c9aebcf..f760f986a 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java +++ b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java @@ -16,7 +16,7 @@ public class UploadLimitService { private ApplicationProperties applicationProperties; public long getUploadLimit() { - String maxUploadSize = + String maxUploadSize = applicationProperties.getSystem().getFileUploadLimit() != null ? applicationProperties.getSystem().getFileUploadLimit() : ""; @@ -52,4 +52,4 @@ public class UploadLimitService { String pre = "KMGTPE".charAt(exp - 1) + "B"; return String.format("%.1f %s", bytes / Math.pow(1024, exp), pre); } -} \ No newline at end of file +} diff --git a/src/main/resources/static/3rdPartyLicenses.json b/src/main/resources/static/3rdPartyLicenses.json index 8d07e6104..79c2f7f1f 100644 --- a/src/main/resources/static/3rdPartyLicenses.json +++ b/src/main/resources/static/3rdPartyLicenses.json @@ -128,7 +128,7 @@ }, { "moduleName": "com.fathzer:javaluator", - "moduleVersion": "3.0.5", + "moduleVersion": "3.0.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0.txt" }, @@ -1673,7 +1673,7 @@ { "moduleName": "org.springframework:spring-jdbc", "moduleUrl": "https://github.com/spring-projects/spring-framework", - "moduleVersion": "6.2.5", + "moduleVersion": "6.2.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" }, @@ -1701,7 +1701,7 @@ { "moduleName": "org.springframework:spring-webmvc", "moduleUrl": "https://github.com/spring-projects/spring-framework", - "moduleVersion": "6.2.5", + "moduleVersion": "6.2.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" }, diff --git a/src/main/resources/static/css/footer.css b/src/main/resources/static/css/footer.css index 4a85e7566..3945b1b43 100644 --- a/src/main/resources/static/css/footer.css +++ b/src/main/resources/static/css/footer.css @@ -37,3 +37,24 @@ text-decoration: none; cursor: pointer; } + +.footer-link-list { + display: flex; + flex-direction: row; /* Align links in a row */ +} + +/* Responsive styles for smaller screens */ +@media (max-width: 650px) { + .footer-link { + font-size: 0.8rem; /* Adjust font size for smaller screens */ + } +} + +@media (max-width: 550px) { + .footer-link { + font-size: 1rem; /* Adjust font size for smaller screens */ + } + .footer-link-list{ + flex-direction: column; /* Stack links vertically on smaller screens */ + } +} \ No newline at end of file diff --git a/src/main/resources/static/js/pages/home.js b/src/main/resources/static/js/pages/home.js index 8b656b3a6..098a0bac1 100644 --- a/src/main/resources/static/js/pages/home.js +++ b/src/main/resources/static/js/pages/home.js @@ -74,6 +74,10 @@ document.addEventListener('DOMContentLoaded', function () { localStorage.setItem('pageViews', pageViews.toString()); function shouldShowSurvey() { + if(!window.showSurvey) { + return false; + } + if (localStorage.getItem('dontShowSurvey') === 'true' || localStorage.getItem('surveyTaken') === 'true') { return false; } diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html index a3c99e46a..324f550d9 100644 --- a/src/main/resources/templates/fragments/footer.html +++ b/src/main/resources/templates/fragments/footer.html @@ -4,7 +4,7 @@