diff --git a/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.html b/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.html new file mode 100644 index 0000000..3cd6c1a --- /dev/null +++ b/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.html @@ -0,0 +1 @@ +PrometheOS

PrometheOS: HDD Lock / Unlock


Please Wait...


Copyright 2024 - Team Cerbios + Team Resurgent
\ No newline at end of file diff --git a/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.js b/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.js new file mode 100644 index 0000000..4eb7171 --- /dev/null +++ b/PrometheOSUtility/PrometheOSPacker/bundle/hddlock.js @@ -0,0 +1,50 @@ +let nonce = 0; +window.onload = function () { + querydrive(); +} +async function querydrive() { + nonce = (Math.random() * 4294967295) - 2147483647; + let content = document.getElementById("content"); + await fetch(`http://192.168.1.66/api/drive.json?0&${nonce}`).catch(error => { + content.innerHTML = "Failed to connect."; + }).then(async response => { + const json = await response.json(); + const lockStatus = json.locked ? "Locked" : "Unlocked"; + const buttonLabel = json.locked ? "Unlock" : "Lock"; + let contentBody = `