mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-17 09:34:34 +01:00
Checks for localhost
Linting
This commit is contained in:
@@ -214,7 +214,7 @@ pub fn run_jar(path: String, execute_in: String, java_path: String) {
|
|||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(target_os = "linux"))]
|
||||||
#[tauri::command]
|
#[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");
|
panic!("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { GrasscutterElevation } from './menu/Options'
|
|||||||
import { getGameExecutable, getGameVersion, getGrasscutterJar } from '../../utils/game'
|
import { getGameExecutable, getGameVersion, getGrasscutterJar } from '../../utils/game'
|
||||||
import { patchGame, unpatchGame } from '../../utils/rsa'
|
import { patchGame, unpatchGame } from '../../utils/rsa'
|
||||||
import { listen } from '@tauri-apps/api/event'
|
import { listen } from '@tauri-apps/api/event'
|
||||||
|
import { confirm } from '@tauri-apps/api/dialog'
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
openExtras: (playGame: () => void) => void
|
openExtras: (playGame: () => void) => void
|
||||||
@@ -118,6 +119,24 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
|||||||
return
|
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
|
// Connect to proxy
|
||||||
if (config.toggle_grasscutter) {
|
if (config.toggle_grasscutter) {
|
||||||
const game_exe = await getGameExecutable()
|
const game_exe = await getGameExecutable()
|
||||||
|
|||||||
Reference in New Issue
Block a user