mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2026-02-05 17:56:53 +01:00
Merge branch 'main' into patching
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
"recover_metadata": "Emergency Metadata Recovery",
|
"recover_metadata": "Emergency Metadata Recovery",
|
||||||
"grasscutter_jar": "Set Grasscutter JAR",
|
"grasscutter_jar": "Set Grasscutter JAR",
|
||||||
"toggle_encryption": "Toggle Encryption",
|
"toggle_encryption": "Toggle Encryption",
|
||||||
|
"install_certificate": "Install Proxy Certificate",
|
||||||
"java_path": "Set Custom Java Path",
|
"java_path": "Set Custom Java Path",
|
||||||
"grasscutter_with_game": "Automatically launch Grasscutter with game",
|
"grasscutter_with_game": "Automatically launch Grasscutter with game",
|
||||||
"language": "Select Language",
|
"language": "Select Language",
|
||||||
@@ -46,7 +47,8 @@
|
|||||||
"components": {
|
"components": {
|
||||||
"select_file": "Select file or folder...",
|
"select_file": "Select file or folder...",
|
||||||
"select_folder": "Select folder...",
|
"select_folder": "Select folder...",
|
||||||
"download": "Download"
|
"download": "Download",
|
||||||
|
"install": "Install"
|
||||||
},
|
},
|
||||||
"news": {
|
"news": {
|
||||||
"latest_commits": "Recent Commits",
|
"latest_commits": "Recent Commits",
|
||||||
|
|||||||
@@ -199,6 +199,12 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
await meta.restoreMetadata(this.props.downloadManager)
|
await meta.restoreMetadata(this.props.downloadManager)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async installCert() {
|
||||||
|
await invoke('generate_ca_files', {
|
||||||
|
path: await dataDir() + 'cultivation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Menu closeFn={this.props.closeFn} className="Options" heading="Options">
|
<Menu closeFn={this.props.closeFn} className="Options" heading="Options">
|
||||||
@@ -220,18 +226,6 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
</BigButton>
|
</BigButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{
|
|
||||||
this.state.swag && (
|
|
||||||
<div className='OptionSection' id="menuOptionsContainerAkebi">
|
|
||||||
<div className='OptionLabel' id="menuOptionsLabelAkebi">
|
|
||||||
<Tr text="swag.akebi" />
|
|
||||||
</div>
|
|
||||||
<div className='OptionValue' id="menuOptionsDirAkebi">
|
|
||||||
<DirInput onChange={this.setAkebi} value={this.state?.akebi_path} extensions={['exe']} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
<div className='OptionSection' id="menuOptionsContainerGCJar">
|
<div className='OptionSection' id="menuOptionsContainerGCJar">
|
||||||
<div className='OptionLabel' id="menuOptionsLabelGCJar">
|
<div className='OptionLabel' id="menuOptionsLabelGCJar">
|
||||||
<Tr text="options.grasscutter_jar" />
|
<Tr text="options.grasscutter_jar" />
|
||||||
@@ -250,6 +244,31 @@ export default class Options extends React.Component<IProps, IState> {
|
|||||||
</BigButton>
|
</BigButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className='OptionSection' id="menuOptionsContainerInstallCert">
|
||||||
|
<div className='OptionLabel' id="menuOptionsLabelInstallCert">
|
||||||
|
<Tr text="options.install_certificate" />
|
||||||
|
</div>
|
||||||
|
<div className='OptionValue' id="menuOptionsButtonInstallCert">
|
||||||
|
<BigButton disabled={false} onClick={this.installCert} id="installCert">
|
||||||
|
<Tr text="components.install" />
|
||||||
|
</BigButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{
|
||||||
|
this.state.swag && (
|
||||||
|
<>
|
||||||
|
<Divider />
|
||||||
|
<div className='OptionSection' id="menuOptionsContainerAkebi">
|
||||||
|
<div className='OptionLabel' id="menuOptionsLabelAkebi">
|
||||||
|
<Tr text="swag.akebi" />
|
||||||
|
</div>
|
||||||
|
<div className='OptionValue' id="menuOptionsDirAkebi">
|
||||||
|
<DirInput onChange={this.setAkebi} value={this.state?.akebi_path} extensions={['exe']} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { fs, invoke } from '@tauri-apps/api'
|
import { invoke } from '@tauri-apps/api'
|
||||||
|
|
||||||
export async function toggleEncryption(path: string) {
|
export async function toggleEncryption(path: string) {
|
||||||
let serverConf
|
let serverConf
|
||||||
|
|||||||
Reference in New Issue
Block a user