mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Merge branch 'main' into patch-5
This commit is contained in:
commit
4bc8ee2a64
@ -49,7 +49,7 @@
|
|||||||
"java.configuration.updateBuildConfiguration": "interactive",
|
"java.configuration.updateBuildConfiguration": "interactive",
|
||||||
"java.format.enabled": true,
|
"java.format.enabled": true,
|
||||||
"java.format.settings.profile": "GoogleStyle",
|
"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.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting",
|
||||||
"java.saveActions.cleanup": true,
|
"java.saveActions.cleanup": true,
|
||||||
"java.cleanup.actions": [
|
"java.cleanup.actions": [
|
||||||
|
@ -186,7 +186,7 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:pr-${{ needs.check-comment.outputs.pr_number }}
|
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
|
platforms: linux/amd64
|
||||||
|
|
||||||
- name: Set up SSH
|
- name: Set up SSH
|
||||||
|
14
.github/workflows/multiOSReleases.yml
vendored
14
.github/workflows/multiOSReleases.yml
vendored
@ -2,13 +2,13 @@ name: Test Installers Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
inputs:
|
inputs:
|
||||||
test_mode:
|
test_mode:
|
||||||
description: "Run in test mode (skips release step)"
|
description: "Run in test mode (skip release step)"
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -175,7 +175,7 @@ jobs:
|
|||||||
STIRLING_PDF_DESKTOP_UI: true
|
STIRLING_PDF_DESKTOP_UI: true
|
||||||
BROWSER_OPEN: true
|
BROWSER_OPEN: true
|
||||||
|
|
||||||
- name: ☕ Set up JDK (x86_64)
|
- name: Set up JDK (x86_64)
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
curl -L -o jdk.tar.gz https://cdn.azul.com/zulu/bin/zulu17.56.15-ca-jdk17.0.14-macosx_x64.tar.gz
|
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/
|
ls -lah ./build/jpackage/
|
||||||
mkdir ./binaries
|
mkdir ./binaries
|
||||||
if [ "${{ matrix.os }}" = "windows-latest" ]; then
|
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
|
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/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/x86_64/Stirling PDF (x86_64)-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-x86_64-installer.dmg"
|
||||||
else
|
else
|
||||||
mv "./build/jpackage/stirling-pdf_${{ needs.read_versions.outputs.version }}-1_amd64.deb" "./binaries/Stirling-PDF-linux-installer.deb"
|
mv "./build/jpackage/stirling-pdf_${{ needs.read_versions.outputs.version }}-1_amd64.deb" "./binaries/Stirling-PDF-linux-installer.deb"
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.9.10
|
rev: v0.11.6
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args:
|
args:
|
||||||
@ -22,7 +22,7 @@ repos:
|
|||||||
files: \.(html|css|js|py|md)$
|
files: \.(html|css|js|py|md)$
|
||||||
exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js)
|
exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js)
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
rev: v8.24.0
|
rev: v8.24.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -10,7 +10,7 @@
|
|||||||
"java.configuration.updateBuildConfiguration": "interactive",
|
"java.configuration.updateBuildConfiguration": "interactive",
|
||||||
"java.format.enabled": true,
|
"java.format.enabled": true,
|
||||||
"java.format.settings.profile": "GoogleStyle",
|
"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.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting",
|
||||||
// (DE) Aktiviert Kommentare im Java-Format.
|
// (DE) Aktiviert Kommentare im Java-Format.
|
||||||
// (EN) Enables comments in Java formatting.
|
// (EN) Enables comments in Java formatting.
|
||||||
|
@ -153,6 +153,7 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
56
build.gradle
56
build.gradle
@ -116,10 +116,10 @@ jpackage {
|
|||||||
input = "build/libs"
|
input = "build/libs"
|
||||||
destination = "${projectDir}/build/jpackage"
|
destination = "${projectDir}/build/jpackage"
|
||||||
mainJar = "Stirling-PDF-${project.version}.jar"
|
mainJar = "Stirling-PDF-${project.version}.jar"
|
||||||
appName = "Stirling-PDF"
|
appName = "Stirling PDF"
|
||||||
appVersion = project.version
|
appVersion = project.version
|
||||||
// appVersion = "2005.45.1"
|
// appVersion = "2005.45.1"
|
||||||
vendor = "Stirling-Software"
|
vendor = "Stirling PDF Inc"
|
||||||
appDescription = "Stirling PDF - Your Local PDF Editor"
|
appDescription = "Stirling PDF - Your Local PDF Editor"
|
||||||
icon = "src/main/resources/static/favicon.ico"
|
icon = "src/main/resources/static/favicon.ico"
|
||||||
verbose = true
|
verbose = true
|
||||||
@ -151,7 +151,7 @@ jpackage {
|
|||||||
winShortcutPrompt = true // Lets user choose whether to create shortcuts
|
winShortcutPrompt = true // Lets user choose whether to create shortcuts
|
||||||
winDirChooser = true // Allows users to choose installation directory
|
winDirChooser = true // Allows users to choose installation directory
|
||||||
winPerUserInstall = false
|
winPerUserInstall = false
|
||||||
winMenuGroup = "Stirling Software"
|
winMenuGroup = "Stirling PDF"
|
||||||
winUpgradeUuid = "2a43ed0c-b8c2-40cf-89e1-751129b87641" // Unique identifier for updates
|
winUpgradeUuid = "2a43ed0c-b8c2-40cf-89e1-751129b87641" // Unique identifier for updates
|
||||||
winHelpUrl = "https://github.com/Stirling-Tools/Stirling-PDF"
|
winHelpUrl = "https://github.com/Stirling-Tools/Stirling-PDF"
|
||||||
winUpdateUrl = "https://github.com/Stirling-Tools/Stirling-PDF/releases"
|
winUpdateUrl = "https://github.com/Stirling-Tools/Stirling-PDF/releases"
|
||||||
@ -164,8 +164,8 @@ jpackage {
|
|||||||
appVersion = getMacVersion(project.version.toString())
|
appVersion = getMacVersion(project.version.toString())
|
||||||
icon = "src/main/resources/static/favicon.icns"
|
icon = "src/main/resources/static/favicon.icns"
|
||||||
type = "dmg"
|
type = "dmg"
|
||||||
macPackageIdentifier = "Stirling-PDF"
|
macPackageIdentifier = "Stirling PDF"
|
||||||
macPackageName = "Stirling-PDF"
|
macPackageName = "Stirling PDF"
|
||||||
macAppCategory = "public.app-category.productivity"
|
macAppCategory = "public.app-category.productivity"
|
||||||
macSign = false // Enable signing
|
macSign = false // Enable signing
|
||||||
macAppStore = false // Not targeting App Store initially
|
macAppStore = false // Not targeting App Store initially
|
||||||
@ -249,18 +249,32 @@ tasks.register('jpackageMacX64') {
|
|||||||
|
|
||||||
def result = exec {
|
def result = exec {
|
||||||
commandLine 'jpackage',
|
commandLine 'jpackage',
|
||||||
'--type', 'dmg',
|
'--type', 'dmg',
|
||||||
'--name', 'Stirling-PDF (x86_64)',
|
'--name', 'Stirling PDF (x86_64)',
|
||||||
'--input', 'build/libs',
|
'--input', 'build/libs',
|
||||||
'--main-jar', "Stirling-PDF-${project.version}.jar",
|
'--main-jar', "Stirling-PDF-${project.version}.jar",
|
||||||
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
||||||
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
||||||
'--dest', 'build/jpackage/x86_64',
|
'--dest', 'build/jpackage/x86_64',
|
||||||
'--icon', 'src/main/resources/static/favicon.icns',
|
'--icon', 'src/main/resources/static/favicon.icns',
|
||||||
'--app-version', getMacVersion(project.version.toString()),
|
'--app-version', getMacVersion(project.version.toString()),
|
||||||
'--mac-package-name', 'Stirling-PDF (x86_64)',
|
'--mac-package-name', 'Stirling PDF (x86_64)',
|
||||||
'--mac-package-identifier', 'Stirling-PDF (x86_64)',
|
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
||||||
'--mac-app-category', 'public.app-category.productivity'
|
'--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
|
standardOutput = outputStream
|
||||||
errorOutput = errorStream
|
errorOutput = errorStream
|
||||||
ignoreExitValue = true
|
ignoreExitValue = true
|
||||||
@ -365,7 +379,7 @@ spotless {
|
|||||||
java {
|
java {
|
||||||
target project.fileTree('src').include('**/*.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")
|
importOrder("java", "javax", "org", "com", "net", "io", "jakarta", "lombok", "me", "stirling")
|
||||||
toggleOffOn()
|
toggleOffOn()
|
||||||
@ -423,7 +437,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//security updates
|
//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")
|
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.boot:spring-boot-starter-oauth2-client:$springBootVersion"
|
||||||
|
|
||||||
implementation "org.springframework.session:spring-session-core:3.4.2"
|
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'
|
implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5'
|
||||||
// Don't upgrade h2database
|
// Don't upgrade h2database
|
||||||
@ -523,7 +537,7 @@ dependencies {
|
|||||||
implementation "org.commonmark:commonmark-ext-gfm-tables:0.24.0"
|
implementation "org.commonmark:commonmark-ext-gfm-tables:0.24.0"
|
||||||
// https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17
|
// https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17
|
||||||
implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0"
|
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'
|
implementation 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8'
|
||||||
|
|
||||||
|
@ -32,4 +32,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -36,6 +36,7 @@ services:
|
|||||||
SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf"
|
SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf"
|
||||||
SYSTEM_DATASOURCE_USERNAME: "admin"
|
SYSTEM_DATASOURCE_USERNAME: "admin"
|
||||||
SYSTEM_DATASOURCE_PASSWORD: "stirling"
|
SYSTEM_DATASOURCE_PASSWORD: "stirling"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
|
||||||
db:
|
db:
|
||||||
|
@ -30,4 +30,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -38,4 +38,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -30,4 +30,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -27,4 +27,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -26,4 +26,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -28,4 +28,5 @@ services:
|
|||||||
SYSTEM_MAXFILESIZE: "100"
|
SYSTEM_MAXFILESIZE: "100"
|
||||||
METRICS_ENABLED: "true"
|
METRICS_ENABLED: "true"
|
||||||
SYSTEM_GOOGLEVISIBILITY: "true"
|
SYSTEM_GOOGLEVISIBILITY: "true"
|
||||||
|
SHOW_SURVEY: "true"
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
|
@ -390,7 +390,7 @@ public class KeygenLicenseVerifier {
|
|||||||
// Extract max users and isEnterprise from policy or metadata
|
// Extract max users and isEnterprise from policy or metadata
|
||||||
int users = policyObj.optInt("users", 0);
|
int users = policyObj.optInt("users", 0);
|
||||||
isEnterpriseLicense = policyObj.optBoolean("isEnterprise", false);
|
isEnterpriseLicense = policyObj.optBoolean("isEnterprise", false);
|
||||||
|
|
||||||
if (users > 0) {
|
if (users > 0) {
|
||||||
applicationProperties.getPremium().setMaxUsers(users);
|
applicationProperties.getPremium().setMaxUsers(users);
|
||||||
log.info("License allows for {} users", users);
|
log.info("License allows for {} users", users);
|
||||||
@ -402,7 +402,7 @@ public class KeygenLicenseVerifier {
|
|||||||
users = metadata.optInt("users", 1);
|
users = metadata.optInt("users", 1);
|
||||||
applicationProperties.getPremium().setMaxUsers(users);
|
applicationProperties.getPremium().setMaxUsers(users);
|
||||||
log.info("License allows for {} users (from metadata)", users);
|
log.info("License allows for {} users (from metadata)", users);
|
||||||
|
|
||||||
// Check for isEnterprise flag in metadata
|
// Check for isEnterprise flag in metadata
|
||||||
isEnterpriseLicense = metadata.optBoolean("isEnterprise", false);
|
isEnterpriseLicense = metadata.optBoolean("isEnterprise", false);
|
||||||
} else {
|
} else {
|
||||||
@ -411,7 +411,7 @@ public class KeygenLicenseVerifier {
|
|||||||
log.info("Using default of 1 user for license");
|
log.info("Using default of 1 user for license");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -507,16 +507,16 @@ public class KeygenLicenseVerifier {
|
|||||||
.path("users")
|
.path("users")
|
||||||
.asInt(0);
|
.asInt(0);
|
||||||
applicationProperties.getPremium().setMaxUsers(users);
|
applicationProperties.getPremium().setMaxUsers(users);
|
||||||
|
|
||||||
// Extract isEnterprise flag
|
// Extract isEnterprise flag
|
||||||
isEnterpriseLicense =
|
isEnterpriseLicense =
|
||||||
jsonResponse
|
jsonResponse
|
||||||
.path("data")
|
.path("data")
|
||||||
.path("attributes")
|
.path("attributes")
|
||||||
.path("metadata")
|
.path("metadata")
|
||||||
.path("isEnterprise")
|
.path("isEnterprise")
|
||||||
.asBoolean(false);
|
.asBoolean(false);
|
||||||
|
|
||||||
log.info(applicationProperties.toString());
|
log.info(applicationProperties.toString());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -423,6 +423,8 @@ public class UserService implements UserServiceInterface {
|
|||||||
|
|
||||||
if (principal instanceof UserDetails detailsUser) {
|
if (principal instanceof UserDetails detailsUser) {
|
||||||
return detailsUser.getUsername();
|
return detailsUser.getUsername();
|
||||||
|
} else if (principal instanceof stirling.software.SPDF.model.User domainUser) {
|
||||||
|
return domainUser.getUsername();
|
||||||
} else if (principal instanceof OAuth2User oAuth2User) {
|
} else if (principal instanceof OAuth2User oAuth2User) {
|
||||||
return oAuth2User.getAttribute(
|
return oAuth2User.getAttribute(
|
||||||
applicationProperties.getSecurity().getOauth2().getUseAsUsername());
|
applicationProperties.getSecurity().getOauth2().getUseAsUsername());
|
||||||
|
@ -208,7 +208,8 @@ public class PipelineDirectoryProcessor {
|
|||||||
// Check against allowed extensions
|
// Check against allowed extensions
|
||||||
boolean isAllowed =
|
boolean isAllowed =
|
||||||
allowAllFiles
|
allowAllFiles
|
||||||
|| inputExtensions.contains(extension);
|
|| inputExtensions.contains(
|
||||||
|
extension.toLowerCase());
|
||||||
if (!isAllowed) {
|
if (!isAllowed) {
|
||||||
log.info(
|
log.info(
|
||||||
"Skipping file with unsupported extension: {} ({})",
|
"Skipping file with unsupported extension: {} ({})",
|
||||||
|
@ -112,7 +112,8 @@ public class PipelineProcessor {
|
|||||||
for (Resource file : outputFiles) {
|
for (Resource file : outputFiles) {
|
||||||
boolean hasInputFileType = false;
|
boolean hasInputFileType = false;
|
||||||
for (String extension : inputFileTypes) {
|
for (String extension : inputFileTypes) {
|
||||||
if ("ALL".equals(extension) || file.getFilename().endsWith(extension)) {
|
if ("ALL".equals(extension)
|
||||||
|
|| file.getFilename().toLowerCase().endsWith(extension)) {
|
||||||
hasInputFileType = true;
|
hasInputFileType = true;
|
||||||
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
|
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
|
||||||
body.add("fileInput", file);
|
body.add("fileInput", file);
|
||||||
@ -166,7 +167,9 @@ public class PipelineProcessor {
|
|||||||
.filter(
|
.filter(
|
||||||
file ->
|
file ->
|
||||||
finalinputFileTypes.stream()
|
finalinputFileTypes.stream()
|
||||||
.anyMatch(file.getFilename()::endsWith))
|
.anyMatch(
|
||||||
|
file.getFilename().toLowerCase()
|
||||||
|
::endsWith))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
// Check if there are matching files
|
// Check if there are matching files
|
||||||
|
@ -67,6 +67,9 @@ public class HomeWebController {
|
|||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public String home(Model model) {
|
public String home(Model model) {
|
||||||
model.addAttribute("currentPage", "home");
|
model.addAttribute("currentPage", "home");
|
||||||
|
String showSurvey = System.getenv("SHOW_SURVEY");
|
||||||
|
boolean showSurveyValue = showSurvey == null || "true".equalsIgnoreCase(showSurvey);
|
||||||
|
model.addAttribute("showSurveyFromDocker", showSurveyValue);
|
||||||
return "home";
|
return "home";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public class UploadLimitService {
|
|||||||
private ApplicationProperties applicationProperties;
|
private ApplicationProperties applicationProperties;
|
||||||
|
|
||||||
public long getUploadLimit() {
|
public long getUploadLimit() {
|
||||||
String maxUploadSize =
|
String maxUploadSize =
|
||||||
applicationProperties.getSystem().getFileUploadLimit() != null
|
applicationProperties.getSystem().getFileUploadLimit() != null
|
||||||
? applicationProperties.getSystem().getFileUploadLimit()
|
? applicationProperties.getSystem().getFileUploadLimit()
|
||||||
: "";
|
: "";
|
||||||
@ -52,4 +52,4 @@ public class UploadLimitService {
|
|||||||
String pre = "KMGTPE".charAt(exp - 1) + "B";
|
String pre = "KMGTPE".charAt(exp - 1) + "B";
|
||||||
return String.format("%.1f %s", bytes / Math.pow(1024, exp), pre);
|
return String.format("%.1f %s", bytes / Math.pow(1024, exp), pre);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "com.fathzer:javaluator",
|
"moduleName": "com.fathzer:javaluator",
|
||||||
"moduleVersion": "3.0.5",
|
"moduleVersion": "3.0.6",
|
||||||
"moduleLicense": "Apache License, Version 2.0",
|
"moduleLicense": "Apache License, Version 2.0",
|
||||||
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||||
},
|
},
|
||||||
@ -1673,7 +1673,7 @@
|
|||||||
{
|
{
|
||||||
"moduleName": "org.springframework:spring-jdbc",
|
"moduleName": "org.springframework:spring-jdbc",
|
||||||
"moduleUrl": "https://github.com/spring-projects/spring-framework",
|
"moduleUrl": "https://github.com/spring-projects/spring-framework",
|
||||||
"moduleVersion": "6.2.5",
|
"moduleVersion": "6.2.6",
|
||||||
"moduleLicense": "Apache License, Version 2.0",
|
"moduleLicense": "Apache License, Version 2.0",
|
||||||
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0"
|
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0"
|
||||||
},
|
},
|
||||||
@ -1701,7 +1701,7 @@
|
|||||||
{
|
{
|
||||||
"moduleName": "org.springframework:spring-webmvc",
|
"moduleName": "org.springframework:spring-webmvc",
|
||||||
"moduleUrl": "https://github.com/spring-projects/spring-framework",
|
"moduleUrl": "https://github.com/spring-projects/spring-framework",
|
||||||
"moduleVersion": "6.2.5",
|
"moduleVersion": "6.2.6",
|
||||||
"moduleLicense": "Apache License, Version 2.0",
|
"moduleLicense": "Apache License, Version 2.0",
|
||||||
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0"
|
"moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0"
|
||||||
},
|
},
|
||||||
|
@ -37,3 +37,24 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
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 */
|
||||||
|
}
|
||||||
|
}
|
@ -74,6 +74,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
localStorage.setItem('pageViews', pageViews.toString());
|
localStorage.setItem('pageViews', pageViews.toString());
|
||||||
|
|
||||||
function shouldShowSurvey() {
|
function shouldShowSurvey() {
|
||||||
|
if(!window.showSurvey) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (localStorage.getItem('dontShowSurvey') === 'true' || localStorage.getItem('surveyTaken') === 'true') {
|
if (localStorage.getItem('dontShowSurvey') === 'true' || localStorage.getItem('surveyTaken') === 'true') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="footer-center pb-4">
|
<div class="footer-center pb-4">
|
||||||
<!-- Links section -->
|
<!-- Links section -->
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<ul class="list-unstyled d-flex">
|
<ul class="list-unstyled footer-link-list">
|
||||||
<li><a class="footer-link px-2" id="licenses" target="_blank" th:href="@{'/licenses'}" th:text="#{licenses.nav}">Licenses</a></li>
|
<li><a class="footer-link px-2" id="licenses" target="_blank" th:href="@{'/licenses'}" th:text="#{licenses.nav}">Licenses</a></li>
|
||||||
<li><a class="footer-link px-2" id="releases" target="_blank" th:href="@{'/releases'}" th:text="#{releases.footer}">Releases</a></li>
|
<li><a class="footer-link px-2" id="releases" target="_blank" th:href="@{'/releases'}" th:text="#{releases.footer}">Releases</a></li>
|
||||||
<li><a class="footer-link px-2" id="survey" target="_blank" href="https://stirlingpdf.info/s/cm28y3niq000o56dv7liv8wsu" th:text="#{survey.nav}">Survey</a></li>
|
<li><a class="footer-link px-2" id="survey" target="_blank" href="https://stirlingpdf.info/s/cm28y3niq000o56dv7liv8wsu" th:text="#{survey.nav}">Survey</a></li>
|
||||||
|
@ -218,6 +218,8 @@
|
|||||||
/*<![CDATA[*/
|
/*<![CDATA[*/
|
||||||
window.analyticsPromptBoolean = /*[[${@analyticsPrompt}]]*/ false;
|
window.analyticsPromptBoolean = /*[[${@analyticsPrompt}]]*/ false;
|
||||||
/*]]>*/
|
/*]]>*/
|
||||||
|
|
||||||
|
window.showSurvey = /*[[${showSurveyFromDocker}]]*/ true
|
||||||
</script>
|
</script>
|
||||||
<script th:src="@{'/js/pages/home.js'}" th:inline="javascript"></script>
|
<script th:src="@{'/js/pages/home.js'}" th:inline="javascript"></script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user