mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-17 00:06:34 +00:00
chore(frontend): upgrade ESLint config to v10 and migrate formatting (#522)
* chore(deps-dev): bump @antfu/eslint-config in /frontend Bumps [@antfu/eslint-config](https://github.com/antfu/eslint-config) from 9.5.1 to 10.0.0. - [Release notes](https://github.com/antfu/eslint-config/releases) - [Commits](https://github.com/antfu/eslint-config/compare/v9.5.1...v10.0.0) --- updated-dependencies: - dependency-name: "@antfu/eslint-config" dependency-version: 10.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(frontend): migrate formatting to ESLint v10 Co-authored-by: Codex <noreply@openai.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
Zyy
parent
dffc417b9f
commit
f0484c4e11
@@ -11,8 +11,12 @@ export const authPlugin: Plugin = {
|
||||
|
||||
async function redirectToLogin(loginMode = authStore.session?.role ?? 'admin') {
|
||||
authStore.invalidateSession()
|
||||
if (router.currentRoute.value.name !== 'login')
|
||||
await router.replace({ name: 'login', state: { loginMode } })
|
||||
if (router.currentRoute.value.name !== 'login') {
|
||||
await router.replace({
|
||||
name: 'login',
|
||||
state: { loginMode },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
setUnauthorizedHandler(() => redirectToLogin())
|
||||
|
||||
Reference in New Issue
Block a user