diff --git a/Website/modules/Settings.tsx b/Website/modules/Settings.tsx index 6760f1e..6964c24 100644 --- a/Website/modules/Settings.tsx +++ b/Website/modules/Settings.tsx @@ -120,6 +120,24 @@ 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}) + .then((json) => { + //console.info(`Successfully updated ImageCompression ${e.target.checked}`); + UpdateBackendSettings(); + }) + } + + const SetBWImages : ChangeEventHandler = (e) => { + 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}`); + UpdateBackendSettings(); + }) + } + function RefreshInputs(){ alert("Saved."); setShowSettings(false); @@ -141,14 +159,25 @@ export default function Settings({backendConnected, apiUri, settings, changeSett
API Settings - + - + Reset + checked={backendSettings?.aprilFoolsMode ?? false} + onChange={SetAprilFoolsMode}/> + + + +
Rate Limits diff --git a/Website/modules/interfaces/IBackendSettings.tsx b/Website/modules/interfaces/IBackendSettings.tsx index 00e522a..cf7be3f 100644 --- a/Website/modules/interfaces/IBackendSettings.tsx +++ b/Website/modules/interfaces/IBackendSettings.tsx @@ -7,6 +7,8 @@ export default interface IBackendSettings { "bufferNotifications": boolean; "version": number; "aprilFoolsMode": boolean; + "compressImages": boolean; + "bwImages": boolean; "requestLimits": { "MangaInfo": number; "MangaDexFeed": number;