mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
fix: correct FOUNDERS_EDITION handling and polling behavior
- Map FOUNDERS_EDITION to 'standard' tier for current plan display - Change polling to only start on window focus (when user returns from checkout) - Clean up event listeners properly in onBeforeUnmount - Improves UX by not polling immediately when dialog opens
This commit is contained in:
@@ -145,7 +145,7 @@ const TIER_TO_KEY: Record<SubscriptionTier, TierKey> = {
|
||||
STANDARD: 'standard',
|
||||
CREATOR: 'creator',
|
||||
PRO: 'pro',
|
||||
FOUNDERS_EDITION: 'creator'
|
||||
FOUNDERS_EDITION: 'standard'
|
||||
}
|
||||
|
||||
const tiers: PricingTierConfig[] = [
|
||||
|
||||
@@ -214,12 +214,19 @@ const startPolling = () => {
|
||||
}, POLL_INTERVAL_MS)
|
||||
}
|
||||
|
||||
const handleWindowFocus = () => {
|
||||
if (showCustomPricingTable.value) {
|
||||
startPolling()
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
showCustomPricingTable,
|
||||
(enabled) => {
|
||||
if (enabled) {
|
||||
startPolling()
|
||||
window.addEventListener('focus', handleWindowFocus)
|
||||
} else {
|
||||
window.removeEventListener('focus', handleWindowFocus)
|
||||
stopPolling()
|
||||
}
|
||||
},
|
||||
@@ -264,6 +271,7 @@ const handleViewEnterprise = () => {
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
stopPolling()
|
||||
window.removeEventListener('focus', handleWindowFocus)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user