2025-01-22 13:25:34 +01:00
|
|
|
<template>
|
2025-01-23 12:23:14 +01:00
|
|
|
<button :data-new="hasAlternatives ? true : undefined">{{ content }}</button>
|
2025-01-22 13:25:34 +01:00
|
|
|
</template>
|
|
|
|
|
<script setup>
|
|
|
|
|
import { storeToRefs } from "pinia";
|
|
|
|
|
import { usePageStore } from "../../stores/page";
|
2025-01-23 12:23:14 +01:00
|
|
|
import { computed } from "vue";
|
2025-01-22 13:25:34 +01:00
|
|
|
|
|
|
|
|
const { page } = storeToRefs(usePageStore());
|
2025-01-23 12:23:14 +01:00
|
|
|
|
|
|
|
|
const hasAlternatives = computed(() => {
|
|
|
|
|
return page.value.designToLight.length > 1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const content = computed(() => {
|
|
|
|
|
if (hasAlternatives.value) return "new";
|
|
|
|
|
return page.value.designToLight[0].grades.global.letter;
|
|
|
|
|
});
|
2025-01-22 13:25:34 +01:00
|
|
|
</script>
|
2025-01-23 12:23:14 +01:00
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
button {
|
|
|
|
|
position: fixed;
|
|
|
|
|
min-width: 4rem;
|
|
|
|
|
min-height: 2rem;
|
|
|
|
|
right: 2rem;
|
|
|
|
|
bottom: 2rem;
|
|
|
|
|
background-color: #000;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
</style>
|