Servers marketing enhancements (#3252)

* feat: locations page + stock callouts

* feat: misalligned but spirits there!!

* fix readability on colors on globe

* Enhancements to globe

* Fix out of stock indicator styling

* Start globe near US and slow speed

* Remove debug statement

* Switch from capacity to stock API

* Make custom use its own stock checker

* Fix lint, add changelog entries

---------

Co-authored-by: Elizabeth <checksum@pyro.host>
Co-authored-by: Lio <git@lio.cat>
This commit is contained in:
Prospector
2025-02-12 12:06:51 -08:00
committed by GitHub
parent 098519dea1
commit 6d810a421a
8 changed files with 678 additions and 145 deletions

View File

@@ -18,11 +18,16 @@
<div class="w-2 h-2 rounded-full bg-secondary" />
</template>
<span :class="{ 'text-primary font-bold': showType }">
{{ entry.version ?? formattedDate }}
{{ versionName }}
</span>
</h2>
</AutoLink>
<div v-if="recent" v-tooltip="dateTooltip" class="hidden sm:flex" :class="{ 'cursor-help': dateTooltip }">
<div
v-if="recent"
v-tooltip="dateTooltip"
class="hidden sm:flex"
:class="{ 'cursor-help': dateTooltip }"
>
{{ relativeDate }}
</div>
<div v-else-if="entry.version" :class="{ 'cursor-help': dateTooltip }">
@@ -61,11 +66,12 @@ const props = withDefaults(
)
const currentDate = ref(dayjs())
const recent = computed(() => props.entry.date.isAfter(currentDate.value.subtract(1, 'week')))
const dateTooltip = computed(() => props.entry.date.format('MMMM D, YYYY [at] h:mm A'))
const formattedDate = computed(() =>
props.entry.version ? props.entry.date.fromNow() : props.entry.date.format('MMMM D, YYYY'),
const recent = computed(
() =>
props.entry.date.isAfter(currentDate.value.subtract(1, 'week')) &&
props.entry.date.isBefore(currentDate.value),
)
const dateTooltip = computed(() => props.entry.date.format('MMMM D, YYYY [at] h:mm A'))
const relativeDate = computed(() => props.entry.date.fromNow())
const longDate = computed(() => props.entry.date.format('MMMM D, YYYY'))