From d3e9e15f07be99b794a114514fbbb26e4dd3955d Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 9 Dec 2025 01:41:32 -0800 Subject: [PATCH] change credits icons and tooltips (conditional on feature flag) (#7276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR changes the credits icons and tooltips based on state of the `subscription_tiers_enabled` feature flag. When the flag is enabled (or undefined -- for local), the dollar icon is replaced with the lucide-component icon in UserCredit and node price badges (Partner Nodes), and a new tooltip row appears in CurrentUserPopover displaying "Credits have been unified" with a detailed hover tooltip explaining the credit unification across Partner Nodes and Cloud workflows. image Related: - https://github.com/Comfy-Org/ComfyUI_frontend/pull/6115 (borrows badge implementation from this PR) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7276-change-credits-icons-and-tooltips-conditional-on-feature-flag-2c46d73d365081809a6afd5861018a15) by [Unito](https://www.unito.io) --- src/components/common/UserCredit.vue | 19 +++-- src/components/topbar/CurrentUserPopover.vue | 18 +++++ src/composables/node/usePriceBadge.ts | 70 +++++++++++++------ src/composables/useFeatureFlags.ts | 13 +++- src/lib/litegraph/src/LGraphBadge.ts | 11 ++- src/lib/litegraph/src/LGraphIcon.ts | 68 ++++++++++++------ src/locales/en/main.json | 6 +- src/platform/remoteConfig/types.ts | 1 + .../vueNodes/components/NodeHeader.vue | 14 +++- 9 files changed, 165 insertions(+), 55 deletions(-) diff --git a/src/components/common/UserCredit.vue b/src/components/common/UserCredit.vue index aac405b90..15a7eb404 100644 --- a/src/components/common/UserCredit.vue +++ b/src/components/common/UserCredit.vue @@ -7,12 +7,17 @@
- + + +
{{ formattedBalance }}
@@ -22,6 +27,7 @@ import Skeleton from 'primevue/skeleton' import Tag from 'primevue/tag' import { computed } from 'vue' +import { useFeatureFlags } from '@/composables/useFeatureFlags' import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore' import { formatMetronomeCurrency } from '@/utils/formatUtil' @@ -30,6 +36,7 @@ const { textClass } = defineProps<{ }>() const authStore = useFirebaseAuthStore() +const { flags } = useFeatureFlags() const balanceLoading = computed(() => authStore.isFetchingBalance) const formattedBalance = computed(() => { diff --git a/src/components/topbar/CurrentUserPopover.vue b/src/components/topbar/CurrentUserPopover.vue index 93d7e9223..1c964960f 100644 --- a/src/components/topbar/CurrentUserPopover.vue +++ b/src/components/topbar/CurrentUserPopover.vue @@ -26,6 +26,22 @@
+
+ + {{ + $t('credits.unified.message') + }} +
-
+
+
() +const { flags } = useFeatureFlags() + // Error boundary implementation const renderError = ref(null) const { toastErrorHandler } = useErrorHandling()