manual proxy cert install

This commit is contained in:
SpikeHD
2022-07-16 16:59:16 -07:00
parent 4b42d0f8b8
commit bb383c5c0a
2 changed files with 19 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
"game_exec": "Set Game Executable",
"grasscutter_jar": "Set Grasscutter JAR",
"toggle_encryption": "Toggle Encryption",
"install_certificate": "Install Proxy Certificate",
"java_path": "Set Custom Java Path",
"grasscutter_with_game": "Automatically launch Grasscutter with game",
"language": "Select Language",
@@ -43,7 +44,8 @@
"components": {
"select_file": "Select file or folder...",
"select_folder": "Select folder...",
"download": "Download"
"download": "Download",
"install": "Install"
},
"news": {
"latest_commits": "Recent Commits",

View File

@@ -188,6 +188,12 @@ export default class Options extends React.Component<IProps, IState> {
})
}
async installCert() {
await invoke('generate_ca_files', {
path: await dataDir() + 'cultivation'
})
}
render() {
return (
<Menu closeFn={this.props.closeFn} className="Options" heading="Options">
@@ -219,6 +225,16 @@ export default class Options extends React.Component<IProps, IState> {
</BigButton>
</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 && (
<>