mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Run prettier
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
.DirInput {
|
.DirInput {
|
||||||
display:inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ const DEV_REPO_DOWNLOAD = 'https://github.com/Grasscutters/Grasscutter/archive/r
|
|||||||
const STABLE_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/stable/Grasscutter.zip'
|
const STABLE_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/stable/Grasscutter.zip'
|
||||||
const DEV_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/development/Grasscutter.zip'
|
const DEV_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/development/Grasscutter.zip'
|
||||||
const RESOURCES_DOWNLOAD = 'https://gitlab.com/YuukiPS/GC-Resources/-/archive/3.5/GC-Resources-3.5.zip' // Use Yuuki res as grasscutter crepe res are broken
|
const RESOURCES_DOWNLOAD = 'https://gitlab.com/YuukiPS/GC-Resources/-/archive/3.5/GC-Resources-3.5.zip' // Use Yuuki res as grasscutter crepe res are broken
|
||||||
const MIGOTO_DOWNLOAD = 'https://github.com/SilentNightSound/GI-Model-Importer/releases/download/V6.0/3dmigoto-GIMI-for-playing-mods.zip'
|
const MIGOTO_DOWNLOAD =
|
||||||
|
'https://github.com/SilentNightSound/GI-Model-Importer/releases/download/V6.0/3dmigoto-GIMI-for-playing-mods.zip'
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
closeFn: () => void
|
closeFn: () => void
|
||||||
@@ -125,8 +126,7 @@ export default class Downloads extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCultivationFolder() {
|
async getCultivationFolder() {
|
||||||
|
const folderPath = (await dataDir()) + 'cultivation'
|
||||||
const folderPath = await dataDir() + 'cultivation'
|
|
||||||
|
|
||||||
return folderPath
|
return folderPath
|
||||||
}
|
}
|
||||||
@@ -220,9 +220,9 @@ export default class Downloads extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async downloadMigoto() {
|
async downloadMigoto() {
|
||||||
const folder = await this.getCultivationFolder() + '\\3dmigoto'
|
const folder = (await this.getCultivationFolder()) + '\\3dmigoto'
|
||||||
await invoke('dir_create', {
|
await invoke('dir_create', {
|
||||||
path: folder
|
path: folder,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.props.downloadManager.addDownload(MIGOTO_DOWNLOAD, folder + '\\GIMI-3dmigoto.zip', async () => {
|
this.props.downloadManager.addDownload(MIGOTO_DOWNLOAD, folder + '\\GIMI-3dmigoto.zip', async () => {
|
||||||
@@ -382,11 +382,7 @@ export default class Downloads extends React.Component<IProps, IState> {
|
|||||||
<HelpButton contents="help.migoto" />
|
<HelpButton contents="help.migoto" />
|
||||||
</div>
|
</div>
|
||||||
<div className="DownloadValue" id="downloadMenuButtonMigoto">
|
<div className="DownloadValue" id="downloadMenuButtonMigoto">
|
||||||
<BigButton
|
<BigButton disabled={this.state.migoto_downloading} onClick={this.downloadMigoto} id="migotoBtn">
|
||||||
disabled={this.state.migoto_downloading}
|
|
||||||
onClick={this.downloadMigoto}
|
|
||||||
id="migotoBtn"
|
|
||||||
>
|
|
||||||
<Tr text="components.download" />
|
<Tr text="components.download" />
|
||||||
</BigButton>
|
</BigButton>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -264,9 +264,7 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
await server.toggleEncryption(folderPath + '/config.json')
|
await server.toggleEncryption(folderPath + '/config.json')
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
encryption: (
|
encryption: await server.encryptionEnabled(folderPath + '/config.json'),
|
||||||
(await server.encryptionEnabled(folderPath + '/config.json'))
|
|
||||||
),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Check if Grasscutter is running, and restart if so to apply changes
|
// Check if Grasscutter is running, and restart if so to apply changes
|
||||||
@@ -399,11 +397,7 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
<HelpButton contents="help.encryption" />
|
<HelpButton contents="help.encryption" />
|
||||||
</div>
|
</div>
|
||||||
<div className="OptionValue" id="menuOptionsButtonToggleEnc">
|
<div className="OptionValue" id="menuOptionsButtonToggleEnc">
|
||||||
<Checkbox
|
<Checkbox onChange={() => this.toggleEncryption()} checked={this.state.encryption} id="toggleEnc" />
|
||||||
onChange={() => this.toggleEncryption()}
|
|
||||||
checked={this.state.encryption}
|
|
||||||
id="toggleEnc"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="OptionSection" id="menuOptionsContainerInstallCert">
|
<div className="OptionSection" id="menuOptionsContainerInstallCert">
|
||||||
@@ -432,8 +426,7 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
<Tr text="swag.migoto" />
|
<Tr text="swag.migoto" />
|
||||||
</div>
|
</div>
|
||||||
<div className="OptionValue" id="menuOptionsDirMigoto">
|
<div className="OptionValue" id="menuOptionsDirMigoto">
|
||||||
<SmallButton onClick={this.addMigotoDelay} id="migotoDelay" contents='help.add_delay'>
|
<SmallButton onClick={this.addMigotoDelay} id="migotoDelay" contents="help.add_delay"></SmallButton>
|
||||||
</SmallButton>
|
|
||||||
<DirInput onChange={this.setMigoto} value={this.state?.migoto_path} extensions={['exe']} />
|
<DirInput onChange={this.setMigoto} value={this.state?.migoto_path} extensions={['exe']} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export class ModTile extends React.Component<IProps, IState> {
|
|||||||
// Partial mod
|
// Partial mod
|
||||||
this.setState({
|
this.setState({
|
||||||
modEnabled: await modIsEnabled(this.props.mod.name),
|
modEnabled: await modIsEnabled(this.props.mod.name),
|
||||||
horny
|
horny,
|
||||||
})
|
})
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -61,7 +61,7 @@ export class ModTile extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
modEnabled: await modIsEnabled(String(this.props.mod.id)),
|
modEnabled: await modIsEnabled(String(this.props.mod.id)),
|
||||||
horny
|
horny,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ export class ModTile extends React.Component<IProps, IState> {
|
|||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
modEnabled: !this.state.modEnabled,
|
modEnabled: !this.state.modEnabled,
|
||||||
horny: !this.state.horny
|
horny: !this.state.horny,
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
if (this.state.modEnabled) {
|
if (this.state.modEnabled) {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default class DownloadHandler {
|
|||||||
downloadingRepo() {
|
downloadingRepo() {
|
||||||
return this.downloads.some((d) => d.path.includes('grasscutter_repo.zip'))
|
return this.downloads.some((d) => d.path.includes('grasscutter_repo.zip'))
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadingMigoto() {
|
downloadingMigoto() {
|
||||||
return this.downloads.some((d) => d.path.includes('3dmigoto'))
|
return this.downloads.some((d) => d.path.includes('3dmigoto'))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user