diff --git a/languages/zh-tw.json b/languages/zh-tw.json index d551fb9..0d23c08 100644 --- a/languages/zh-tw.json +++ b/languages/zh-tw.json @@ -38,7 +38,7 @@ "proxyInstallDeny": "不用了,謝謝。", "gameFolderDialog": "選擇Genshin Impact game資料夾", - "grasscutterFileDialog": "選擇Grasscutter.jar檔案" + "grasscutterFileDialog": "選擇Grasscutter.jar檔案", "loggingInTo": "登錄至:", "registeringFor": "註冊至:", @@ -60,7 +60,7 @@ "alertUserTaken": "用戶名已被占用", "alertPassMismatch": "兩組密碼不一致", "alertAuthNoRegister": "未啟用認證,無需註冊!", - "alertRegisterSuccess": "註冊成功!" + "alertRegisterSuccess": "註冊成功!", "updateNotifText": "有新的GrassClipper更新可用! 最新版本: " } diff --git a/manifest.json b/manifest.json index 3df9a34..2fc35a4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { "applicationId": "js.grassclipper.app", - "version": "0.8.5", + "version": "0.8.7", "resourcesURL": "https://github.com/Grasscutters/GrassClipper/releases/latest/download/resources.neu" } \ No newline at end of file diff --git a/neutralino.config.json b/neutralino.config.json index 7abf636..be4549a 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -1,6 +1,6 @@ { "applicationId": "js.grassclipper.app", - "version": "0.8.5", + "version": "0.8.7", "defaultMode": "window", "port": 0, "documentRoot": "/resources/", diff --git a/package.json b/package.json index 196bce7..e5efc86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grassclipper", - "version": "0.8.5", + "version": "0.8.7", "repository": "https://github.com/Grasscutters/GrassClipper.git", "author": "SpikeHD ", "license": "Apache-2.0", diff --git a/resources/js/index.js b/resources/js/index.js index a322e5a..a9a0bee 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -322,9 +322,9 @@ async function openLogin() { // Check if we even need to authenticate try { - const { data } = await axios.get(url + '/grasscutter/auth_status') + const { data } = await axios.get(url + '/authentication/type') - if (data?.message !== 'AUTH_ENABLED') { + if (!data.includes('GCAuthAuthenticationHandler')) { launchPrivate() return } @@ -333,7 +333,6 @@ async function openLogin() { return } - loginIpDisplay.innerText = ip registerIpDisplay.innerText = ip diff --git a/resources/js/login.js b/resources/js/login.js index 5fd7f8e..60188d7 100644 --- a/resources/js/login.js +++ b/resources/js/login.js @@ -62,7 +62,7 @@ async function login() { password, } - const { data } = await axios.post(url + '/grasscutter/login', reqBody) + const { data } = await axios.post(url + '/authentication/login', reqBody) switch(data.message) { case 'INVALID_ACCOUNT': @@ -117,7 +117,7 @@ async function register() { password_confirmation } - const { data } = await axios.post(url + '/grasscutter/register', reqBody) + const { data } = await axios.post(url + '/authentication/register', reqBody) switch(data.message) { case 'USERNAME_TAKEN': diff --git a/scripts/install.cmd b/scripts/install.cmd index 6e1f7a3..63fbd41 100644 --- a/scripts/install.cmd +++ b/scripts/install.cmd @@ -37,12 +37,12 @@ taskkill /f /im mitmdump.exe echo Adding ceritifcate... :: Ensure we are elevated for certs ->nul 2>&1 certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer || ( +>nul 2>&1 certutil -addstore root "%USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer" || ( echo ============================================================================================================ echo !! Certificate install failed !! echo. echo Please manually run this command as Administrator: - echo certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer + echo certutil -addstore root "%USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer" echo ============================================================================================================ ) diff --git a/scripts/javaver.cmd b/scripts/javaver.cmd new file mode 100644 index 0000000..dad849f --- /dev/null +++ b/scripts/javaver.cmd @@ -0,0 +1,38 @@ +@echo off + +set BRANCH=%1 + +echo Checking java version... + +:: https://stackoverflow.com/questions/5675459/how-to-get-java-version-from-batch-script +for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do ( + @echo Output: %%g + set JAVAVER=%%g +) +set JAVAVER=%JAVAVER:"=% + +for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do ( + set MAJOR=%%v + set MINOR=%%w + set BUILD=%%x +) + +if %BRANCH% EQU stable ( + :: Ensure java 8 + if %MAJOR% EQU 1 ( + if %MINOR% LSS 8 ( + echo Java version is less than 8, please download Java 8 + exit /b + ) + ) +) + +if %BRANCH% EQU development ( + :: Ensure java 17 + if %MAJOR% LSS 17 ( + echo Java version is less than 17, please download Java 17 + exit /b + ) +) + +echo Java version is compatible \ No newline at end of file