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
- }}
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+ {{
+ 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 @@
-