diff --git a/src/core/ui/settings/pages/Developer/index.tsx b/src/core/ui/settings/pages/Developer/index.tsx index 5d700ff..6f66a81 100644 --- a/src/core/ui/settings/pages/Developer/index.tsx +++ b/src/core/ui/settings/pages/Developer/index.tsx @@ -21,7 +21,7 @@ const { showSimpleActionSheet } = lazyDestructure(() => findByProps("showSimpleA const { openAlert } = lazyDestructure(() => findByProps("openAlert", "dismissAlert")); const { AlertModal, AlertActionButton } = lazyDestructure(() => findByProps("AlertModal", "AlertActions")); -const RDT_EMBED_LINK = "https://github.com/revenge-mod/react-devtools-core/releases/latest/download/rdtc.js"; +const RDT_EMBED_LINK = ""; const useStyles = createStyles({ leadingText: { diff --git a/src/core/ui/settings/pages/Themes/index.tsx b/src/core/ui/settings/pages/Themes/index.tsx index 5595edb..e7e38da 100644 --- a/src/core/ui/settings/pages/Themes/index.tsx +++ b/src/core/ui/settings/pages/Themes/index.tsx @@ -2,80 +2,141 @@ import { formatString, Strings } from "@core/i18n"; import AddonPage from "@core/ui/components/AddonPage"; import ThemeCard from "@core/ui/settings/pages/Themes/ThemeCard"; import { useProxy } from "@core/vendetta/storage"; -import { getCurrentTheme, installTheme, themes, VdThemeInfo } from "@lib/addons/themes"; +import { + getCurrentTheme, + installTheme, + themes, + VdThemeInfo, +} from "@lib/addons/themes"; import { colorsPref } from "@lib/addons/themes/colors/preferences"; import { updateBunnyColor } from "@lib/addons/themes/colors/updater"; import { Author } from "@lib/addons/types"; import { findAssetId } from "@lib/api/assets"; import { settings } from "@lib/api/settings"; import { useObservable } from "@lib/api/storage"; -import { ActionSheet, BottomSheetTitleHeader, Button, TableRadioGroup, TableRadioRow, TableRowIcon } from "@metro/common/components"; +import { + ActionSheet, + BottomSheetTitleHeader, + Button, + TableRowGroup, + TableSwitchRow, + TableRowIcon, +} from "@metro/common/components"; import { View } from "react-native"; +/** + * Theme options have been changed from radio groups to individual switches + * for better UX. Each option can now be toggled independently. + */ + export default function Themes() { - useProxy(settings); - useProxy(themes); + useProxy(settings); + useProxy(themes); - return ( - - title={Strings.THEMES} - searchKeywords={[ - "data.name", - "data.description", - p => p.data.authors?.map((a: Author) => a.name).join(", ") ?? "" - ]} - sortOptions={{ - "Name (A-Z)": (a, b) => a.data.name.localeCompare(b.data.name), - "Name (Z-A)": (a, b) => b.data.name.localeCompare(a.data.name) - }} - installAction={{ - label: "Install a theme", - fetchFn: installTheme - }} - items={Object.values(themes)} - safeModeHint={{ - message: formatString("SAFE_MODE_NOTICE_THEMES", { enabled: Boolean(settings.safeMode?.currentThemeId) }), - footer: settings.safeMode?.currentThemeId &&