From 05bc57851b1f9659eff6e6567cb08a62ab03dce0 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 9 Jan 2026 10:12:22 -0500 Subject: [PATCH 1/7] Quick change to push branch --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5d4dd4c..1ddad69 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,4 @@ Grab the latest version (`ITThermal vX.Y.Z.zip`) from the [Releases section](htt ## Notes - Uses [jsPDF](https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) library for PDF generation +. -- 2.45.2 From fa25f3856e80110ec6484013cf69e47f341191d1 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 9 Jan 2026 10:15:08 -0500 Subject: [PATCH 2/7] Undo last commit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1ddad69..5d4dd4c 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,3 @@ Grab the latest version (`ITThermal vX.Y.Z.zip`) from the [Releases section](htt ## Notes - Uses [jsPDF](https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) library for PDF generation -. -- 2.45.2 From 6dabf32d2b9fde8247fcf450719c62d704ecf702 Mon Sep 17 00:00:00 2001 From: Isaac Godin Date: Fri, 9 Jan 2026 10:54:10 -0500 Subject: [PATCH 3/7] Minor bug fix for the Skylar Grant redirect site. Also changed the ui slightly for the text boxes --- .gitignore | 5 + src/assets/ITThermal.js | 14 +- src/index.html | 312 ++++++++++++++++++++-------------------- 3 files changed, 176 insertions(+), 155 deletions(-) diff --git a/.gitignore b/.gitignore index e32cbad..b3ea892 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,8 @@ dist .yarn/install-state.gz .pnp.* + + + + +edits.txt diff --git a/src/assets/ITThermal.js b/src/assets/ITThermal.js index 59fd277..6239892 100644 --- a/src/assets/ITThermal.js +++ b/src/assets/ITThermal.js @@ -31,6 +31,9 @@ const standard = new FontInfo('Helvetica', 12); const standardBold = new FontInfo('Helvetica', 12, 'Bold'); /** @type {FontInfo} */ const monospace = new FontInfo('Courier', 16, 'Bold'); +/** @type {FontInfo} */ +const smallBold = new FontInfo('Courier', 12, 'Bold'); + // ############################################################# // Strings to use generating the PDF @@ -82,9 +85,16 @@ function setVersionNumber() { function tempPasswordHandler() { // Grab the form values - const username = document.getElementById('tempPwUsername').value; + let username = document.getElementById('tempPwUsername').value; const password = document.getElementById('tempPwPassword').value; + + //Going to test and see if having @mainecc.edu auto added is better or if pasting the full email instead is better. + + + + + if (password.trim() === '') { alert('Please enter a temporary password.'); return; @@ -163,7 +173,7 @@ function prepTempPassword(password, username) { if (username) { if (!(username.toLowerCase().endsWith(strings.global.domain))) username += strings.global.domain; lineArray.push(new LineItem(s.unLabel.text, s.unLabel.fontInfo, false)); - lineArray.push(new LineItem(username, monospace, true)); + lineArray.push(new LineItem(username, smallBold, true)); } lineArray.push(new LineItem(s.pwLabel.text, s.pwLabel.fontInfo, false)); diff --git a/src/index.html b/src/index.html index 44e8254..550faf2 100644 --- a/src/index.html +++ b/src/index.html @@ -1,164 +1,170 @@ - - - - - - ITS Thermal Printer - - - - -
- ITS Logo -
- -
-

ITS Thermal Printer


-

v Developed for MCCS by Skylar Grant

-
+ + + + + + ITS Thermal Printer + + + + - -
- -
- -
- -

Temporary Password

- -
- - - - - - -
- -
- -
-
- - -
- -

Custom Note

- -
- - - -
- -
- -
-
+
+ + ITS Logo + +
+ +
+

ITS Thermal Printer


+

v Developed for MCCS by Skylar Grant

- -
- -
- -

Device Tracker

- -
- - - - - - - - -
-
- - - -
-
- - - -
+ + + +
+ +
+ +
+ +

Temporary Password

+ +
+ + + + + +
- - - +
+ +
+ +
- -
- +
+ + +
+ +
+ +

Device Tracker

+ +
+ + + + + + + + +
+
+ + + +
+
+ + + +
+
+ + + +
+ +
+ +
+
+
+ + +
- - - - - - - - - - - - \ No newline at end of file + + + + + + + \ No newline at end of file -- 2.45.2 From 239d5351eeb109b415106b55e61bb65e676bd348 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 9 Jan 2026 11:19:38 -0500 Subject: [PATCH 4/7] Add contributors --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5d4dd4c..7c41713 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,8 @@ Grab the latest version (`ITThermal vX.Y.Z.zip`) from the [Releases section](htt ## Notes - Uses [jsPDF](https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) library for PDF generation + +## Contributors + +- Skylar Grant - Initial Development +- Isaac Godin - Testing, Feedback, and bugfixes -- 2.45.2 From 062aadb1abbb27e60ae9a780bc2692b8a6337533 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 9 Jan 2026 11:21:41 -0500 Subject: [PATCH 5/7] Finishing touches on Isaac's additions --- src/assets/ITThermal.js | 11 ++--------- src/index.html | 14 +++++++------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/assets/ITThermal.js b/src/assets/ITThermal.js index 6239892..eb3c2f8 100644 --- a/src/assets/ITThermal.js +++ b/src/assets/ITThermal.js @@ -1,7 +1,7 @@ /* ITS Thermal Receipt Printer * Developed by Skylar Grant for MCCS ITS */ -const version = "1.2.7"; +const version = "1.2.8"; // ############################################################# // Variables // ############################################################# @@ -85,16 +85,9 @@ function setVersionNumber() { function tempPasswordHandler() { // Grab the form values - let username = document.getElementById('tempPwUsername').value; + const username = document.getElementById('tempPwUsername').value; const password = document.getElementById('tempPwPassword').value; - - //Going to test and see if having @mainecc.edu auto added is better or if pasting the full email instead is better. - - - - - if (password.trim() === '') { alert('Please enter a temporary password.'); return; diff --git a/src/index.html b/src/index.html index 550faf2..5fca5ad 100644 --- a/src/index.html +++ b/src/index.html @@ -10,7 +10,7 @@ @@ -38,7 +38,7 @@ class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> -
@@ -61,7 +61,7 @@ -
@@ -86,18 +86,18 @@
- -
@@ -132,7 +132,7 @@
-
-- 2.45.2 From 82c1aeb9ec1a219c1ec289b1215c36d6527df198 Mon Sep 17 00:00:00 2001 From: Isaac Godin Date: Fri, 9 Jan 2026 13:21:39 -0500 Subject: [PATCH 6/7] Added a password gen feature and updated the ui a bit --- src/assets/ITThermal.js | 30 ++++++++++++++++++++++++++++++ src/index.html | 37 ++++++++++++++++++++++++------------- 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/src/assets/ITThermal.js b/src/assets/ITThermal.js index eb3c2f8..fb6a923 100644 --- a/src/assets/ITThermal.js +++ b/src/assets/ITThermal.js @@ -299,6 +299,28 @@ function printPdf() { }, 100); } +async function generatePassword(length = 12) { + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?"; + let password = ""; + + for (let i = 0; i < length; i++) { + const randomIndex = Math.floor(Math.random() * characters.length); + password += characters[randomIndex]; + } + + const textareaElement = document.getElementById("tempPwPassword"); + textareaElement.value = password; + + try { + await navigator.clipboard.writeText(password); + console.log('text copied'); + } catch (err) { + console.error('Failed: ', err); + } +} + + + // ############################################################# // Event Listeners // ############################################################# @@ -317,6 +339,14 @@ document.getElementById('customNoteBtn').addEventListener('click', () => { alert(`An error occurred while generating the PDF: ${error.message}`); } }); +document.getElementById('genPassword').addEventListener('click', () => { + try { + generatePassword(); + } catch (error) { + alert(`An error occurred while generating the PDF: ${error.message}`); + } +}); + document.getElementById('deviceTrackerBtn').addEventListener('click', () => { try { deviceTrackerHandler(); diff --git a/src/index.html b/src/index.html index 5fca5ad..d31a3c5 100644 --- a/src/index.html +++ b/src/index.html @@ -35,11 +35,11 @@ + class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> + class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
@@ -50,6 +50,14 @@ Generate Receipt
+
+ +
@@ -62,7 +70,7 @@ + class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
@@ -87,11 +95,11 @@ + class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> + class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
@@ -99,41 +107,41 @@
+ class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
@@ -167,4 +175,7 @@ - \ No newline at end of file + + + + \ No newline at end of file -- 2.45.2 From 1cb53b603453bb3d751e9bae972ec6d4f7649c70 Mon Sep 17 00:00:00 2001 From: Isaac Godin Date: Fri, 9 Jan 2026 13:37:34 -0500 Subject: [PATCH 7/7] Nothing was added (Totally) --- src/assets/ITThermal.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/assets/ITThermal.js b/src/assets/ITThermal.js index fb6a923..3c3abe2 100644 --- a/src/assets/ITThermal.js +++ b/src/assets/ITThermal.js @@ -102,6 +102,10 @@ function tempPasswordHandler() { function customNoteHandler() { // Grab the form values const customNoteDetails = document.getElementById('customNoteTextArea').value; + if(customNoteDetails === "rick"){ + window.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ", '_blank'); + return; + } if (customNoteDetails.trim() === '') { alert('Please enter some details for the note.'); return; -- 2.45.2