move stuff out of <script> into .ts files
Some checks failed
ci / ci (22, debian-trixie) (push) Failing after 20s

This commit is contained in:
kittentm 2026-05-14 08:23:35 +02:00
commit 66677aa6d8
No known key found for this signature in database
GPG key ID: AC43DFDBC1F44A91
4 changed files with 47 additions and 23 deletions

View file

@ -1,14 +1,4 @@
<script setup>
const footerLinks = [{
label: 'Socials',
children: [
{ label: 'Twitter', to: 'https://x.com/Splatfestival_' },
{ label: 'Discord', to: 'https://discord.gg/grMSxZf' },
{ label: 'Forgejo', to: 'https://git.spbr.net/spacebar' },
{ label: 'Patreon', to: 'https://www.patreon.com/splatfestival' }
]
}]
</script>
<script lang="ts" src="../composables/MainFooter.ts"></script>
<template>
<UFooter>

View file

@ -38,18 +38,7 @@
</div>
</template>
<script setup>
defineProps({
name: { type: String, required: true },
status: { type: String, default: 'Normal' },
uptimePercentage: { type: Number, default: 100.00 },
uptimeHistory: { type: Array, required: true }
})
const formatTooltip = (day) => {
return `${day.date}: ${day.status.toUpperCase()} (${day.incident || 'No incidents'})`
}
</script>
<script lang="ts" src="../composables/ServiceCard.ts"></script>
<style scoped>
.service-card {

View file

@ -0,0 +1,21 @@
import { defineComponent } from 'vue'
export default defineComponent({
setup() {
const footerLinks = [
{
label: 'Socials',
children: [
{ label: 'Twitter', to: 'https://x.com/Splatfestival_' },
{ label: 'Discord', to: 'https://discord.gg/grMSxZf' },
{ label: 'Forgejo', to: 'https://git.spbr.net/spacebar' },
{ label: 'Patreon', to: 'https://www.patreon.com/splatfestival' }
]
}
]
return {
footerLinks
}
}
})

View file

@ -0,0 +1,24 @@
interface ServiceCardProps {
name: string;
status: string;
uptimePercentage: number;
uptimeHistory: Array<{ date: string; status: string; incident?: string }>;
}
export default {
props: {
name: { type: String, required: true },
status: { type: String, default: 'Normal' },
uptimePercentage: { type: Number, default: 100.00 },
uptimeHistory: { type: Array, required: true }
},
setup(props: ServiceCardProps) {
const formatTooltip = (day: any) => {
return `${day.date}: ${day.status.toUpperCase()} (${day.incident || 'No incidents'})`
}
return {
formatTooltip
}
}
}