Merge branch 'gc_downloader' of https://github.com/Grasscutters/GrassClipper into gc_downloader

This commit is contained in:
SpikeHD 2022-05-02 22:25:30 -07:00
commit 474752df17
8 changed files with 49 additions and 12 deletions

View File

@ -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更新可用 最新版本: "
}

View File

@ -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"
}

View File

@ -1,6 +1,6 @@
{
"applicationId": "js.grassclipper.app",
"version": "0.8.5",
"version": "0.8.7",
"defaultMode": "window",
"port": 0,
"documentRoot": "/resources/",

View File

@ -1,6 +1,6 @@
{
"name": "grassclipper",
"version": "0.8.5",
"version": "0.8.7",
"repository": "https://github.com/Grasscutters/GrassClipper.git",
"author": "SpikeHD <spikegdofficial@gmail.com>",
"license": "Apache-2.0",

View File

@ -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

View File

@ -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':

View File

@ -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 ============================================================================================================
)

38
scripts/javaver.cmd Normal file
View File

@ -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