grab name

This commit is contained in:
SpikeHD 2022-04-30 00:52:31 -07:00
parent 116109a2a7
commit 099794fb39
2 changed files with 4 additions and 4 deletions

View File

@ -115,10 +115,10 @@ async function getRegistryLoginDetails() {
}
async function clearRegistryLoginDetails() {
createCmdWindow(`.\\tools\\mtools.exe set -a "" -u "" -t "" -d ""`)
createCmdWindow(`.\\tools\\mtools.exe set -a "" -u "" -t "" -d "" -n ""`)
}
async function setRegistryLoginDetails(tokenOrAccount, loginUid) {
async function setRegistryLoginDetails(tokenOrAccount, loginUid, name) {
const accList = await getRegistryLoginDetails()
const cur = accList.find(a => a.is_login) || accList[0]
@ -126,7 +126,7 @@ async function setRegistryLoginDetails(tokenOrAccount, loginUid) {
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}" -n "${name}"`)
}
/**

View File

@ -94,7 +94,7 @@ async function login() {
displayLoginAlert(localeObj.alertLoginSuccess || 'Login successful! Token copied to clipboard. Paste this token into the username field of the game to log in.', 'success', 8000);
await setRegistryLoginDetails(tkData.token, tkData.uid)
await setRegistryLoginDetails(tkData.token, tkData.uid, username)
await launchPrivate()
break;