mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 01:50:08 +00:00
[backport cloud/1.38] fix: show credit balance for unsubscribed personal workspaces (#8738)
Backport of #8719 to `cloud/1.38` Automatically created by backport workflow. Co-authored-by: Hunter <huntcsg@users.noreply.github.com>
This commit is contained in:
@@ -254,9 +254,6 @@ const isLoadingBalance = isLoading
|
||||
|
||||
const displayedCredits = computed(() => {
|
||||
if (initState.value !== 'ready') return ''
|
||||
// Wait for subscription to load
|
||||
if (subscription.value === null) return ''
|
||||
if (!isActiveSubscription.value) return '0'
|
||||
|
||||
// API field is named _micros but contains cents (naming inconsistency)
|
||||
const cents =
|
||||
@@ -343,9 +340,7 @@ const toggleWorkspaceSwitcher = (event: MouseEvent) => {
|
||||
}
|
||||
|
||||
const refreshBalance = () => {
|
||||
if (isActiveSubscription.value) {
|
||||
void fetchBalance()
|
||||
}
|
||||
void fetchBalance()
|
||||
}
|
||||
|
||||
defineExpose({ refreshBalance })
|
||||
|
||||
Reference in New Issue
Block a user