mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
fix: template query param stripped during login views (#6677)
Fixes issue where query params from https://github.com/Comfy-Org/ComfyUI_frontend/pull/6593 are stripped during the login/signup views/flow by storing initial params in session storage via router plugin. https://github.com/user-attachments/assets/51642e8c-af5c-43ef-ab7d-133bc7e511aa ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6677-fix-template-query-param-stripped-during-login-views-2aa6d73d365081a1bdc7d22b35f72a77) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -14,6 +14,8 @@ import { useUserStore } from '@/stores/userStore'
|
||||
import { isElectron } from '@/utils/envUtil'
|
||||
import LayoutDefault from '@/views/layouts/LayoutDefault.vue'
|
||||
|
||||
import { installPreservedQueryTracker } from '@/platform/navigation/preservedQueryTracker'
|
||||
import { PRESERVED_QUERY_NAMESPACES } from '@/platform/navigation/preservedQueryNamespaces'
|
||||
import { cloudOnboardingRoutes } from './platform/cloud/onboarding/onboardingCloudRoutes'
|
||||
|
||||
const isFileProtocol = window.location.protocol === 'file:'
|
||||
@@ -75,6 +77,13 @@ const router = createRouter({
|
||||
}
|
||||
})
|
||||
|
||||
installPreservedQueryTracker(router, [
|
||||
{
|
||||
namespace: PRESERVED_QUERY_NAMESPACES.TEMPLATE,
|
||||
keys: ['template', 'source']
|
||||
}
|
||||
])
|
||||
|
||||
if (isCloud) {
|
||||
const PUBLIC_ROUTE_NAMES = new Set([
|
||||
'cloud-login',
|
||||
|
||||
Reference in New Issue
Block a user