mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
grab name
This commit is contained in:
parent
116109a2a7
commit
099794fb39
@ -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}"`)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user