Fixed issue with multiaccount selection

This commit is contained in:
RemixDev 2020-05-30 21:16:07 +02:00
parent c3749052d6
commit 6bc4997ff3
4 changed files with 6 additions and 9 deletions

View File

@ -576,8 +576,8 @@ <h2 v-else-if="type == 'album'">by <span class="clickable" @click="artistView"
<h2 class="page_heading">Settings</h2>
<div id="logged_in_info" ref="loggedInInfo">
<img id="settings_picture" src="" alt="Profile Picture" class="circle" />
<p>You are logged in as <strong id="settings_username"></strong></p>
<img id="settings_picture" src="" alt="Profile Picture" ref="userpicture" class="circle" />
<p>You are logged in as <strong id="settings_username" ref="username"></strong></p>
<button id="settings_btn_logout" @click="logout">Logout</button>
<select v-if="accounts.length" id="family_account" v-model="accountNum" @change="changeAccount">
<option v-for="(account, i) in accounts" :value="i.toString()">{{ account.BLOG_NAME }}</option>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -76,11 +76,8 @@ const SettingsTab = new Vue({
socket.emit('changeAccount', this.accountNum)
},
accountChanged(user, accountNum){
$('#settings_username').text(user.name)
$('#settings_picture').attr(
'src',
`https://e-cdns-images.dzcdn.net/images/user/${user.picture}/125x125-000000-80-0-0.jpg`
)
this.$refs.username.innerText = user.name
this.$refs.userpicture.src = `https://e-cdns-images.dzcdn.net/images/user/${user.picture}/125x125-000000-80-0-0.jpg`
this.accountNum = accountNum
localStorage.setItem('accountNum', this.accountNum)
},