mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 00:24:45 +01:00
Add an option that allows binding port 443
Kinda everts some changes of "Implement MongoDB autostart and GC watching". This commit makes launching MongoDB async
This commit is contained in:
@@ -17,6 +17,12 @@ import * as meta from '../../../utils/rsa'
|
||||
import HelpButton from '../common/HelpButton'
|
||||
import SmallButton from '../common/SmallButton'
|
||||
|
||||
export enum GrasscutterElevation {
|
||||
None = 'None',
|
||||
Capability = 'Capability',
|
||||
Root = 'Root',
|
||||
}
|
||||
|
||||
interface IProps {
|
||||
closeFn: () => void
|
||||
downloadManager: DownloadHandler
|
||||
@@ -44,6 +50,9 @@ interface IState {
|
||||
un_elevated: boolean
|
||||
redirect_more: boolean
|
||||
|
||||
// Linux stuff
|
||||
grasscutter_elevation: string
|
||||
|
||||
// Swag stuff
|
||||
akebi_path: string
|
||||
migoto_path: string
|
||||
@@ -76,6 +85,9 @@ export default class Options extends React.Component<IProps, IState> {
|
||||
un_elevated: false,
|
||||
redirect_more: false,
|
||||
|
||||
// Linux stuff
|
||||
grasscutter_elevation: GrasscutterElevation.None,
|
||||
|
||||
// Swag stuff
|
||||
akebi_path: '',
|
||||
migoto_path: '',
|
||||
@@ -132,6 +144,9 @@ export default class Options extends React.Component<IProps, IState> {
|
||||
un_elevated: config.un_elevated || false,
|
||||
redirect_more: config.redirect_more || false,
|
||||
|
||||
// Linux stuff
|
||||
grasscutter_elevation: config.grasscutter_elevation || GrasscutterElevation.None,
|
||||
|
||||
// Swag stuff
|
||||
akebi_path: config.akebi_path || '',
|
||||
migoto_path: config.migoto_path || '',
|
||||
@@ -297,6 +312,14 @@ export default class Options extends React.Component<IProps, IState> {
|
||||
})
|
||||
}
|
||||
|
||||
async setGCElevation(value: string) {
|
||||
setConfigOption('grasscutter_elevation', value)
|
||||
|
||||
this.setState({
|
||||
grasscutter_elevation: value,
|
||||
})
|
||||
}
|
||||
|
||||
async removeRSA() {
|
||||
await meta.unpatchGame()
|
||||
}
|
||||
@@ -437,6 +460,25 @@ export default class Options extends React.Component<IProps, IState> {
|
||||
{this.state.platform === 'linux' && (
|
||||
<>
|
||||
<Divider />
|
||||
<div className="OptionSection" id="menuOptionsContainerGCElevation">
|
||||
<div className="OptionLabel" id="menuOptionsLabelGCElevation">
|
||||
<Tr text="options.grasscutter_elevation" />
|
||||
<HelpButton contents="help.grasscutter_elevation_help_text" />
|
||||
</div>
|
||||
<select
|
||||
value={this.state.grasscutter_elevation}
|
||||
id="menuOptionsSelectGCElevation"
|
||||
onChange={(event) => {
|
||||
this.setGCElevation(event.target.value)
|
||||
}}
|
||||
>
|
||||
{Object.keys(GrasscutterElevation).map((t) => (
|
||||
<option key={t} value={t}>
|
||||
{t}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<div className="OptionSection" id="menuOptionsContainerCheckAAGL">
|
||||
<div className="OptionLabel" id="menuOptionsLabelCheckAAGL">
|
||||
<Tr text="options.check_aagl" />
|
||||
|
||||
Reference in New Issue
Block a user