Skip to content

Commit 149249c

Browse files
authored
Merge pull request #1253 from Stirling-Tools/configFixes
Config fixes
2 parents ea02369 + 4232f35 commit 149249c

File tree

5 files changed

+19
-22
lines changed

5 files changed

+19
-22
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
import com.github.jk1.license.render.*
1313

1414
group = 'stirling.software'
15-
version = '0.24.3'
15+
version = '0.24.4'
1616

1717
//17 is lowest but we support and recommend 21
1818
sourceCompatibility = '17'

chart/stirling-pdf/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: 0.24.3
2+
appVersion: 0.24.4
33
description: locally hosted web application that allows you to perform various operations
44
on PDF files
55
home: https://github.com/Stirling-Tools/Stirling-PDF

src/main/java/stirling/software/SPDF/config/ConfigInitializer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public void ensureConfigExists() throws IOException, URISyntaxException {
7070
if (!entry.isEmpty()) {
7171
// Check if this comment has been uncommented in userLines
7272
String key = entry.split(":")[0].trim();
73-
System.out.println("key=" + key + ", entry=" + entry );
7473
addLine(resultLines, userLines, templateLine, key);
7574
} else {
7675
resultLines.add(templateLine);
@@ -104,7 +103,6 @@ private static void addLine(List<String> resultLines, List<String> userLines, St
104103
boolean added = false;
105104
int templateIndentationLevel = getIndentationLevel(templateLine);
106105
for (String settingsLine : userLines) {
107-
if(settingsLine.contains("oauth2") || settingsLine.contains("enabled") )
108106
if (settingsLine.trim().startsWith(key + ":")) {
109107
int settingsIndentationLevel = getIndentationLevel(settingsLine);
110108
// Check if it is correct settingsLine and has the same parent as templateLine

src/main/resources/static/js/languageSelection.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,22 @@ function handleDropdownItemClick(event) {
6060
}
6161

6262
document.addEventListener("DOMContentLoaded", function () {
63-
document.querySelectorAll(".nav-item.dropdown").forEach((element) => {
64-
const dropdownMenu = element.querySelector(".dropdown-menu");
65-
if (
66-
dropdownMenu.id !== "favoritesDropdown" &&
67-
dropdownMenu.children.length <= 2 &&
68-
dropdownMenu.querySelectorAll("hr.dropdown-divider").length === dropdownMenu.children.length
69-
) {
70-
if (
71-
element.previousElementSibling &&
72-
element.previousElementSibling.classList.contains("nav-item") &&
73-
element.previousElementSibling.classList.contains("nav-item-separator")
74-
) {
75-
element.previousElementSibling.remove();
76-
}
77-
element.remove();
63+
64+
document.querySelectorAll(".col-lg-2.col-sm-6").forEach((element) => {
65+
const dropdownItems = element.querySelectorAll(".dropdown-item");
66+
const items = Array.from(dropdownItems).filter(item => !item.querySelector("hr.dropdown-divider"));
67+
68+
if (items.length <= 2) {
69+
if (
70+
element.previousElementSibling &&
71+
element.previousElementSibling.classList.contains("col-lg-2") &&
72+
element.previousElementSibling.classList.contains("nav-item-separator")
73+
) {
74+
element.previousElementSibling.remove();
75+
}
76+
element.remove();
7877
}
79-
});
78+
});
8079

8180
//Sort languages by alphabet
8281
const list = Array.from(document.querySelector('.dropdown-menu[aria-labelledby="languageDropdown"]').children).filter(

src/main/resources/templates/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ <h5 class="card-title" th:text="#{settings.update}"></h5>
219219
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')}">
220220
</div>
221221
<div
222-
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')}">
222+
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')}">
223223
</div>
224224
<div
225-
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')}">
225+
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')}">
226226
</div>
227227
<div
228228
th:replace="~{fragments/card :: card(id='stamp', cardTitle=#{home.AddStampRequest.title}, cardText=#{home.AddStampRequest.desc}, cardLink='stamp', toolIcon='approval', tags=#{AddStampRequest.tags}, toolGroup='security')}">

0 commit comments

Comments
 (0)