fix: logout removing client mode; fix: nickname not showing after app login

This commit is contained in:
Roberto Tonino 2020-09-23 18:36:10 +02:00
parent 0be64f1477
commit db1a0a5ec3
4 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -680,7 +680,6 @@ export default {
previewVolume: window.vol,
accountNum: 0,
accounts: []
// clientMode: window.clientMode
}
},
computed: {
@ -823,6 +822,11 @@ export default {
this.lastCredentials = JSON.parse(JSON.stringify(credentials))
this.spotifyFeatures = JSON.parse(JSON.stringify(credentials))
},
loggedInViaDeezer(arl) {
this.dispatchARL({ arl })
socket.emit('login', arl, true, this.accountNum)
// this.login()
},
login() {
let newArl = this.$refs.loginInput.value.trim()
@ -833,10 +837,6 @@ export default {
appLogin(e) {
socket.emit('applogin')
},
loggedInViaDeezer(arl) {
this.dispatchARL({ arl })
this.login()
},
changeAccount() {
socket.emit('changeAccount', this.accountNum)
},

View File

@ -72,7 +72,9 @@ const mutations = {
},
RESET_LOGIN(state) {
// Needed for reactivity
let clientMode = state.clientMode
Object.assign(state, getDefaultState())
state.clientMode = clientMode
}
}

View File

@ -14,7 +14,6 @@ export async function adjustVolume(element, newVolume, { duration = 1000, easing
return new Promise(resolve => {
const timer = setInterval(() => {
element.volume = originalVolume + easing(tick / ticks) * delta
// console.log(element.volume)
if (++tick === ticks) {
clearInterval(timer)
resolve()