mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-01-07 03:26:56 +08:00
Checks for localhost
Linting
This commit is contained in:
parent
4c5b79513a
commit
96bf4ef3fe
@ -214,7 +214,7 @@ pub fn run_jar(path: String, execute_in: String, java_path: String) {
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
#[tauri::command]
|
||||
pub fn run_jar_root(path: String, execute_in: String, java_path: String) {
|
||||
pub fn run_jar_root(_path: String, _execute_in: String, _java_path: String) {
|
||||
panic!("Not implemented");
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ import { GrasscutterElevation } from './menu/Options'
|
||||
import { getGameExecutable, getGameVersion, getGrasscutterJar } from '../../utils/game'
|
||||
import { patchGame, unpatchGame } from '../../utils/rsa'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
import { confirm } from '@tauri-apps/api/dialog'
|
||||
|
||||
interface IProps {
|
||||
openExtras: (playGame: () => void) => void
|
||||
@ -118,6 +119,24 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
return
|
||||
}
|
||||
|
||||
// Check for HTTPS on local
|
||||
if (this.state.httpsEnabled) {
|
||||
if (this.state.ip == 'localhost') {
|
||||
if (
|
||||
await confirm(
|
||||
"Oops! HTTPS is enabled but you're connecting to localhost! \nHTTPS MUST be disabled for localhost. \n\nWould you like to disable HTTPS and continue?",
|
||||
{ title: 'WARNING!!', type: 'warning' }
|
||||
)
|
||||
) {
|
||||
this.toggleHttps()
|
||||
} else {
|
||||
if (!(await confirm('You have chosen to keep HTTPS enabled! \n\nYOU WILL ERROR ON LOGIN.'))) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Connect to proxy
|
||||
if (config.toggle_grasscutter) {
|
||||
const game_exe = await getGameExecutable()
|
||||
|
Loading…
Reference in New Issue
Block a user