mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Updates for the linter/formatter deps, turning on some more rules. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7309-WIP-Linter-updates-2c56d73d36508101b3ece6bcaf7e5212) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
72 lines
2.1 KiB
TypeScript
72 lines
2.1 KiB
TypeScript
import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
export const cloudOnboardingRoutes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/cloud',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/components/CloudLayoutView.vue'),
|
|
children: [
|
|
{
|
|
path: 'login',
|
|
name: 'cloud-login',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudLoginView.vue'),
|
|
beforeEnter: async (to, _from, next) => {
|
|
// Only redirect if not explicitly switching accounts
|
|
if (!to.query.switchAccount) {
|
|
const { useCurrentUser } =
|
|
await import('@/composables/auth/useCurrentUser')
|
|
const { isLoggedIn } = useCurrentUser()
|
|
|
|
if (isLoggedIn.value) {
|
|
// User is already logged in, redirect to user-check
|
|
// user-check will handle survey, or main page routing
|
|
return next({ name: 'cloud-user-check' })
|
|
}
|
|
}
|
|
next()
|
|
}
|
|
},
|
|
{
|
|
path: 'signup',
|
|
name: 'cloud-signup',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudSignupView.vue')
|
|
},
|
|
{
|
|
path: 'forgot-password',
|
|
name: 'cloud-forgot-password',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudForgotPasswordView.vue')
|
|
},
|
|
{
|
|
path: 'survey',
|
|
name: 'cloud-survey',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudSurveyView.vue'),
|
|
meta: { requiresAuth: true }
|
|
},
|
|
{
|
|
path: 'user-check',
|
|
name: 'cloud-user-check',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/UserCheckView.vue'),
|
|
meta: { requiresAuth: true }
|
|
},
|
|
{
|
|
path: 'sorry-contact-support',
|
|
name: 'cloud-sorry-contact-support',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudSorryContactSupportView.vue')
|
|
},
|
|
{
|
|
path: 'auth-timeout',
|
|
name: 'cloud-auth-timeout',
|
|
component: () =>
|
|
import('@/platform/cloud/onboarding/CloudAuthTimeoutView.vue'),
|
|
props: true
|
|
}
|
|
]
|
|
}
|
|
]
|