diff --git a/app/gui/src/dashboard/layouts/Labels.tsx b/app/gui/src/dashboard/layouts/Labels.tsx index 06503269e8..08ea7b87ce 100644 --- a/app/gui/src/dashboard/layouts/Labels.tsx +++ b/app/gui/src/dashboard/layouts/Labels.tsx @@ -5,34 +5,24 @@ import { useMutation } from '@tanstack/react-query' import PlusIcon from '#/assets/plus.svg' import Trash2Icon from '#/assets/trash2.svg' - -import { backendMutationOptions, useBackendQuery } from '#/hooks/backendHooks' - -import * as modalProvider from '#/providers/ModalProvider' -import * as textProvider from '#/providers/TextProvider' - import * as ariaComponents from '#/components/AriaComponents' import Label from '#/components/dashboard/Label' import FocusArea from '#/components/styled/FocusArea' import FocusRing from '#/components/styled/FocusRing' import SvgMask from '#/components/SvgMask' - +import AssetEventType from '#/events/AssetEventType' +import { backendMutationOptions, useBackendQuery } from '#/hooks/backendHooks' +import { useDispatchAssetEvent } from '#/layouts/AssetsTable/EventListProvider' import ConfirmDeleteModal from '#/modals/ConfirmDeleteModal' import DragModal from '#/modals/DragModal' import NewLabelModal from '#/modals/NewLabelModal' - +import * as modalProvider from '#/providers/ModalProvider' +import * as textProvider from '#/providers/TextProvider' import type Backend from '#/services/Backend' - -import AssetEventType from '#/events/AssetEventType' -import { useDispatchAssetEvent } from '#/layouts/AssetsTable/EventListProvider' import * as array from '#/utilities/array' import type AssetQuery from '#/utilities/AssetQuery' import * as drag from '#/utilities/drag' -// ============== -// === Labels === -// ============== - /** Props for a {@link Labels}. */ export interface LabelsProps { readonly backend: Backend @@ -61,96 +51,98 @@ export default function Labels(props: LabelsProps) { return ( {(innerProps) => ( -
- - {getText('labels')} - +
- {labels.map((label) => { - const negated = currentNegativeLabels.some((term) => - array.shallowEqual(term, [label.value]), - ) - return ( -
-
+ + } + > + {getText('newLabelButtonLabel')} + + +
)}