diff --git a/src/components/installed/OutdatedVdataModal.tsx b/src/components/installed/OutdatedVdataModal.tsx index 3b809de7..8cd0691d 100644 --- a/src/components/installed/OutdatedVdataModal.tsx +++ b/src/components/installed/OutdatedVdataModal.tsx @@ -2,10 +2,14 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ConfirmModal } from '../common/PageComponents'; import { Button } from '../common/ui'; +import ModThumbnail from '../ModThumbnail'; +import { inferHeroFromTitle } from '../../lib/lockerUtils'; +import { shouldBlurNsfw } from '../../lib/appSettings'; import { useAppStore } from '../../stores/appStore'; import type { Mod } from '../../types/mod'; -const SAMPLE_PATHS = 3; +/** `scripts/heroes.vdata_c` reads as `heroes.vdata`. */ +const vdataName = (entry: string) => entry.slice(entry.lastIndexOf('/') + 1).replace(/_c$/, ''); interface OutdatedVdataModalProps { /** Enabled mods with `outdatedVdata`. */ @@ -18,6 +22,7 @@ interface OutdatedVdataModalProps { export function OutdatedVdataModal({ mods, open, onClose }: OutdatedVdataModalProps) { const { t } = useTranslation(); const toggleMod = useAppStore((s) => s.toggleMod); + const hideNsfw = useAppStore((s) => shouldBlurNsfw(s.settings)); const [busy, setBusy] = useState(false); useEffect(() => { @@ -42,24 +47,28 @@ export function OutdatedVdataModal({ mods, open, onClose }: OutdatedVdataModalPr onCancel={onClose} > );