You've already forked AstralRinth
forked from didirus/AstralRinth
* feat: medal promotion on servers page * feat: medal server card * fix: styling changes * fix: colors for dark mode only * fix: light mode medal promotion * feat: finish server card layout * feat: countdown on server panel * fix: lint * feat: use same gradient as promo * fix: scale for medal bg * fix: border around server icon * feat: medal subscr expiry date stuff * feat: progress on plans within the modal * feat: finalize plan modal stage * fix: unused scss * feat: remove buttons from cards * feat: upgrade button opens modal on server panel * feat: billing endpoint * fix: lint issues * fix: lint issues * fix: lint issues * feat: better handling of downgrades + existing plan checks * feat: update medal url * feat: proration visual in modal * feat: standardize upgrade modal into ServersUpgradeModalWrapper * feat: replace upgrade PurchaseModal with ServersUpgradeModalWrapper * feat: allow server region * fix: lint * fix: lint * fix: medal frontend completion * fix: lint issues * feat: ad * fix: hover tooltip + orange new server sparkle * feat: ad * fix: lint issues new eslint * feat: match ad * feat: support for ?dry=true * fix: lint isuses * fix: lint issues * fix: TeleportDropdownMenu imports * fix: hash nav issues * feat: clarify confirm changes btn * fix: lint issues * fix: "Using new payment method" * fix: lint * fix: re-add -mt-2 --------- Signed-off-by: Cal H. <hendersoncal117@gmail.com>
56 lines
1.5 KiB
Vue
56 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import { CpuIcon, DatabaseIcon, MemoryStickIcon, SparklesIcon, UnknownIcon } from '@modrinth/assets'
|
|
import { computed } from 'vue'
|
|
|
|
import AutoLink from '../base/AutoLink.vue'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'click-bursting-link'): void
|
|
}>()
|
|
|
|
const props = defineProps<{
|
|
ram: number
|
|
storage: number
|
|
cpus: number
|
|
}>()
|
|
|
|
const formattedRam = computed(() => {
|
|
return props.ram / 1024
|
|
})
|
|
|
|
const formattedStorage = computed(() => {
|
|
return props.storage / 1024
|
|
})
|
|
|
|
const sharedCpus = computed(() => {
|
|
return props.cpus / 2
|
|
})
|
|
</script>
|
|
<template>
|
|
<ul class="m-0 flex list-none flex-col gap-2 px-0 text-sm leading-normal text-secondary">
|
|
<li class="flex items-center gap-2">
|
|
<MemoryStickIcon class="h-5 w-5 shrink-0" /> {{ formattedRam }} GB RAM
|
|
</li>
|
|
<li class="flex items-center gap-2">
|
|
<DatabaseIcon class="h-5 w-5 shrink-0" /> {{ formattedStorage }} GB Storage
|
|
</li>
|
|
<li class="flex items-center gap-2">
|
|
<CpuIcon class="h-5 w-5 shrink-0" /> {{ sharedCpus }} Shared CPUs
|
|
</li>
|
|
<li class="flex items-center gap-2">
|
|
<SparklesIcon class="h-5 w-5 shrink-0" /> Bursts up to {{ cpus }} CPUs
|
|
<AutoLink
|
|
v-tooltip="
|
|
`CPU bursting allows your server to temporarily use additional threads to help mitigate TPS spikes. Click for more info.`
|
|
"
|
|
class="flex"
|
|
to="https://modrinth.com/servers#cpu-burst"
|
|
target="_blank"
|
|
@click="() => emit('click-bursting-link')"
|
|
>
|
|
<UnknownIcon class="h-4 w-4 text-secondary opacity-80" />
|
|
</AutoLink>
|
|
</li>
|
|
</ul>
|
|
</template>
|