move stuff out of <script> into .ts files
Some checks failed
ci / ci (22, debian-trixie) (push) Failing after 20s
Some checks failed
ci / ci (22, debian-trixie) (push) Failing after 20s
This commit is contained in:
parent
fff708cb8f
commit
66677aa6d8
4 changed files with 47 additions and 23 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
21
app/composables/MainFooter.ts
Normal file
21
app/composables/MainFooter.ts
Normal 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
|
||||
}
|
||||
}
|
||||
})
|
||||
24
app/composables/ServiceCard.ts
Normal file
24
app/composables/ServiceCard.ts
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue