From 7afe45fdf8d10a19cc466f2d8b194c8a20160cb4 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Thu, 12 Feb 2026 07:34:42 +0900 Subject: [PATCH] =?UTF-8?q?[backport=20cloud/1.38]=20fix:=20credit=20displ?= =?UTF-8?q?ay=20and=20top=20up=20and=20other=20UI=20display=20if=20persona?= =?UTF-8?q?l=20membe=E2=80=A6=20(#8811)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8784 to `cloud/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8811-backport-cloud-1-38-fix-credit-display-and-top-up-and-other-UI-display-if-personal-mem-3046d73d365081feb075e6c712aced3e) by [Unito](https://www.unito.io) Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com> --- .../workspace/InviteMemberDialogContent.vue | 38 +++--- .../topbar/CurrentUserPopoverWorkspace.vue | 125 +++++++++--------- .../SubscriptionPanelContentWorkspace.vue | 38 +++--- .../workspace/composables/useWorkspaceUI.ts | 10 +- 4 files changed, 107 insertions(+), 104 deletions(-) diff --git a/src/components/dialog/content/workspace/InviteMemberDialogContent.vue b/src/components/dialog/content/workspace/InviteMemberDialogContent.vue index 479a6b6d1d..bdf614e956 100644 --- a/src/components/dialog/content/workspace/InviteMemberDialogContent.vue +++ b/src/components/dialog/content/workspace/InviteMemberDialogContent.vue @@ -70,31 +70,17 @@ @click="onSelectLink" />
- - - - - - - - - - +
@@ -118,6 +104,7 @@ import { computed, ref } from 'vue' import { useI18n } from 'vue-i18n' import Button from '@/components/ui/button/Button.vue' +import { cn } from '@/utils/tailwindUtil' import { useTeamWorkspaceStore } from '@/platform/workspace/stores/teamWorkspaceStore' import { useDialogStore } from '@/stores/dialogStore' @@ -130,6 +117,7 @@ const loading = ref(false) const email = ref('') const step = ref<'email' | 'link'>('email') const generatedLink = ref('') +const justCopied = ref(false) const isValidEmail = computed(() => { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/ @@ -161,6 +149,10 @@ async function onCreateLink() { async function onCopyLink() { try { await navigator.clipboard.writeText(generatedLink.value) + justCopied.value = true + setTimeout(() => { + justCopied.value = false + }, 759) toast.add({ severity: 'success', summary: t('workspacePanel.inviteMemberDialog.linkCopied'), diff --git a/src/components/topbar/CurrentUserPopoverWorkspace.vue b/src/components/topbar/CurrentUserPopoverWorkspace.vue index 64ea81191c..4e10801685 100644 --- a/src/components/topbar/CurrentUserPopoverWorkspace.vue +++ b/src/components/topbar/CurrentUserPopoverWorkspace.vue @@ -55,63 +55,61 @@ /> - - +
+ + + {{ + displayedCredits + }} + + + + + + +
+ +
| null>(null) const emit = defineEmits<{ @@ -275,13 +272,15 @@ const canUpgrade = computed(() => { }) const showPlansAndPricing = computed( - () => isPersonalWorkspace.value || workspaceRole.value === 'owner' + () => permissions.value.canManageSubscription ) const showManagePlan = computed( - () => showPlansAndPricing.value && isActiveSubscription.value + () => permissions.value.canManageSubscription && isActiveSubscription.value ) -const showCreditsSection = computed( - () => isPersonalWorkspace.value || workspaceRole.value === 'owner' +const showSubscribeAction = computed( + () => + permissions.value.canManageSubscription && + (!isActiveSubscription.value || isCancelled.value) ) const handleOpenUserSettings = () => { diff --git a/src/platform/cloud/subscription/components/SubscriptionPanelContentWorkspace.vue b/src/platform/cloud/subscription/components/SubscriptionPanelContentWorkspace.vue index 0ada5c9960..1715b265d3 100644 --- a/src/platform/cloud/subscription/components/SubscriptionPanelContentWorkspace.vue +++ b/src/platform/cloud/subscription/components/SubscriptionPanelContentWorkspace.vue @@ -172,16 +172,11 @@
-