mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-14 00:10:40 +01:00
Searchbar in nav auto select, and exe nolonger disable CLI (#2197)
* fix remmeber me * remove uselss comment * Update translation files (#2185) Signed-off-by: GitHub Action <action@github.com> Co-authored-by: GitHub Action <action@github.com> * exe no longer disable CLI --------- Signed-off-by: GitHub Action <action@github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: a <a>
This commit is contained in:
parent
7eea7fb3cb
commit
1b0c1b6cff
@ -78,7 +78,7 @@ launch4j {
|
|||||||
|
|
||||||
errTitle="Encountered error, Do you have Java 21?"
|
errTitle="Encountered error, Do you have Java 21?"
|
||||||
downloadUrl="https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe"
|
downloadUrl="https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe"
|
||||||
variables=["BROWSER_OPEN=true", "ENDPOINTS_GROUPS_TO_REMOVE=CLI"]
|
variables=["BROWSER_OPEN=true"]
|
||||||
jreMinVersion="17"
|
jreMinVersion="17"
|
||||||
|
|
||||||
mutexName="Stirling-PDF"
|
mutexName="Stirling-PDF"
|
||||||
|
@ -191,6 +191,7 @@ public class EndpointConfiguration {
|
|||||||
// LibreOffice
|
// LibreOffice
|
||||||
addEndpointToGroup("LibreOffice", "repair");
|
addEndpointToGroup("LibreOffice", "repair");
|
||||||
addEndpointToGroup("LibreOffice", "file-to-pdf");
|
addEndpointToGroup("LibreOffice", "file-to-pdf");
|
||||||
|
addEndpointToGroup("Unoconv", "file-to-pdf");
|
||||||
addEndpointToGroup("LibreOffice", "xlsx-to-pdf");
|
addEndpointToGroup("LibreOffice", "xlsx-to-pdf");
|
||||||
addEndpointToGroup("LibreOffice", "pdf-to-word");
|
addEndpointToGroup("LibreOffice", "pdf-to-word");
|
||||||
addEndpointToGroup("LibreOffice", "pdf-to-presentation");
|
addEndpointToGroup("LibreOffice", "pdf-to-presentation");
|
||||||
|
@ -42,6 +42,7 @@ public class ExternalAppDepConfig {
|
|||||||
put("ocrmypdf", List.of("OCRmyPDF"));
|
put("ocrmypdf", List.of("OCRmyPDF"));
|
||||||
put("weasyprint", List.of("Weasyprint"));
|
put("weasyprint", List.of("Weasyprint"));
|
||||||
put("pdftohtml", List.of("Pdftohtml"));
|
put("pdftohtml", List.of("Pdftohtml"));
|
||||||
|
put("unoconv", List.of("Unoconv"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ public class ExternalAppDepConfig {
|
|||||||
checkDependencyAndDisableGroup("ocrmypdf");
|
checkDependencyAndDisableGroup("ocrmypdf");
|
||||||
checkDependencyAndDisableGroup("weasyprint");
|
checkDependencyAndDisableGroup("weasyprint");
|
||||||
checkDependencyAndDisableGroup("pdftohtml");
|
checkDependencyAndDisableGroup("pdftohtml");
|
||||||
|
checkDependencyAndDisableGroup("unoconv");
|
||||||
|
|
||||||
// Special handling for Python/OpenCV dependencies
|
// Special handling for Python/OpenCV dependencies
|
||||||
boolean pythonAvailable = isCommandAvailable("python3") || isCommandAvailable("python");
|
boolean pythonAvailable = isCommandAvailable("python3") || isCommandAvailable("python");
|
||||||
|
@ -70,3 +70,37 @@ document.querySelector("#navbarSearchInput").addEventListener("input", function
|
|||||||
resultsBox.style.width = window.navItemMaxWidth + "px";
|
resultsBox.style.width = window.navItemMaxWidth + "px";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const searchDropdown = document.getElementById('searchDropdown');
|
||||||
|
const searchInput = document.getElementById('navbarSearchInput');
|
||||||
|
const dropdownMenu = searchDropdown.querySelector('.dropdown-menu');
|
||||||
|
|
||||||
|
// Handle dropdown shown event
|
||||||
|
searchDropdown.addEventListener('shown.bs.dropdown', function () {
|
||||||
|
searchInput.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle hover opening
|
||||||
|
searchDropdown.addEventListener('mouseenter', function () {
|
||||||
|
const dropdownInstance = new bootstrap.Dropdown(searchDropdown);
|
||||||
|
dropdownInstance.show();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
searchInput.focus();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle mouse leave
|
||||||
|
searchDropdown.addEventListener('mouseleave', function () {
|
||||||
|
// Check if current value is empty (including if user typed and then deleted)
|
||||||
|
if (searchInput.value.trim().length === 0) {
|
||||||
|
searchInput.blur();
|
||||||
|
const dropdownInstance = new bootstrap.Dropdown(searchDropdown);
|
||||||
|
dropdownInstance.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
searchDropdown.addEventListener('hidden.bs.dropdown', function () {
|
||||||
|
if (searchInput.value.trim().length === 0) {
|
||||||
|
searchInput.blur();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user