1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-16 12:20:12 +01:00
This commit is contained in:
Anthony Stirling 2023-08-22 21:19:18 +01:00
parent 7c26c56210
commit 8aac0c0327
2 changed files with 14 additions and 21 deletions

View File

@ -305,9 +305,7 @@
<div class="modal-content dark-card"> <div class="modal-content dark-card">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="settingsModalLabel" th:text="#{settings.title}"></h5> <h5 class="modal-title" id="settingsModalLabel" th:text="#{settings.title}"></h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<span aria-hidden="true">&times;</span>
</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="d-flex justify-content-between align-items-center mb-3"> <div class="d-flex justify-content-between align-items-center mb-3">
@ -318,12 +316,9 @@
<a href="swagger-ui/index.html" target="_blank"> <a href="swagger-ui/index.html" target="_blank">
<button type="button" class="btn btn-sm btn-outline-primary">API</button> <button type="button" class="btn btn-sm btn-outline-primary">API</button>
</a> </a>
<a href="https://github.com/Frooodle/Stirling-PDF/releases" target="_blank"> <a href="https://github.com/Frooodle/Stirling-PDF/releases" target="_blank">
<button type="button" class="btn btn-sm btn-outline-primary" id="update-btn" th:utext="#{settings.update}"></button> <button type="button" class="btn btn-sm btn-outline-primary" id="update-btn" th:utext="#{settings.update}"></button>
</a> </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>
@ -335,33 +330,27 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="zipThreshold" th:utext="#{settings.zipThreshold}"></label> <label for="zipThreshold" th:utext="#{settings.zipThreshold}"></label>
<input type="range" class="custom-range" min="1" max="9" step="1" id="zipThreshold" value="4"> <input type="range" class="form-range" min="1" max="9" step="1" id="zipThreshold" value="4">
<span id="zipThresholdValue" class="ms-2"></span> <span id="zipThresholdValue" class="ms-2"></span>
</div> </div>
<div class="mb-3"> <div class="mb-3 form-check">
<div class="custom-control custom-checkbox"> <input type="checkbox" class="form-check-input" id="boredWaiting">
<input type="checkbox" class="custom-control-input" id="boredWaiting"> <label class="form-check-label" for="boredWaiting" th:text="#{bored}"></label>
<label class="custom-control-label" for="boredWaiting" th:text="#{bored}"></label>
</div>
</div> </div>
<a th:if="${@loginEnabled}" href="account" target="_blank"> <a th:if="${@loginEnabled}" href="account" target="_blank">
<button type="button" class="btn btn-sm btn-outline-primary" th:text="#{settings.accountSettings}">Account Settings</button> <button type="button" class="btn btn-sm btn-outline-primary" th:text="#{settings.accountSettings}">Account Settings</button>
</a> </a>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a th:if="${@loginEnabled}" href="/logout"> <a th:if="${@loginEnabled}" href="/logout">
<button type="button" class="btn btn-danger" th:text="#{settings.signOut}">Sign Out</button> <button type="button" class="btn btn-danger" th:text="#{settings.signOut}">Sign Out</button>
</a> </a>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" th:text="#{close}"></button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" th:text="#{close}"></button>
</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/settings.js"></script> <script src="js/settings.js"></script>

View File

@ -142,13 +142,17 @@
const buttonElem = document.createElement('button'); const buttonElem = document.createElement('button');
buttonElem.className = 'btn btn-link'; buttonElem.className = 'btn btn-link';
buttonElem.type = 'button'; buttonElem.type = 'button';
buttonElem.dataset.toggle = "collapse"; buttonElem.dataset.bsToggle = "collapse";
buttonElem.dataset.target = `#${safeKey}-content-${depth}`; buttonElem.dataset.bsTarget = `#${safeKey}-content-${depth}`;
buttonElem.setAttribute('aria-expanded', 'true'); buttonElem.setAttribute('aria-expanded', 'true');
buttonElem.setAttribute('aria-controls', `${safeKey}-content-${depth}`); buttonElem.setAttribute('aria-controls', `${safeKey}-content-${depth}`);
buttonElem.textContent = key; buttonElem.textContent = key;
return buttonElem; return buttonElem;
} }
const collapsibleElems = document.querySelectorAll('[data-bs-toggle="collapse"]');
collapsibleElems.forEach(elem => {
new bootstrap.Collapse(elem);
});
</script> </script>
</div> </div>
</div> </div>