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:
Christian Byrne
2025-11-13 20:37:37 -08:00
committed by GitHub
parent ecd87ae0f4
commit 8b8f3538bf
8 changed files with 262 additions and 3 deletions

View File

@@ -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',