mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
feat: local/legacy settings dialog fix (#7990)
## Summary Fix the issue where local/desktop users would top up and then see the settings homepage dialog instead of the credits tab. ## Changes - **What**: useSubscription.ts, TopUpCreditsDialogContent.vue, SubscriptionRequiredDialogContent.vue - **Breaking**: <!-- Any breaking changes (if none, remove this line) --> - **Dependencies**: <!-- New dependencies (if none, remove this line) --> ## Screenshots (if applicable) Showing this screen after topping up on local/desktop: <img width="789" height="752" alt="image" src="https://github.com/user-attachments/assets/ea92b30b-5c3b-412a-acbe-1b0893621e53" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7990-feat-local-legacy-settings-dialog-fix-2e76d73d365081c7b1e1f96a24745e7b) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -121,7 +121,11 @@ function useSubscriptionInternal() {
|
||||
void showSubscriptionRequiredDialog()
|
||||
}
|
||||
|
||||
const shouldWatchCancellation = (): boolean =>
|
||||
/**
|
||||
* Whether cloud subscription mode is enabled (cloud distribution with subscription_required config).
|
||||
* Use to determine which UI to show (SubscriptionPanel vs LegacyCreditsPanel).
|
||||
*/
|
||||
const isSubscriptionEnabled = (): boolean =>
|
||||
Boolean(isCloud && window.__CONFIG__?.subscription_required)
|
||||
|
||||
const { startCancellationWatcher, stopCancellationWatcher } =
|
||||
@@ -130,7 +134,7 @@ function useSubscriptionInternal() {
|
||||
isActiveSubscription: isSubscribedOrIsNotCloud,
|
||||
subscriptionStatus,
|
||||
telemetry,
|
||||
shouldWatchCancellation
|
||||
shouldWatchCancellation: isSubscriptionEnabled
|
||||
})
|
||||
|
||||
const manageSubscription = async () => {
|
||||
@@ -249,6 +253,9 @@ function useSubscriptionInternal() {
|
||||
subscriptionTierName,
|
||||
subscriptionStatus,
|
||||
|
||||
// Utilities
|
||||
isSubscriptionEnabled,
|
||||
|
||||
// Actions
|
||||
subscribe,
|
||||
fetchStatus,
|
||||
|
||||
Reference in New Issue
Block a user