mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
being setting data on login
This commit is contained in:
parent
07c331051b
commit
116109a2a7
@ -120,13 +120,13 @@ async function clearRegistryLoginDetails() {
|
||||
|
||||
async function setRegistryLoginDetails(tokenOrAccount, loginUid) {
|
||||
const accList = await getRegistryLoginDetails()
|
||||
const cur = accList.find(a => a.is_login)
|
||||
const cur = accList.find(a => a.is_login) || accList[0]
|
||||
|
||||
// Required fields: uid, token, account, deviceId
|
||||
|
||||
const { token, deviceId } = cur
|
||||
|
||||
createCmdWindow(`.\\tools\\mtools.exe set -a ${tokenOrAccount} -u ${loginUid} -t ${token} -d ${deviceId}`)
|
||||
createCmdWindow(`.\\tools\\mtools.exe set -a "${tokenOrAccount}" -u "${loginUid}" -t "${token}" -d "${deviceId}"`)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,7 +93,10 @@ async function login() {
|
||||
await Neutralino.clipboard.writeText(tkData.token)
|
||||
|
||||
displayLoginAlert(localeObj.alertLoginSuccess || 'Login successful! Token copied to clipboard. Paste this token into the username field of the game to log in.', 'success', 8000);
|
||||
launchPrivate()
|
||||
|
||||
await setRegistryLoginDetails(tkData.token, tkData.uid)
|
||||
await launchPrivate()
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user