diff --git a/src/assets/app.scss b/src/assets/app.scss index fd7bf80..005502b 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -86,3 +86,10 @@ h3 { .p-overlaypanel .p-overlaypanel-content { padding: 0; } + +.p-dropdown:not(.p-disabled):hover { + border-color: var(--primary-color); +} +.p-multiselect:not(.p-disabled):hover { + border-color: var(--primary-color); +} \ No newline at end of file diff --git a/src/components/base/MultiSelect.vue b/src/components/base/MultiSelect.vue index f9efbf8..8e97c14 100644 --- a/src/components/base/MultiSelect.vue +++ b/src/components/base/MultiSelect.vue @@ -38,6 +38,9 @@ const dropdownLabel = computed(() => { {{ t('select_all') }} + diff --git a/src/components/workflows/WorkflowsTimeline.vue b/src/components/workflows/WorkflowsTimeline.vue index 9146ad9..ce1cdbd 100644 --- a/src/components/workflows/WorkflowsTimeline.vue +++ b/src/components/workflows/WorkflowsTimeline.vue @@ -5,7 +5,6 @@ import { computed, onMounted, ref, watch } from "vue" import { EvaluationMetrics, getMaxValueByMetric } from '@/helpers/metrics' import { useI18n } from "vue-i18n" import type { DropdownOption, EvaluationResultsDocumentWide, Workflow, GroundTruth } from "@/types" -import { DropdownPassThroughStyles } from '@/helpers/pt' import workflowsStore from '@/store/workflows-store' import filtersStore from '@/store/filters-store' import timelineStore from "@/store/timeline-store" @@ -47,11 +46,9 @@ watch(selectedMetric, diff --git a/src/components/workflows/filters/Filters.vue b/src/components/workflows/filters/Filters.vue index b45a3d7..34ea059 100644 --- a/src/components/workflows/filters/Filters.vue +++ b/src/components/workflows/filters/Filters.vue @@ -2,8 +2,11 @@ import filtersStore from "@/store/filters-store" import workflowsStore from "@/store/workflows-store" import { computed, onMounted } from "vue" -import MultiSelect from "primevue/multiselect" +import BaseMultiSelect from "@/components/base/MultiSelect.vue" import type { FilterOption } from "@/types" +import { useI18n } from "vue-i18n" + +const { t } = useI18n() const gtOptions = computed(() => workflowsStore.gt.map(({ id, label }) => ({ value: id, label }))) @@ -15,12 +18,11 @@ onMounted(() => { diff --git a/src/components/workflows/timeline/TimelineSorting.vue b/src/components/workflows/timeline/TimelineSorting.vue index 77bb6af..29bf6e1 100644 --- a/src/components/workflows/timeline/TimelineSorting.vue +++ b/src/components/workflows/timeline/TimelineSorting.vue @@ -4,7 +4,6 @@ import { computed, ref, watch } from "vue" import Dropdown from "primevue/dropdown" import { GTTimelineSortingOptions, sortByOption } from "@/helpers/sorting" import { useI18n } from "vue-i18n" -import { DropdownPassThroughStyles } from "@/helpers/pt" const { t } = useI18n() @@ -41,15 +40,14 @@ function updateSortedList(event: any) { \ No newline at end of file diff --git a/src/helpers/pt.ts b/src/helpers/pt.ts index 0b1f1fc..f10ad80 100644 --- a/src/helpers/pt.ts +++ b/src/helpers/pt.ts @@ -7,79 +7,10 @@ const TRANSITIONS = { } } -const DropdownPassThroughStyles = { - root: ({ props }) => ({ - class: [ - 'cursor-pointer inline-flex relative select-none', - 'bg-white border border-gray-300 transition-colors duration-200 ease-in-out rounded-md', - 'dark:bg-gray-900 dark:border-primary-900/40 dark:hover:border-primary-300', - 'w-full md:w-56', - 'hover:border-primary focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]', - { 'opacity-60 select-none pointer-events-none cursor-default': props.disabled } - ] - }), - input: ({ props }) => ({ - class: [ - 'cursor-pointer block flex flex-auto overflow-hidden text-ellipsis whitespace-nowrap relative', - 'bg-transparent border-0 text-gray-800', - 'dark:text-white/80', - 'p-3 transition duration-200 bg-transparent rounded appearance-none font-sans text-base', - 'focus:outline-none focus:shadow-none', - { 'pr-7': props.showClear } - ] - }), - trigger: { - class: ['flex items-center justify-center shrink-0', 'bg-transparent text-gray-500 w-12 rounded-tr-lg rounded-br-lg'] - }, - wrapper: { - class: ['max-h-[200px] overflow-auto', 'bg-white text-gray-700 border-0 rounded-md shadow-lg', 'dark:bg-gray-900 dark:text-white/80'] - }, - list: { - class: 'py-3 list-none m-0' - }, - item: ({ context }) => ({ - class: [ - 'cursor-pointer font-normal overflow-hidden relative whitespace-nowrap', - 'm-0 p-3 border-0 transition-shadow duration-200 rounded-none', - { - 'text-gray-700 hover:text-gray-700 hover:bg-gray-200 dark:text-white/80 dark:hover:bg-gray-800': !context.focused && !context.selected, - 'bg-gray-300 text-gray-700 dark:text-white/80 dark:bg-gray-800/90 hover:text-gray-700 hover:bg-gray-200 dark:text-white/80 dark:hover:bg-gray-800': context.focused && !context.selected, - 'bg-primary-100 text-primary dark:bg-primary-400 dark:text-white/80': context.focused && context.selected, - 'bg-primary-50 text-primary dark:bg-primary-300 dark:text-white/80': !context.focused && context.selected - } - ] - }), - itemgroup: { - class: ['m-0 p-3 text-gray-800 bg-white font-bold', 'dark:bg-gray-900 dark:text-white/80', 'cursor-auto'] - }, - header: { - class: ['p-3 border-b border-gray-300 text-gray-700 bg-gray-100 mt-0 rounded-tl-lg rounded-tr-lg', 'dark:bg-gray-800 dark:text-white/80 dark:border-primary-900/40'] - }, - filtercontainer: { - class: 'relative' - }, - filterinput: { - class: [ - 'pr-7 -mr-7', - 'w-full', - 'font-sans text-base text-gray-700 bg-white py-3 px-3 border border-gray-300 transition duration-200 rounded-lg appearance-none', - 'dark:bg-gray-900 dark:border-primary-900/40 dark:hover:border-primary-300 dark:text-white/80', - 'hover:border-primary focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]' - ] - }, - filtericon: { - class: '-mt-2 absolute top-1/2' - }, - clearicon: { - class: 'text-gray-500 right-12 -mt-2 absolute top-1/2' - }, -} - const OverlayPanelDropdownStyles = { root: 'bg-white border border-gray-300 rounded-md' } export { - DropdownPassThroughStyles, OverlayPanelDropdownStyles } diff --git a/src/locales/de.json b/src/locales/de.json index 040cedd..76e63f1 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -98,5 +98,6 @@ "year_desc": "Zeitraum (neuster - ältester)", "select_a_label": "Kennzeichnung auswählen", "select_a_script_type": "Skript-Typ auswählen", - "no_labelling": "Keine Kennzeichnung" + "no_labelling": "Keine Kennzeichnung", + "select_ground_truth": "Ground Truth auswählen" } diff --git a/src/locales/en.json b/src/locales/en.json index 9fce08a..3fd8c26 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -93,5 +93,6 @@ "year_desc": "Time period (latest - oldest)", "select_a_label": "Select a label", "select_a_script_type": "Select a script-type", - "no_labelling": "No labelling" + "no_labelling": "No labelling", + "select_ground_truth": "Select Ground Truth" }