mod enabling and disabling

This commit is contained in:
SpikeHD
2022-07-25 20:25:43 -07:00
parent c99080168c
commit 9566beaf29
5 changed files with 107 additions and 12 deletions

View File

@@ -36,6 +36,11 @@ const headers = [
},
]
/**
* Mods currently install into folder labelled with their GB ID
*
* @TODO Categorizaiton/sorting (by likes, views, etc)
*/
export class Mods extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props)
@@ -49,10 +54,6 @@ export class Mods extends React.Component<IProps, IState> {
this.addDownload = this.addDownload.bind(this)
}
async componentDidMount() {
return
}
async addDownload(mod: ModData) {
const modFolder = await getModsFolder()
const modPath = `${modFolder}${mod.id}.zip`
@@ -101,7 +102,7 @@ export class Mods extends React.Component<IProps, IState> {
</TopBar>
<div className="TopDownloads">
<ProgressBar downloadManager={this.props.downloadHandler} />
<ProgressBar downloadManager={this.props.downloadHandler} withStats={false} />
</div>
<ModHeader onChange={this.setCategory} headers={headers} defaultHeader={'ripe'} />