being setting data on login

This commit is contained in:
SpikeHD 2022-04-30 00:20:26 -07:00
parent 07c331051b
commit 116109a2a7
2 changed files with 6 additions and 3 deletions

View File

@ -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}"`)
}
/**

View File

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