diff --git a/src/components/annotations/variants/ActiveVariantsDetails.vue b/src/components/annotations/variants/ActiveVariantsDetails.vue index 54702234..6fba3ae2 100644 --- a/src/components/annotations/variants/ActiveVariantsDetails.vue +++ b/src/components/annotations/variants/ActiveVariantsDetails.vue @@ -1,6 +1,7 @@ - - + - + {{ $t('original') }} - {{ activeVariants[0].target.source }} + {{ activeVariants[0].target[0].source }} - {{ variant.body.value.witness }} + + + {{ variant.body.value.witness }} + {{ variant.body.value.entry }} diff --git a/src/components/annotations/variants/VariantItem.vue b/src/components/annotations/variants/VariantItem.vue index e13c31b2..21228913 100644 --- a/src/components/annotations/variants/VariantItem.vue +++ b/src/components/annotations/variants/VariantItem.vue @@ -2,7 +2,7 @@ {{ witness ?? '-' }} @@ -31,19 +34,18 @@ diff --git a/src/components/annotations/variants/VariantsList.vue b/src/components/annotations/variants/VariantsList.vue index 482487ed..e72195c8 100644 --- a/src/components/annotations/variants/VariantsList.vue +++ b/src/components/annotations/variants/VariantsList.vue @@ -8,6 +8,7 @@ :annotation="annotation" :is-active="isActive(annotation)" :toggle="toggle" + :witness-color="getWitnessColor(annotation.body.value.witness)" @select="addAnnotation(annotation.id)" @unselect="removeAnnotation(annotation.id)" @show-details="openDetailsDialog" @@ -24,7 +25,7 @@ diff --git a/src/components/base/BaseDialog.vue b/src/components/base/BaseDialog.vue index b63229ef..45a18a52 100644 --- a/src/components/base/BaseDialog.vue +++ b/src/components/base/BaseDialog.vue @@ -24,7 +24,7 @@ const emit = defineEmits<{(event: 'update:modelValue', payload: boolean): void; :append-to="configStore.config.container + ' .tido > *'" :pt="{ root: { - class: 't-relative t-bg-white dark:t-bg-gray-800 t-p-4 t-rounded-lg lg:t-min-w-[33%] t-max-h-[80%] t-shadow-lg dark:t-border dark:t-border-gray-700' + class: 't-relative t-bg-white dark:t-bg-gray-800 t-p-4 t-rounded-lg t-max-w-[90%] lg:t-min-w-[33%] t-max-h-[80%] t-shadow-lg dark:t-border dark:t-border-gray-700' }, header: { class: 't-flex t-mb-4' diff --git a/src/utils/annotations.js b/src/utils/annotations.js index 4008514c..1b4967d3 100644 --- a/src/utils/annotations.js +++ b/src/utils/annotations.js @@ -1,6 +1,7 @@ import * as Utils from '@/utils/index'; import { getIcon } from '@/utils/icons'; import { i18n } from '@/i18n'; +import colors from "tailwindcss/colors"; // utility functions that we can use as generic way for perform tranformation on annotations. @@ -262,12 +263,14 @@ export function addWitness(targetHtmlEl, witness, color) { } } -function createCurrWitHtml(witness, borderColor) { +function createCurrWitHtml(witness, witnessColor) { // create an html element of the selected witness const witHtml = document.createElement("span"); witHtml.innerHTML = witness - witHtml.classList.add('t-rounded-3xl', 't-box-border', 't-w-75', 't-h-8', 't-border-2', 't-p-[2px]', 't-text-sm', 't-ml-[3px]') - witHtml.style.borderColor = borderColor + witHtml.classList.add('t-rounded-3xl', 't-box-border', 't-h-8', 't-py-0.5', 't-px-1.5', 't-text-xs', 't-font-semibold', 't-ml-[3px]') + witHtml.style.background = colors[witnessColor]['100'] + witHtml.style.color = colors[witnessColor]['600'] + return witHtml } diff --git a/src/utils/color.js b/src/utils/color.js index ac2e3972..ccc08b46 100644 --- a/src/utils/color.js +++ b/src/utils/color.js @@ -10,11 +10,9 @@ export const getRGBColor = (hex, type) => { export default function colors() { - - const hexaDecimalColors = ['#FEF08A', '#BEF264', '#A8A29E', '#D8B4FE', '#A8A29E'] - return hexaDecimalColors; + return ['rose', 'amber', 'violet' , 'lime', 'blue', 'teal',]; } export function getItemColorBasedOnIndex(index){ return colors()[index] -} \ No newline at end of file +}
{{ activeVariants[0].target.source }}
{{ activeVariants[0].target[0].source }}
{{ variant.body.value.entry }}