isSmallAtCapacity.value && isMediumAtCapacity.value && isLargeAtCapacity.value,
)
diff --git a/apps/frontend/src/pages/user/[id].vue b/apps/frontend/src/pages/user/[id].vue
index afa64d1556..9dcad1c489 100644
--- a/apps/frontend/src/pages/user/[id].vue
+++ b/apps/frontend/src/pages/user/[id].vue
@@ -60,7 +60,18 @@
- {{ user.username }}
+
+ {{ user.username }}
+
+ Affiliate
+
+
{{
@@ -132,6 +143,13 @@
action: () => navigateTo(`/admin/billing/${user.id}`),
shown: auth.user && isStaff(auth.user),
},
+ {
+ id: 'toggle-affiliate',
+ action: () => toggleAffiliate(user.id),
+ shown: isAdminViewing,
+ remainOnClick: true,
+ color: isAffiliate ? 'red' : 'orange',
+ },
{
id: 'open-info',
action: () => $refs.userDetailsModal.show(),
@@ -139,6 +157,7 @@
},
]"
aria-label="More options"
+ :dropdown-id="`${baseId}-more-options`"
>
@@ -165,6 +184,14 @@
{{ formatMessage(messages.infoButton) }}
+
+
+ {{
+ formatMessage(
+ isAffiliate ? messages.removeAffiliateButton : messages.setAffiliateButton,
+ )
+ }}
+
@@ -341,6 +368,7 @@
+
+
+
+
+
diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.ts
index 9f82bc74ce..e66d87e4ad 100644
--- a/packages/ui/src/components/index.ts
+++ b/packages/ui/src/components/index.ts
@@ -2,6 +2,7 @@
export { default as Accordion } from './base/Accordion.vue'
export { default as Admonition } from './base/Admonition.vue'
export { default as AppearingProgressBar } from './base/AppearingProgressBar.vue'
+export { default as AutoBrandIcon } from './base/AutoBrandIcon.vue'
export { default as AutoLink } from './base/AutoLink.vue'
export { default as Avatar } from './base/Avatar.vue'
export { default as Badge } from './base/Badge.vue'
diff --git a/packages/ui/src/utils/common-messages.ts b/packages/ui/src/utils/common-messages.ts
index 4cd41373c4..644db910a1 100644
--- a/packages/ui/src/utils/common-messages.ts
+++ b/packages/ui/src/utils/common-messages.ts
@@ -1,6 +1,10 @@
import { defineMessages } from '@vintl/vintl'
export const commonMessages = defineMessages({
+ affiliateLinksButton: {
+ id: 'button.affiliate-links',
+ defaultMessage: 'Affiliate links',
+ },
analyticsButton: {
id: 'button.analytics',
defaultMessage: 'Analytics',
diff --git a/packages/utils/types.ts b/packages/utils/types.ts
index d57ba3dd56..29c184c72d 100644
--- a/packages/utils/types.ts
+++ b/packages/utils/types.ts
@@ -334,6 +334,7 @@ export enum UserBadge {
ALPHA_TESTER = 1 << 4,
CONTRIBUTOR = 1 << 5,
TRANSLATOR = 1 << 6,
+ AFFILIATE = 1 << 7,
}
export type UserBadges = number