From 4089ba01e0881c89a72332e13bc3a80b6bddec2a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 29 Jun 2026 22:15:55 +0000
Subject: [PATCH] =DashboardManager overhaul. A bit easier to modify the output of pages. Still have to get the account pages to work as expected, as well as verify the integrations and others are working - but registrar/content pages work as expected. Also fixed up the table generation in CRUD.js and CRUDSkeleton.php
---
assets/js/concise/UploadManager.js | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/assets/js/concise/UploadManager.js b/assets/js/concise/UploadManager.js
index 15417be..b51a781 100644
--- a/assets/js/concise/UploadManager.js
+++ b/assets/js/concise/UploadManager.js
@@ -1078,7 +1078,21 @@
*********************************************************************/
getWorker() {
if (!this.workerState.worker && typeof OffscreenCanvas !== 'undefined') {
- this.workerState.worker = new Worker('worker.js');
+ const workerCode = `
+ self.onmessage = function(e) {
+ const { id, imageBitmap, width, height, type, quality } = e.data;
+ const canvas = new OffscreenCanvas(width, height);
+ const ctx = canvas.getContext('2d');
+ ctx.drawImage(imageBitmap, 0, 0, width, height);
+ canvas.convertToBlob({ type, quality }).then(blob => {
+ self.postMessage({ id, blob });
+ });
+ };
+ `;
+ const blob = new Blob([workerCode], { type: 'application/javascript' });
+ const url = URL.createObjectURL(blob);
+ this.workerState.worker = new Worker(url);
+ URL.revokeObjectURL(url); // Safe to revoke immediately after Worker is created
this.workerState.worker.onmessage = (e) => this.handleWorkerMessage(e);
this.workerState.worker.onerror = (e) => this.handleWorkerError(e);
}
--
Gitblit v1.10.0