Implemented tools as applets, Added Docker CCTV page, Fixed small issues

Update app.py, uuid-generator.yml, and 47 more files...
This commit is contained in:
2025-02-20 17:24:05 +01:00
parent bd96d85699
commit 0e91b5ed96
43 changed files with 889 additions and 337 deletions

View File

@@ -1,3 +0,0 @@
textarea {
resize: vertical;
}

View File

@@ -1,61 +0,0 @@
/**
* Generates a random UUID4 and returns its string representation
* @returns {`${string}-${string}-${string}-${string}-${string}`}
*/
export function generateUUID4() {
return crypto.randomUUID();
}
// Tool-centric stuff
{
/** @type {HTMLSelectElement} */
const eOptionTypeSelect = document.querySelector("select#uuid-generator-option-type");
/** @type {HTMLInputElement} */
const eOptionCountInput = document.querySelector("input#uuid-generator-option-count");
/** @type {HTMLInputElement} */
const eOptionHyphenInput = document.querySelector("input#uuid-generator-option-hyphens");
/** @type {HTMLElement} */
const eGenerateButton = document.querySelector("#uuid-generator-generate");
/** @type {HTMLElement} */
const eDownloadButton = document.querySelector("#uuid-generator-download");
/** @type {HTMLTextAreaElement} */
const ePreviewTextArea = document.querySelector("textarea#uuid-generator-preview");
/** @returns {number} */
function getDesiredCount() {
let desiredCount = null;
try {
desiredCount = parseInt(eOptionCountInput.value);
} catch (e) {
console.error(e);
}
if(desiredCount === null) {
desiredCount = 1;
}
if(desiredCount < 1) {
desiredCount = 1;
}
if(desiredCount > 1000) {
desiredCount = 1000;
}
return desiredCount;
}
window.onload = function () {
eGenerateButton.addEventListener("click", function() {
ePreviewTextArea.value = "";
let desiredCount = getDesiredCount();
let uuidGenerator = generateUUID4;
for(let i= 0; i < desiredCount; i++) {
ePreviewTextArea.value += uuidGenerator() + "\n";
}
});
eDownloadButton.addEventListener("click", function() {
//eFileDropInput.click();
});
}
}