1
0

Affiliates frontend (#4380)

* Begin affiliates frontend

* Significant work on hooking up affiliates ui

* Clean up server nodes menu

* affiliates work

* update affiliate time

* oops

* fix local import

* fix local import x2

* remove line in dashboard

* lint
This commit is contained in:
Prospector
2025-11-02 11:32:18 -08:00
committed by GitHub
parent b7f0988399
commit 40cbe92dbc
33 changed files with 1202 additions and 37 deletions

View File

@@ -26,6 +26,7 @@
:regions="regions"
:refresh-payment-methods="fetchPaymentData"
:fetch-stock="fetchStock"
:affiliate-code="affiliateCode"
/>
<section
@@ -664,6 +665,25 @@ import ServerPlanSelector from '~/components/ui/servers/marketing/ServerPlanSele
import { useServersFetch } from '~/composables/servers/servers-fetch.ts'
import { products } from '~/generated/state.json'
const route = useRoute()
const router = useRouter()
const { setAffiliateCode, getAffiliateCode } = useAffiliates()
const affiliateCode = ref(route.query.afl ?? null)
if (affiliateCode.value) {
router.replace({
query: {
...route.query,
afl: undefined,
},
})
setAffiliateCode(affiliateCode.value)
} else {
affiliateCode.value = getAffiliateCode()
}
const { addNotification } = injectNotificationManager()
const { locale, formatMessage } = useVIntl()
const flags = useFeatureFlags()
@@ -853,7 +873,6 @@ async function fetchPaymentData() {
const selectedProjectId = ref()
const route = useRoute()
const isAtCapacity = computed(
() => isSmallAtCapacity.value && isMediumAtCapacity.value && isLargeAtCapacity.value,
)