mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-26 01:41:02 +00:00
fix launching private
This commit is contained in:
parent
b70fdd7ff6
commit
69c43200e7
@ -2,6 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="style/index.css" />
|
<link rel="stylesheet" type="text/css" href="style/index.css" />
|
||||||
|
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||||
<script src="js/neutralino.js"></script>
|
<script src="js/neutralino.js"></script>
|
||||||
<script src="js/windowDrag.js"></script>
|
<script src="js/windowDrag.js"></script>
|
||||||
<script src="js/hoverEvt.js"></script>
|
<script src="js/hoverEvt.js"></script>
|
||||||
|
@ -296,12 +296,18 @@ async function openLogin() {
|
|||||||
const url = `${useHttps ? 'https' : 'http'}://${ip}:${port}`;
|
const url = `${useHttps ? 'https' : 'http'}://${ip}:${port}`;
|
||||||
|
|
||||||
// Check if we even need to authenticate
|
// Check if we even need to authenticate
|
||||||
|
try {
|
||||||
const { data } = await axios.get(url + '/grasscutter/auth_status')
|
const { data } = await axios.get(url + '/grasscutter/auth_status')
|
||||||
|
|
||||||
if (data?.message !== 'AUTH_ENABLED') {
|
if (data?.message !== 'AUTH_ENABLED') {
|
||||||
launchPrivate()
|
launchPrivate()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} catch(e) {
|
||||||
|
launchPrivate()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
loginIpDisplay.innerText = ip
|
loginIpDisplay.innerText = ip
|
||||||
registerIpDisplay.innerText = ip
|
registerIpDisplay.innerText = ip
|
||||||
|
Loading…
Reference in New Issue
Block a user