diff --git a/website/public/img/os/almalinux.svg b/website/public/img/os/almalinux.svg new file mode 100644 index 0000000..efd9050 --- /dev/null +++ b/website/public/img/os/almalinux.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/website/public/img/os/debian.svg b/website/public/img/os/debian.svg new file mode 100644 index 0000000..7695fd5 --- /dev/null +++ b/website/public/img/os/debian.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/website/public/img/os/no-os.svg b/website/public/img/os/no-os.svg new file mode 100644 index 0000000..bbe6fc7 --- /dev/null +++ b/website/public/img/os/no-os.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/website/public/img/os/rocky.svg b/website/public/img/os/rocky.svg new file mode 100644 index 0000000..d558786 --- /dev/null +++ b/website/public/img/os/rocky.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/website/public/img/os/ubuntu.svg b/website/public/img/os/ubuntu.svg new file mode 100644 index 0000000..686b28c --- /dev/null +++ b/website/public/img/os/ubuntu.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/website/public/img/os/windows.svg b/website/public/img/os/windows.svg new file mode 100644 index 0000000..1659871 --- /dev/null +++ b/website/public/img/os/windows.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/DriveBayGroupSelector.vue b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/DriveBayGroupSelector.vue index f268e64..970e0af 100644 --- a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/DriveBayGroupSelector.vue +++ b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/DriveBayGroupSelector.vue @@ -46,17 +46,47 @@ function priceFor(v: DedicatedConfigValue): number { return raw ? parseFloat(raw) : 0 } -function priceLabel(v: DedicatedConfigValue): string { - const p = priceFor(v) - if (p === 0) return v.is_default ? 'no drives' : 'free' - const suffix = props.cycle === 'monthly' +const perDriveSuffix = computed(() => + props.cycle === 'monthly' ? '/drive/mo' : props.cycle === 'quarterly' ? '/drive/qtr' : props.cycle === 'semi_annual' ? '/drive/6mo' - : '/drive/yr' - return `+$${p.toFixed(2)}${suffix}` + : '/drive/yr', +) + +function priceLabel(v: DedicatedConfigValue): string { + const p = priceFor(v) + if (p === 0) return v.is_default ? 'no drives' : 'free' + return `+$${p.toFixed(2)}${perDriveSuffix.value}` +} + +interface DriveItem { + value: string + label: string + price: number + isDefault: boolean +} + +const driveItems = computed(() => + driveValues.value.map(v => ({ + value: v.value, + label: v.label, + price: priceFor(v), + isDefault: v.is_default, + })), +) + +function driveItemLabel(item: DriveItem | { price?: number; isDefault?: boolean } | undefined): string { + const price = item?.price + const isDefault = item?.isDefault + if (typeof price !== 'number' || price === 0) return isDefault ? 'no drives' : 'free' + return `+$${price.toFixed(2)}${perDriveSuffix.value}` +} + +function onDriveChange(v: unknown): void { + if (typeof v === 'string') pickDrive(v) } const cycleSuffix = computed(() => @@ -105,32 +135,44 @@ function pickDrive(value: string): void {
Drive selection
-
-