login/logout/register woes
This commit is contained in:
parent
a392f8e4a9
commit
556a37e836
11 changed files with 29 additions and 21 deletions
|
|
@ -63,8 +63,8 @@ export const useAuthFlowStore = defineStore('authFlow', {
|
|||
this.settings = {}
|
||||
},
|
||||
async login({ access_token: accessToken }) {
|
||||
useOAuthStore().setToken(accessToken)
|
||||
useUsersStore().loginUser(accessToken, { root: true })
|
||||
await useOAuthStore().setToken(accessToken)
|
||||
await useUsersStore().loginUser(accessToken, { root: true })
|
||||
this.resetState()
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export const useOAuthStore = defineStore('oauth', {
|
|||
this.userToken = token
|
||||
},
|
||||
clearToken() {
|
||||
this.userToken = false
|
||||
this.userToken = null
|
||||
},
|
||||
async createApp() {
|
||||
const instance = useInstanceStore().server
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@ export const useStreamingStore = defineStore('streaming', {
|
|||
case 'delete':
|
||||
return [data.id]
|
||||
default:
|
||||
console.log('UNKNOWN', eventName, eventStream, data)
|
||||
return data
|
||||
}
|
||||
})()
|
||||
|
|
|
|||
|
|
@ -258,14 +258,24 @@ export const useTimelinesStore = defineStore('timelines', {
|
|||
timeline.fetcher.startFetching()
|
||||
},
|
||||
stopFetchingTimeline(timelineName, reason) {
|
||||
console.debug(
|
||||
'[Timelines] Stopped fetching timeline',
|
||||
timelineName,
|
||||
'Reason:',
|
||||
reason,
|
||||
)
|
||||
const timeline = this[timelineName]
|
||||
timeline.fetcher.stopFetching()
|
||||
if (timeline.fetcher === null) {
|
||||
console.debug(
|
||||
'[Timelines] Already inactive timeline',
|
||||
timelineName,
|
||||
'Reason:',
|
||||
reason,
|
||||
)
|
||||
return
|
||||
} else {
|
||||
timeline.fetcher.stopFetching()
|
||||
console.debug(
|
||||
'[Timelines] Stopped fetching timeline',
|
||||
timelineName,
|
||||
'Reason:',
|
||||
reason,
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
// Queues & Timeline manip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue