mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
unblur when horny mode is on
This commit is contained in:
@@ -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>
|
||||
) : (
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user