unblur when horny mode is on

This commit is contained in:
SpikeHD
2022-09-02 20:17:48 -07:00
parent 6eab66032b
commit 782e350ae5
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react'
import { getConfigOption } from '../../../utils/configuration'
import { getInstalledMods, getMods, ModData, PartialModData } from '../../../utils/gamebanana'
import { LoadingCircle } from './LoadingCircle'
@@ -11,6 +12,7 @@ interface IProps {
}
interface IState {
horny: boolean
modList: ModData[] | null
installedList:
| {
@@ -25,6 +27,7 @@ export class ModList extends React.Component<IProps, IState> {
super(props)
this.state = {
horny: false,
modList: null,
installedList: null,
}
@@ -60,8 +63,10 @@ export class ModList extends React.Component<IProps, IState> {
}
const mods = await getMods(this.props.mode)
const horny = await getConfigOption('horny_mode')
this.setState({
horny,
modList: mods,
})
}
@@ -81,7 +86,7 @@ export class ModList extends React.Component<IProps, IState> {
<ModTile path={mod.path} mod={mod.info} key={mod.info.name} onClick={this.downloadMod} />
))
: this.state.modList?.map((mod: ModData) => (
<ModTile mod={mod} key={mod.id} onClick={this.downloadMod} />
<ModTile horny={this.state.horny} mod={mod} key={mod.id} onClick={this.downloadMod} />
))}
</div>
) : (

View File

@@ -12,6 +12,7 @@ import { disableMod, enableMod, modIsEnabled } from '../../../utils/mods'
interface IProps {
mod: ModData | PartialModData
horny?: boolean
path?: string
onClick: (mod: ModData) => void
}
@@ -107,7 +108,9 @@ export class ModTile extends React.Component<IProps, IState> {
))}
<img
src={mod.images[0]}
className={`ModImageInner ${'id' in mod && mod.nsfw ? 'nsfw' : ''} ${this.state.hover ? 'blur' : ''}`}
className={`ModImageInner ${'id' in mod && !this.props.horny && mod.nsfw ? 'nsfw' : ''} ${
this.state.hover ? 'blur' : ''
}`}
/>
</div>
<div className="ModInner">