avatar and more
This commit is contained in:
@@ -142,7 +142,7 @@ function mojangErrorDisplayable(errorCode) {
|
||||
exports.addMojangAccount = async function(username, password) {
|
||||
try {
|
||||
const response = await MojangRestAPI.authenticate(username, password, ConfigManager.getClientToken())
|
||||
console.log(response)
|
||||
|
||||
if(response.responseStatus === RestResponseStatus.SUCCESS) {
|
||||
|
||||
const session = response.data
|
||||
|
||||
@@ -102,10 +102,10 @@ class ProcessBuilder {
|
||||
})
|
||||
const authArgs = [
|
||||
"-Dminecraft.api.env=custom",
|
||||
"-Dminecraft.api.auth.host=https://auth.oier.ovh",
|
||||
"-Dminecraft.api.account.host=https://auth.oier.ovh/user",
|
||||
"-Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil",
|
||||
"-Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil"
|
||||
"-Dminecraft.api.auth.host=https://auth.oier.ovh/api/yggdrasil/authserver",
|
||||
"-Dminecraft.api.account.host=https://auth.oier.ovh/api/yggdrasil/user",
|
||||
"-Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil/sessionserver",
|
||||
"-Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil/services"
|
||||
]
|
||||
args = authArgs.concat(args)
|
||||
|
||||
|
||||
@@ -145,11 +145,12 @@ document.getElementById('avatarOverlay').onclick = async e => {
|
||||
function updateSelectedAccount(authUser){
|
||||
let username = Lang.queryJS('landing.selectedAccount.noAccountSelected')
|
||||
if(authUser != null){
|
||||
loggerLanding.info('Auth user', authUser)
|
||||
if(authUser.displayName != null){
|
||||
username = authUser.displayName
|
||||
}
|
||||
if(authUser.uuid != null){
|
||||
document.getElementById('avatarContainer').style.backgroundImage = `url('https://mc-heads.net/body/${authUser.uuid}/right')`
|
||||
document.getElementById('avatarContainer').style.backgroundImage = `url('https://auth.oier.ovh/avatar/player/${authUser.displayName}')`
|
||||
}
|
||||
}
|
||||
user_text.innerHTML = username
|
||||
@@ -245,7 +246,6 @@ const refreshServerStatus = async (fade = false) => {
|
||||
try {
|
||||
|
||||
const servStat = await getServerStatus(47, serv.hostname, serv.port)
|
||||
console.log(servStat)
|
||||
pLabel = Lang.queryJS('landing.serverStatus.players')
|
||||
pVal = servStat.players.online + '/' + servStat.players.max
|
||||
|
||||
|
||||
@@ -640,7 +640,7 @@ function populateAuthAccounts(){
|
||||
|
||||
const accHtml = `<div class="settingsAuthAccount" uuid="${acc.uuid}">
|
||||
<div class="settingsAuthAccountLeft">
|
||||
<img class="settingsAuthAccountImage" alt="${acc.displayName}" src="https://mc-heads.net/body/${acc.uuid}/60">
|
||||
<img class="settingsAuthAccountImage" alt="${acc.displayName}" src="https://auth.oier.ovh/avatar/player/${acc.displayName}">
|
||||
</div>
|
||||
<div class="settingsAuthAccountRight">
|
||||
<div class="settingsAuthAccountDetails">
|
||||
|
||||
Reference in New Issue
Block a user