mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2024-12-21 19:08:24 +01:00
Merge pull request #1287 from Ludy87/add_oauth2
add: multi OAuth2 option README.md, small cosmetic repairs
This commit is contained in:
commit
2c148eb0c0
@ -29,7 +29,7 @@ If you would like to add or modify a translation, please see [How to add new lan
|
|||||||
|
|
||||||
## Docs
|
## Docs
|
||||||
|
|
||||||
Documentation for Stirling-PDF is handled in a seperate repository. Please see [Docs repository](https://github.com/Stirling-Tools/Stirling-Tools.github.io) or use "edit this page"-button at the bottom of each page at [https://stirlingtools.com/docs/](https://stirlingtools.com/docs/).
|
Documentation for Stirling-PDF is handled in a separate repository. Please see [Docs repository](https://github.com/Stirling-Tools/Stirling-Tools.github.io) or use "edit this page"-button at the bottom of each page at [https://stirlingtools.com/docs/](https://stirlingtools.com/docs/).
|
||||||
|
|
||||||
## Fixing Bugs or Adding a New Feature
|
## Fixing Bugs or Adding a New Feature
|
||||||
|
|
||||||
|
22
README.md
22
README.md
@ -159,7 +159,7 @@ Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR
|
|||||||
|
|
||||||
## Supported Languages
|
## Supported Languages
|
||||||
|
|
||||||
Stirling PDF currently supports 27!
|
Stirling PDF currently supports 28!
|
||||||
|
|
||||||
| Language | Progress |
|
| Language | Progress |
|
||||||
| ------------------------------------------- | -------------------------------------- |
|
| ------------------------------------------- | -------------------------------------- |
|
||||||
@ -191,6 +191,7 @@ Stirling PDF currently supports 27!
|
|||||||
| Sebian Latin alphabet (Srpski) (sr_LATN_RS) | ![81%](https://geps.dev/progress/81) |
|
| Sebian Latin alphabet (Srpski) (sr_LATN_RS) | ![81%](https://geps.dev/progress/81) |
|
||||||
| Ukrainian (Українська) (uk_UA) | ![87%](https://geps.dev/progress/87) |
|
| Ukrainian (Українська) (uk_UA) | ![87%](https://geps.dev/progress/87) |
|
||||||
| Slovakian (Slovensky) (sk_SK) | ![96%](https://geps.dev/progress/96) |
|
| Slovakian (Slovensky) (sk_SK) | ![96%](https://geps.dev/progress/96) |
|
||||||
|
| Czech (Česky) (cs_CZ) | ![96%](https://geps.dev/progress/96) |
|
||||||
|
|
||||||
## Contributing (creating issues, translations, fixing bugs, etc.)
|
## Contributing (creating issues, translations, fixing bugs, etc.)
|
||||||
|
|
||||||
@ -226,7 +227,7 @@ security:
|
|||||||
loginAttemptCount: 5 # lock user account after 5 tries
|
loginAttemptCount: 5 # lock user account after 5 tries
|
||||||
loginResetTimeMinutes: 120 # lock account for 2 hours after x attempts
|
loginResetTimeMinutes: 120 # lock account for 2 hours after x attempts
|
||||||
# initialLogin:
|
# initialLogin:
|
||||||
# username: "admin" # Initial username for the first login (these are defaulted)
|
# username: "admin" # Initial username for the first login
|
||||||
# password: "stirling" # Initial password for the first login
|
# password: "stirling" # Initial password for the first login
|
||||||
# oauth2:
|
# oauth2:
|
||||||
# enabled: false # set to 'true' to enable login (Note: enableLogin must also be 'true' for this to work)
|
# enabled: false # set to 'true' to enable login (Note: enableLogin must also be 'true' for this to work)
|
||||||
@ -237,6 +238,23 @@ security:
|
|||||||
# useAsUsername: "email" # Default is 'email'; custom fields can be used as the username
|
# useAsUsername: "email" # Default is 'email'; custom fields can be used as the username
|
||||||
# scopes: "openid, profile, email" # Specify the scopes for which the application will request permissions
|
# scopes: "openid, profile, email" # Specify the scopes for which the application will request permissions
|
||||||
# provider: "google" # Set this to your OAuth provider's name, e.g., 'google' or 'keycloak'
|
# provider: "google" # Set this to your OAuth provider's name, e.g., 'google' or 'keycloak'
|
||||||
|
# client:
|
||||||
|
# google:
|
||||||
|
# clientId: "" # Client ID for Google OAuth2
|
||||||
|
# clientSecret: "" # Client Secret for Google OAuth2
|
||||||
|
# scopes: "https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile" # Scopes for Google OAuth2
|
||||||
|
# useAsUsername: "email" # Field to use as the username for Google OAuth2
|
||||||
|
# github:
|
||||||
|
# clientId: "" # Client ID for GitHub OAuth2
|
||||||
|
# clientSecret: "" # Client Secret for GitHub OAuth2
|
||||||
|
# scopes: "read:user" # Scope for GitHub OAuth2
|
||||||
|
# useAsUsername: "login" # Field to use as the username for GitHub OAuth2
|
||||||
|
# keycloak:
|
||||||
|
# issuer: "http://192.168.0.123:8888/realms/stirling-pdf" # URL of the Keycloak realm's OpenID Connect Discovery endpoint
|
||||||
|
# clientId: "stirling-pdf" # Client ID for Keycloak OAuth2
|
||||||
|
# clientSecret: "" # Client Secret for Keycloak OAuth2
|
||||||
|
# scopes: "openid, profile, email" # Scopes for Keycloak OAuth2
|
||||||
|
# useAsUsername: "email" # Field to use as the username for Keycloak OAuth2
|
||||||
|
|
||||||
system:
|
system:
|
||||||
defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
|
defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
|
||||||
|
@ -56,7 +56,7 @@ public class ConvertImgPDFController {
|
|||||||
String filename =
|
String filename =
|
||||||
Filenames.toSimpleFileName(file.getOriginalFilename())
|
Filenames.toSimpleFileName(file.getOriginalFilename())
|
||||||
.replaceFirst("[.][^.]+$", "");
|
.replaceFirst("[.][^.]+$", "");
|
||||||
|
|
||||||
result =
|
result =
|
||||||
PdfUtils.convertFromPdf(
|
PdfUtils.convertFromPdf(
|
||||||
pdfBytes,
|
pdfBytes,
|
||||||
@ -65,10 +65,9 @@ public class ConvertImgPDFController {
|
|||||||
singleImage,
|
singleImage,
|
||||||
Integer.valueOf(dpi),
|
Integer.valueOf(dpi),
|
||||||
filename);
|
filename);
|
||||||
|
|
||||||
|
|
||||||
if(result == null || result.length == 0) {
|
if (result == null || result.length == 0) {
|
||||||
logger.error("resultant bytes for {} is null, error converting ", filename);
|
logger.error("resultant bytes for {} is null, error converting ", filename);
|
||||||
}
|
}
|
||||||
if (singleImage) {
|
if (singleImage) {
|
||||||
String docName = filename + "." + imageFormat;
|
String docName = filename + "." + imageFormat;
|
||||||
|
@ -750,9 +750,6 @@ public class ApplicationProperties {
|
|||||||
this.googlevisibility = googlevisibility;
|
this.googlevisibility = googlevisibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "System [defaultLocale="
|
return "System [defaultLocale="
|
||||||
|
@ -60,22 +60,22 @@ function handleDropdownItemClick(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
document.querySelectorAll(".col-lg-2.col-sm-6").forEach((element) => {
|
document.querySelectorAll(".col-lg-2.col-sm-6").forEach((element) => {
|
||||||
const dropdownItems = element.querySelectorAll(".dropdown-item");
|
const dropdownItems = element.querySelectorAll(".dropdown-item");
|
||||||
const items = Array.from(dropdownItems).filter(item => !item.querySelector("hr.dropdown-divider"));
|
const items = Array.from(dropdownItems).filter(item => !item.querySelector("hr.dropdown-divider"));
|
||||||
|
|
||||||
if (items.length <= 2) {
|
if (items.length <= 2) {
|
||||||
if (
|
if (
|
||||||
element.previousElementSibling &&
|
element.previousElementSibling &&
|
||||||
element.previousElementSibling.classList.contains("col-lg-2") &&
|
element.previousElementSibling.classList.contains("col-lg-2") &&
|
||||||
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(
|
||||||
|
@ -40,7 +40,6 @@ document.querySelector("#navbarSearchInput").addEventListener("input", function
|
|||||||
var itemHref = item.getAttribute("href");
|
var itemHref = item.getAttribute("href");
|
||||||
var tags = item.getAttribute("data-bs-tags") || ""; // If no tags, default to empty string
|
var tags = item.getAttribute("data-bs-tags") || ""; // If no tags, default to empty string
|
||||||
|
|
||||||
|
|
||||||
if (titleElement && iconElement && itemHref !== "#") {
|
if (titleElement && iconElement && itemHref !== "#") {
|
||||||
var title = titleElement.innerText;
|
var title = titleElement.innerText;
|
||||||
if (
|
if (
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
<p th:text="#{pdfToPDFA.tip}"></p>
|
<p th:text="#{pdfToPDFA.tip}"></p>
|
||||||
<form method="post" enctype="multipart/form-data" th:action="@{api/v1/convert/pdf/pdfa}">
|
<form method="post" enctype="multipart/form-data" th:action="@{api/v1/convert/pdf/pdfa}">
|
||||||
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label th:text="#{pdfToPDFA.outputFormat}"></label>
|
<label th:text="#{pdfToPDFA.outputFormat}"></label>
|
||||||
<select class="form-control" name="outputFormat">
|
<select class="form-control" name="outputFormat">
|
||||||
<option value="pdfa-1">PDF/A-1b</option>
|
<option value="pdfa-1">PDF/A-1b</option>
|
||||||
<option value="pdfa">PDF/A-2b</option>
|
<option value="pdfa">PDF/A-2b</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{pdfToPDFA.submit}"></button>
|
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{pdfToPDFA.submit}"></button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
<button type="button" class="btn btn-secondary" onclick="copytrace()" th:text="#{error.copyStack}"></button>
|
<button type="button" class="btn btn-secondary" onclick="copytrace()" th:text="#{error.copyStack}"></button>
|
||||||
<button type="button" class="btn btn-info" onclick="showHelp()" th:text="#{help}"></button>
|
<button type="button" class="btn btn-info" onclick="showHelp()" th:text="#{help}"></button>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()">
|
||||||
<span class="material-symbols-rounded">
|
<span class="material-symbols-rounded">
|
||||||
close
|
close
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- Stack trace section -->
|
<!-- Stack trace section -->
|
||||||
<div id="trace" style="max-height: 0; overflow: hidden;">
|
<div id="trace" style="max-height: 0; overflow: hidden;">
|
||||||
<div>
|
<div>
|
||||||
@ -23,11 +23,11 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="helpModalLabel" th:text="#{help}"></h5>
|
<h5 class="modal-title" id="helpModalLabel" th:text="#{help}"></h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()">
|
||||||
<span class="material-symbols-rounded">
|
<span class="material-symbols-rounded">
|
||||||
close
|
close
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -233,7 +233,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#" th:href="@{multi-tool}"
|
<a class="nav-link" href="#" th:href="@{multi-tool}"
|
||||||
th:classappend="${currentPage}=='multi-tool' ? 'active' : ''" th:title="#{home.multiTool.desc}">
|
th:classappend="${currentPage}=='multi-tool' ? 'active' : ''" th:title="#{home.multiTool.desc}">
|
||||||
@ -254,7 +253,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#" title="#{home.compressPdfs.title}" th:href="@{compress-pdf}"
|
<a class="nav-link" href="#" title="#{home.compressPdfs.title}" th:href="@{compress-pdf}"
|
||||||
th:classappend="${currentPage}=='compress-pdf' ? 'active' : ''" th:title="#{home.compressPdfs.desc}">
|
th:classappend="${currentPage}=='compress-pdf' ? 'active' : ''" th:title="#{home.compressPdfs.desc}">
|
||||||
@ -276,8 +274,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!--
|
<!-- <li class="nav-item">
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#" th:href="@{merge-pdfs}"
|
<a class="nav-link" href="#" th:href="@{merge-pdfs}"
|
||||||
th:classappend="${currentPage}=='merge-pdfs' ? 'active' : ''" th:title="#{home.merge.desc}">
|
th:classappend="${currentPage}=='merge-pdfs' ? 'active' : ''" th:title="#{home.merge.desc}">
|
||||||
<span class="material-symbols-rounded">
|
<span class="material-symbols-rounded">
|
||||||
@ -285,8 +282,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="icon-text" th:data-text="#{home.merge.title}" th:text="#{home.merge.title}"></span>
|
<span class="icon-text" th:data-text="#{home.merge.title}" th:text="#{home.merge.title}"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li> -->
|
||||||
-->
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav flex-nowrap">
|
<ul class="navbar-nav flex-nowrap">
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
@ -329,24 +326,22 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link" href="#" id="searchDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="nav-link" href="#" id="searchDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="material-symbols-rounded">
|
<span class="material-symbols-rounded">
|
||||||
search
|
search
|
||||||
</span>
|
</span>
|
||||||
<span class="icon-text icon-hide">Search</span>
|
<span class="icon-text icon-hide">Search</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-tp" aria-labelledby="searchDropdown">
|
<div class="dropdown-menu dropdown-menu-tp" aria-labelledby="searchDropdown">
|
||||||
<div class="dropdown-menu-wrapper px-xl-2 px-2">
|
<div class="dropdown-menu-wrapper px-xl-2 px-2">
|
||||||
<form class="d-flex p-2 search-form" id="searchForm">
|
<form class="d-flex p-2 search-form" id="searchForm">
|
||||||
<input class="form-control search-input" type="search" placeholder="Search" aria-label="Search" id="navbarSearchInput">
|
<input class="form-control search-input" type="search" placeholder="Search" aria-label="Search" id="navbarSearchInput">
|
||||||
</form>
|
</form>
|
||||||
<!-- Search Results -->
|
<!-- Search Results -->
|
||||||
<div id="searchResults" class="search-results scrollable-y dropdown-mw-20"></div>
|
<div id="searchResults" class="search-results scrollable-y dropdown-mw-20"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<!-- Settings Button -->
|
<!-- Settings Button -->
|
||||||
@ -405,9 +400,6 @@
|
|||||||
target="_blank"></a>
|
target="_blank"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="downloadOption" th:utext="#{settings.downloadOption.title}"></label>
|
<label for="downloadOption" th:utext="#{settings.downloadOption.title}"></label>
|
||||||
<select class="form-control" id="downloadOption">
|
<select class="form-control" id="downloadOption">
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<input type="checkbox" id="flattenOnlyForms" name="flattenOnlyForms">
|
<input type="checkbox" id="flattenOnlyForms" name="flattenOnlyForms">
|
||||||
<label for="flattenOnlyForms" th:text="#{flatten.flattenOnlyForms}" ></label>
|
<label for="flattenOnlyForms" th:text="#{flatten.flattenOnlyForms}" ></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{flatten.submit}"></button>
|
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{flatten.submit}"></button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 th:text="#{printFile.selectText.1}">Select Printer</h4> <!-- Assuming the message code printFile.selectText.3 corresponds to "Select Printer" -->
|
<h4 th:text="#{printFile.selectText.1}">Select Printer</h4> <!-- Assuming the message code printFile.selectText.3 corresponds to "Select Printer" -->
|
||||||
<label for="printerName" th:text="#{printFile.selectText.2}">Printer Name:</label> <!-- Assuming the message code printFile.selectText.4 corresponds to "Printer Name:" -->
|
<label for="printerName" th:text="#{printFile.selectText.2}">Printer Name:</label> <!-- Assuming the message code printFile.selectText.4 corresponds to "Printer Name:" -->
|
||||||
<input type="text" name="printerName" id="printerName" class="form-control">
|
<input type="text" name="printerName" id="printerName" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{printFile.submit}"></button>
|
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{printFile.submit}"></button>
|
||||||
|
Loading…
Reference in New Issue
Block a user