diff --git a/resources/index.html b/resources/index.html index f1604e1..37032e8 100644 --- a/resources/index.html +++ b/resources/index.html @@ -2,6 +2,7 @@ + diff --git a/resources/js/index.js b/resources/js/index.js index 743eb58..95a7857 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -296,13 +296,19 @@ async function openLogin() { const url = `${useHttps ? 'https' : 'http'}://${ip}:${port}`; // Check if we even need to authenticate - const { data } = await axios.get(url + '/grasscutter/auth_status') + try { + const { data } = await axios.get(url + '/grasscutter/auth_status') - if (data?.message !== 'AUTH_ENABLED') { + if (data?.message !== 'AUTH_ENABLED') { + launchPrivate() + return + } + } catch(e) { launchPrivate() return } + loginIpDisplay.innerText = ip registerIpDisplay.innerText = ip