fix(web): suppress duplicate toasts when auth session expires
Desktop Client Build / Resolve Build Metadata (push) Successful in 32s
Frontend CI / Frontend (push) Successful in 4m4s
Desktop Client Build / Publish Client Artifacts to NAS (push) Has been cancelled
Desktop Client Build / Build Desktop Client (push) Has been cancelled
Desktop Client Build / Resolve Build Metadata (push) Successful in 32s
Frontend CI / Frontend (push) Successful in 4m4s
Desktop Client Build / Publish Client Artifacts to NAS (push) Has been cancelled
Desktop Client Build / Build Desktop Client (push) Has been cancelled
Mark 401/refresh-failure errors as handled so per-view catch blocks fall through silently while a single global "登录已过期" warning is shown. Centralize ops-web error rendering via showOpsError. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import { http } from '@/lib/http'
|
||||
import { http, resetUnauthorizedHandling } from '@/lib/http'
|
||||
import {
|
||||
type OperatorView,
|
||||
clearStoredSession,
|
||||
@@ -47,6 +47,7 @@ export const useAuthStore = defineStore('ops-auth', () => {
|
||||
password: payload.password,
|
||||
})
|
||||
.then((result) => {
|
||||
resetUnauthorizedHandling()
|
||||
accessToken.value = result.access_token
|
||||
expiresAt.value = result.expires_at
|
||||
operator.value = result.operator
|
||||
|
||||
Reference in New Issue
Block a user