From 4a2da2b7e0b9eab6ea01e66fb59758d3035bc7c9 Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Date: Sat, 4 Mar 2023 00:10:13 +0000
Subject: [PATCH] rework navbar and also multi submits
---
.../SPDF/controller/PdfController.java | 10 +
src/main/resources/application.properties | 4 +-
.../resources/templates/extract-images.html | 16 +-
.../resources/templates/fragments/common.html | 50 ++-
.../resources/templates/fragments/navbar.html | 367 ++++++++++++------
src/main/resources/templates/merge-pdfs.html | 177 +++++----
6 files changed, 402 insertions(+), 222 deletions(-)
diff --git a/src/main/java/stirling/software/SPDF/controller/PdfController.java b/src/main/java/stirling/software/SPDF/controller/PdfController.java
index b0645a3a8..7c1837dfe 100644
--- a/src/main/java/stirling/software/SPDF/controller/PdfController.java
+++ b/src/main/java/stirling/software/SPDF/controller/PdfController.java
@@ -2,6 +2,9 @@ package stirling.software.SPDF.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@@ -11,6 +14,9 @@ public class PdfController {
private static final Logger logger = LoggerFactory.getLogger(PdfController.class);
+ @Autowired
+ private Environment environment;
+
@GetMapping("/home")
public String root(Model model) {
return "redirect:/";
@@ -19,7 +25,11 @@ public class PdfController {
@GetMapping("/")
public String home(Model model) {
model.addAttribute("currentPage", "home");
+ String appVersion = environment.getProperty("version");
+ model.addAttribute("appVersion", appVersion);
return "home";
}
+
+
}
\ No newline at end of file
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 13dce5032..88844ae41 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -14,4 +14,6 @@ server.error.path=/error
server.error.whitelabel.enabled=false
server.error.include-stacktrace=always
server.error.include-exception=true
-server.error.include-message=always
\ No newline at end of file
+server.error.include-message=always
+
+server.servlet.session.tracking-modes=cookie
\ No newline at end of file
diff --git a/src/main/resources/templates/extract-images.html b/src/main/resources/templates/extract-images.html
index 84f784f68..1e8fef12c 100644
--- a/src/main/resources/templates/extract-images.html
+++ b/src/main/resources/templates/extract-images.html
@@ -27,18 +27,20 @@