From d1a478dbf229fa92044de6cd236ce6fd9075ece1 Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Mon, 4 Aug 2025 13:19:34 +0100 Subject: [PATCH] feat: medal promotion on servers page --- .../illustrations/medal_promo_background.svg | 490 ++++++++++++++++++ .../servers/marketing/MedalPlanPromotion.vue | 67 +++ apps/frontend/src/composables/featureFlags.ts | 1 + apps/frontend/src/pages/servers/index.vue | 19 +- packages/assets/generated-icons.ts | 2 + packages/assets/icons/clock.svg | 1 + 6 files changed, 574 insertions(+), 6 deletions(-) create mode 100644 apps/frontend/src/assets/images/illustrations/medal_promo_background.svg create mode 100644 apps/frontend/src/components/ui/servers/marketing/MedalPlanPromotion.vue create mode 100644 packages/assets/icons/clock.svg diff --git a/apps/frontend/src/assets/images/illustrations/medal_promo_background.svg b/apps/frontend/src/assets/images/illustrations/medal_promo_background.svg new file mode 100644 index 000000000..53efcfedd --- /dev/null +++ b/apps/frontend/src/assets/images/illustrations/medal_promo_background.svg @@ -0,0 +1,490 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/frontend/src/components/ui/servers/marketing/MedalPlanPromotion.vue b/apps/frontend/src/components/ui/servers/marketing/MedalPlanPromotion.vue new file mode 100644 index 000000000..f83710a0f --- /dev/null +++ b/apps/frontend/src/components/ui/servers/marketing/MedalPlanPromotion.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/apps/frontend/src/composables/featureFlags.ts b/apps/frontend/src/composables/featureFlags.ts index df4c5d057..1a604cc98 100644 --- a/apps/frontend/src/composables/featureFlags.ts +++ b/apps/frontend/src/composables/featureFlags.ts @@ -25,6 +25,7 @@ export const DEFAULT_FEATURE_FLAGS = validateValues({ // Feature toggles projectTypesPrimaryNav: false, + enableMedalPromotion: true, hidePlusPromoInUserMenu: false, oldProjectCards: true, newProjectCards: false, diff --git a/apps/frontend/src/pages/servers/index.vue b/apps/frontend/src/pages/servers/index.vue index 2ac52cbe8..98d5336f8 100644 --- a/apps/frontend/src/pages/servers/index.vue +++ b/apps/frontend/src/pages/servers/index.vue @@ -516,12 +516,11 @@
-
+

There's a server for everyone

@@ -551,6 +550,8 @@
+ +
    { } }; -const planQuery = () => { - if (route.query.plan) { - document.getElementById("plan").scrollIntoView(); - selectProduct(route.query.plan); +const planQuery = async () => { + if ("plan" in route.query) { + await nextTick(); + const planElement = document.getElementById("plan"); + if (planElement) { + planElement.scrollIntoView({ behavior: "smooth" }); + await selectProduct(route.query.plan); + } } }; diff --git a/packages/assets/generated-icons.ts b/packages/assets/generated-icons.ts index f01044155..9d345a9e1 100644 --- a/packages/assets/generated-icons.ts +++ b/packages/assets/generated-icons.ts @@ -33,6 +33,7 @@ import _ChevronRightIcon from './icons/chevron-right.svg?component' import _ClearIcon from './icons/clear.svg?component' import _ClientIcon from './icons/client.svg?component' import _ClipboardCopyIcon from './icons/clipboard-copy.svg?component' +import _ClockIcon from './icons/clock.svg?component' import _CloudIcon from './icons/cloud.svg?component' import _CodeIcon from './icons/code.svg?component' import _CoffeeIcon from './icons/coffee.svg?component' @@ -226,6 +227,7 @@ export const ChevronRightIcon = _ChevronRightIcon export const ClearIcon = _ClearIcon export const ClientIcon = _ClientIcon export const ClipboardCopyIcon = _ClipboardCopyIcon +export const ClockIcon = _ClockIcon export const CloudIcon = _CloudIcon export const CodeIcon = _CodeIcon export const CoffeeIcon = _CoffeeIcon diff --git a/packages/assets/icons/clock.svg b/packages/assets/icons/clock.svg new file mode 100644 index 000000000..98c2fac7c --- /dev/null +++ b/packages/assets/icons/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file