Hide germany when out of stock. Also, fixes wrapping issue with testing connection (#4356)

This commit is contained in:
Prospector
2025-09-08 15:35:27 -07:00
committed by GitHub
parent b95ece04c4
commit 567e31401d
2 changed files with 19 additions and 4 deletions

View File

@@ -50,6 +50,19 @@ const sortedRegions = computed(() => {
})
})
const visibleRegions = computed(() => {
if (!loading.value) {
return sortedRegions.value.filter((region) => {
// only show eu-lim if it has stock because we're not restocking it.
if (region.shortcode === 'eu-lim') {
return currentStock.value[region.shortcode] > 0
}
return true
})
}
return sortedRegions.value
})
const selectedRam = ref<number>(-1)
const ramOptions = computed(() => {
@@ -204,7 +217,7 @@ onMounted(() => {
</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<ServersRegionButton
v-for="region in sortedRegions"
v-for="region in visibleRegions"
:key="region.shortcode"
v-model="selectedRegion"
:region="region"