1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-09-21 04:10:38 +02:00

Merge pull request #1253 from Stirling-Tools/configFixes

Config fixes
This commit is contained in:
Anthony Stirling 2024-05-20 18:46:59 +01:00 committed by GitHub
commit 149249c6ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 22 deletions

View File

@ -12,7 +12,7 @@ plugins {
import com.github.jk1.license.render.* import com.github.jk1.license.render.*
group = 'stirling.software' group = 'stirling.software'
version = '0.24.3' version = '0.24.4'
//17 is lowest but we support and recommend 21 //17 is lowest but we support and recommend 21
sourceCompatibility = '17' sourceCompatibility = '17'

View File

@ -1,5 +1,5 @@
apiVersion: v2 apiVersion: v2
appVersion: 0.24.3 appVersion: 0.24.4
description: locally hosted web application that allows you to perform various operations description: locally hosted web application that allows you to perform various operations
on PDF files on PDF files
home: https://github.com/Stirling-Tools/Stirling-PDF home: https://github.com/Stirling-Tools/Stirling-PDF

View File

@ -70,7 +70,6 @@ public class ConfigInitializer
if (!entry.isEmpty()) { if (!entry.isEmpty()) {
// Check if this comment has been uncommented in userLines // Check if this comment has been uncommented in userLines
String key = entry.split(":")[0].trim(); String key = entry.split(":")[0].trim();
System.out.println("key=" + key + ", entry=" + entry );
addLine(resultLines, userLines, templateLine, key); addLine(resultLines, userLines, templateLine, key);
} else { } else {
resultLines.add(templateLine); resultLines.add(templateLine);
@ -104,7 +103,6 @@ public class ConfigInitializer
boolean added = false; boolean added = false;
int templateIndentationLevel = getIndentationLevel(templateLine); int templateIndentationLevel = getIndentationLevel(templateLine);
for (String settingsLine : userLines) { for (String settingsLine : userLines) {
if(settingsLine.contains("oauth2") || settingsLine.contains("enabled") )
if (settingsLine.trim().startsWith(key + ":")) { if (settingsLine.trim().startsWith(key + ":")) {
int settingsIndentationLevel = getIndentationLevel(settingsLine); int settingsIndentationLevel = getIndentationLevel(settingsLine);
// Check if it is correct settingsLine and has the same parent as templateLine // Check if it is correct settingsLine and has the same parent as templateLine

View File

@ -60,23 +60,22 @@ function handleDropdownItemClick(event) {
} }
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll(".nav-item.dropdown").forEach((element) => {
const dropdownMenu = element.querySelector(".dropdown-menu"); document.querySelectorAll(".col-lg-2.col-sm-6").forEach((element) => {
if ( const dropdownItems = element.querySelectorAll(".dropdown-item");
dropdownMenu.id !== "favoritesDropdown" && const items = Array.from(dropdownItems).filter(item => !item.querySelector("hr.dropdown-divider"));
dropdownMenu.children.length <= 2 &&
dropdownMenu.querySelectorAll("hr.dropdown-divider").length === dropdownMenu.children.length if (items.length <= 2) {
) { if (
if ( element.previousElementSibling &&
element.previousElementSibling && element.previousElementSibling.classList.contains("col-lg-2") &&
element.previousElementSibling.classList.contains("nav-item") && element.previousElementSibling.classList.contains("nav-item-separator")
element.previousElementSibling.classList.contains("nav-item-separator") ) {
) { element.previousElementSibling.remove();
element.previousElementSibling.remove(); }
} element.remove();
element.remove();
} }
}); });
//Sort languages by alphabet //Sort languages by alphabet
const list = Array.from(document.querySelector('.dropdown-menu[aria-labelledby="languageDropdown"]').children).filter( const list = Array.from(document.querySelector('.dropdown-menu[aria-labelledby="languageDropdown"]').children).filter(

View File

@ -219,10 +219,10 @@
th:replace="~{fragments/card :: card(id='split-pdf-by-sections', cardTitle=#{home.split-by-sections.title}, cardText=#{home.split-by-sections.desc}, cardLink='split-pdf-by-sections', toolIcon='grid_on', tags=#{split-by-sections.tags}, toolGroup='advance')}"> th:replace="~{fragments/card :: card(id='split-pdf-by-sections', cardTitle=#{home.split-by-sections.title}, cardText=#{home.split-by-sections.desc}, cardLink='split-pdf-by-sections', toolIcon='grid_on', tags=#{split-by-sections.tags}, toolGroup='advance')}">
</div> </div>
<div <div
th:replace="~{fragments/card :: card(id='book-to-pdf', cardTitle=#{home.BookToPDF.title}, cardText=#{home.BookToPDF.desc}, cardLink='book-to-pdf', toolIcon='images/book.svg', tags=#{BookToPDF.tags}, toolGroup='convert')}"> th:replace="~{fragments/card :: card(id='book-to-pdf', cardTitle=#{home.BookToPDF.title}, cardText=#{home.BookToPDF.desc}, cardLink='book-to-pdf', toolIcon='book', tags=#{BookToPDF.tags}, toolGroup='convert')}">
</div> </div>
<div <div
th:replace="~{fragments/card :: card(id='pdf-to-book', cardTitle=#{home.PDFToBook.title}, cardText=#{home.PDFToBook.desc}, cardLink='pdf-to-book', toolIcon='images/book.svg', tags=#{PDFToBook.tags}, toolGroup='convert')}"> th:replace="~{fragments/card :: card(id='pdf-to-book', cardTitle=#{home.PDFToBook.title}, cardText=#{home.PDFToBook.desc}, cardLink='pdf-to-book', toolIcon='book', tags=#{PDFToBook.tags}, toolGroup='convert')}">
</div> </div>
<div <div
th:replace="~{fragments/card :: card(id='stamp', cardTitle=#{home.AddStampRequest.title}, cardText=#{home.AddStampRequest.desc}, cardLink='stamp', toolIcon='approval', tags=#{AddStampRequest.tags}, toolGroup='security')}"> th:replace="~{fragments/card :: card(id='stamp', cardTitle=#{home.AddStampRequest.title}, cardText=#{home.AddStampRequest.desc}, cardLink='stamp', toolIcon='approval', tags=#{AddStampRequest.tags}, toolGroup='security')}">