From 01d0b6a8bd940089e53cccebc361b2fe2e18caba Mon Sep 17 00:00:00 2001 From: CenTdemeern1 Date: Fri, 31 Jan 2025 15:58:10 +0100 Subject: [PATCH] Don't use the proxy in the JS --- static/confirm_instance_details.mts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/static/confirm_instance_details.mts b/static/confirm_instance_details.mts index 7c01356..e376fee 100644 --- a/static/confirm_instance_details.mts +++ b/static/confirm_instance_details.mts @@ -1,7 +1,6 @@ // This file handles the "Confirm instance details" dialog import { findButtonOrFail, findFormOrFail, findImageOrFail, findInputOrFail, findSelectOrFail } from "./dom.mjs"; -import { resize } from "./image.mjs"; import knownSoftware from "./known_software.mjs"; const blankImage = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; @@ -55,22 +54,16 @@ export function initializeInstanceDetailsDialog( instanceHost.value = instanceHostValue; instanceHostSecure.checked = instanceHostSecureValue; instanceSoftware.value = instanceSoftwareValue; - instanceIcon.src = instanceIconValue === null ? blankImage : `/api/proxy/${encodeURIComponent(instanceIconValue)}`; + instanceIcon.src = instanceIconValue ?? blankImage; }; form.addEventListener("submit", e => { - let image: string | null = null; - if (instanceIcon.src !== blankImage) { - try { - image = resize(instanceIcon); - } catch { } - } callback( instanceName.value, instanceHost.value, instanceHostSecure.checked, instanceSoftware.value, - image + instanceIcon.src ); form.reset(); });