mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 08:34:43 +01:00
fix opening and some other stuff
This commit is contained in:
@@ -69,12 +69,8 @@ export class Mods extends React.Component<IProps, IState> {
|
||||
const firstLink = dlLinks[0].downloadUrl
|
||||
|
||||
this.props.downloadHandler.addDownload(firstLink, modPath, async () => {
|
||||
console.log('Unzipping:', mod.name)
|
||||
const unzipRes = await unzip(modPath, modFolder, false)
|
||||
|
||||
console.log(`${unzipRes.new_folder}/modinfo.json`)
|
||||
console.log(unzipRes)
|
||||
|
||||
// Write a modinfo.json file
|
||||
invoke('write_file', {
|
||||
path: `${unzipRes.new_folder}/modinfo.json`,
|
||||
|
||||
@@ -41,7 +41,8 @@ export class ModTile extends React.Component<IProps, IState> {
|
||||
onMouseLeave={() => this.setState({ hover: false })}
|
||||
onClick={() => {
|
||||
// Disable downloading installed mods
|
||||
if (!('id' in mod)) return this.openInExplorer()
|
||||
if (this.props.path) return this.openInExplorer()
|
||||
if (!('id' in mod)) return
|
||||
|
||||
this.props.onClick(mod)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user