From 6d030d488b177447a2f01a3ab9d3d483eaec95ac Mon Sep 17 00:00:00 2001 From: Der_Googler <54764558+DerGoogler@users.noreply.github.com> Date: Wed, 12 Jul 2023 13:34:00 +0200 Subject: [PATCH] Added module covers --- README.md | 1 + Website/src/activitys/SettingsActivity.tsx | 17 +++++++++++++++++ Website/src/components/ExploreModule.tsx | 13 ++++++++++++- Website/src/hooks/useSettings.tsx | 2 ++ Website/src/typings/global.d.ts | 2 +- 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f59f53b..3f997337 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ description= # MMRL supported properties mmrlConfig= mmrlNoComments= +mmrlCover= # Fox's Mmm supported properties minApi= diff --git a/Website/src/activitys/SettingsActivity.tsx b/Website/src/activitys/SettingsActivity.tsx index 519d7cc8..25b59a71 100644 --- a/Website/src/activitys/SettingsActivity.tsx +++ b/Website/src/activitys/SettingsActivity.tsx @@ -77,6 +77,23 @@ function SettingsActivity() { }} /> + + + { + setSettings("_disable_module_covers", e.target.checked); + }} + checked={settings._disable_module_covers} + inputProps={{ + "aria-labelledby": "switch-list-_disable_module_covers", + }} + /> + {os.isAndroid && ( { return ( + {!settings._disable_module_covers && prop_url.mmrlCover && ( + // @ts-ignore + + )} diff --git a/Website/src/hooks/useSettings.tsx b/Website/src/hooks/useSettings.tsx index 7576c5bf..55e6f06f 100644 --- a/Website/src/hooks/useSettings.tsx +++ b/Website/src/hooks/useSettings.tsx @@ -140,6 +140,7 @@ export interface StorageDeclaration { eruda_console_enabled: boolean; disabled_repos: string[]; _low_quality_module: boolean; + _disable_module_covers: boolean; __experimental_local_install: boolean; repos: StoredRepo[]; test: any; @@ -152,6 +153,7 @@ export const INITIAL_SETTINGS: StorageDeclaration = { eruda_console_enabled: false, disabled_repos: [], _low_quality_module: true, + _disable_module_covers: false, __experimental_local_install: false, repos: [], test: [], diff --git a/Website/src/typings/global.d.ts b/Website/src/typings/global.d.ts index 7633e9a3..3755e72b 100644 --- a/Website/src/typings/global.d.ts +++ b/Website/src/typings/global.d.ts @@ -187,8 +187,8 @@ declare global { // MMRL supported properties mmrlConfig?: string; - mmrlChangelog?: string; mmrlNoComments?: string; + mmrlCover?: string; // Fox's Mmm supported properties minApi?: string;