forked from cybrespace/pinafore
fix: use correct this.store format in all components (#827)
This commit is contained in:
parent
bf9ba22c35
commit
4ca5b4611f
|
@ -126,7 +126,7 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
media[index].description = rawText
|
media[index].description = rawText
|
||||||
store.setComposeData(realm, { media })
|
this.store.setComposeData(realm, { media })
|
||||||
saveStore()
|
saveStore()
|
||||||
}, { init: false })
|
}, { init: false })
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
import { goto } from '../../../__sapper__/client'
|
import { goto } from '../../../__sapper__/client'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
store: () => store,
|
||||||
oncreate () {
|
oncreate () {
|
||||||
let accessToken = location.search.match(/accessToken=([^&]+)/)[1]
|
let accessToken = location.search.match(/accessToken=([^&]+)/)[1]
|
||||||
let instanceName = location.search.match(/instanceName=([^&]+)/)[1]
|
let instanceName = location.search.match(/instanceName=([^&]+)/)[1]
|
||||||
let {
|
let {
|
||||||
loggedInInstances,
|
loggedInInstances,
|
||||||
loggedInInstancesInOrder
|
loggedInInstancesInOrder
|
||||||
} = store.get()
|
} = this.store.get()
|
||||||
|
|
||||||
loggedInInstances[instanceName] = {
|
loggedInInstances[instanceName] = {
|
||||||
access_token: accessToken
|
access_token: accessToken
|
||||||
|
@ -20,12 +21,12 @@
|
||||||
loggedInInstancesInOrder.push(instanceName)
|
loggedInInstancesInOrder.push(instanceName)
|
||||||
}
|
}
|
||||||
|
|
||||||
store.set({
|
this.store.set({
|
||||||
currentInstance: instanceName,
|
currentInstance: instanceName,
|
||||||
loggedInInstances,
|
loggedInInstances,
|
||||||
loggedInInstancesInOrder
|
loggedInInstancesInOrder
|
||||||
})
|
})
|
||||||
store.save()
|
this.store.save()
|
||||||
goto('/')
|
goto('/')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue