From 7eca06332ab2a24f75252e8d52cdbf16a402037a Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 27 Oct 2024 03:54:24 +0100 Subject: [PATCH] Change compression option to integer range --- Website/modules/Settings.tsx | 18 ++++++++---------- .../modules/interfaces/IBackendSettings.tsx | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Website/modules/Settings.tsx b/Website/modules/Settings.tsx index 6964c24..b2c900c 100644 --- a/Website/modules/Settings.tsx +++ b/Website/modules/Settings.tsx @@ -120,17 +120,17 @@ export default function Settings({backendConnected, apiUri, settings, changeSett }) } - const SetCompressImages : ChangeEventHandler = (e) => { - console.info(`Updating ImageCompression ${e.target.checked}`); - postData(`${apiUri}/v2/Settings/CompressImages`, {value: e.target.checked}) + const SetCompressImages : MouseEventHandler = (e) => { + //console.info(`Updating ImageCompression ${e.currentTarget.value}`); + postData(`${apiUri}/v2/Settings/CompressImages`, {value: e.currentTarget.value}) .then((json) => { - //console.info(`Successfully updated ImageCompression ${e.target.checked}`); + //console.info(`Successfully updated ImageCompression ${e.currentTarget.value}`); UpdateBackendSettings(); }) } const SetBWImages : ChangeEventHandler = (e) => { - console.info(`Updating B/W Images ${e.target.checked}`); + //console.info(`Updating B/W Images ${e.target.checked}`); postData(`${apiUri}/v2/Settings/BWImages`, {value: e.target.checked}) .then((json) => { //console.info(`Successfully updated B/W Images ${e.target.checked}`); @@ -170,17 +170,15 @@ export default function Settings({backendConnected, apiUri, settings, changeSett - - + +
- Rate Limits + Rate Limits diff --git a/Website/modules/interfaces/IBackendSettings.tsx b/Website/modules/interfaces/IBackendSettings.tsx index cf7be3f..a4edf2a 100644 --- a/Website/modules/interfaces/IBackendSettings.tsx +++ b/Website/modules/interfaces/IBackendSettings.tsx @@ -7,7 +7,7 @@ export default interface IBackendSettings { "bufferNotifications": boolean; "version": number; "aprilFoolsMode": boolean; - "compressImages": boolean; + "compression": number; "bwImages": boolean; "requestLimits": { "MangaInfo": number;