save DTL
This commit is contained in:
parent
0923c9ec01
commit
28804ceba1
7 changed files with 267 additions and 181 deletions
|
|
@ -1,11 +1,31 @@
|
|||
<template>
|
||||
<button v-if="page?.designToLight?.grades?.global">
|
||||
{{ page.designToLight.grades.global.letter }}
|
||||
</button>
|
||||
<button :data-new="hasAlternatives ? true : undefined">{{ content }}</button>
|
||||
</template>
|
||||
<script setup>
|
||||
import { storeToRefs } from "pinia";
|
||||
import { usePageStore } from "../../stores/page";
|
||||
import { computed } from "vue";
|
||||
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
|
||||
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;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
position: fixed;
|
||||
min-width: 4rem;
|
||||
min-height: 2rem;
|
||||
right: 2rem;
|
||||
bottom: 2rem;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue