From 0d9c8d70c8d23a8aa58a9555197dec7565ee80e6 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 30 May 2025 10:34:04 +0200 Subject: [PATCH] ui: fixed card and tag removal, alert buttons, kai input disable state --- .../components/Client/Projects/TagForm.tsx | 22 ++--- .../Alerts/AlertForm/BottomButtons.tsx | 1 + .../components/Alerts/AlertForm/Condition.tsx | 1 + .../components/MetricsList/ListView.tsx | 80 ++++++++++--------- .../components/MetricsList/MetricsList.tsx | 23 +++--- .../components/WidgetView/CardViewMenu.tsx | 45 +++++------ .../components/Kai/components/ChatInput.tsx | 6 +- 7 files changed, 96 insertions(+), 82 deletions(-) diff --git a/frontend/app/components/Client/Projects/TagForm.tsx b/frontend/app/components/Client/Projects/TagForm.tsx index 1026b71e1..f0193066f 100644 --- a/frontend/app/components/Client/Projects/TagForm.tsx +++ b/frontend/app/components/Client/Projects/TagForm.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Button, Form, Input, Space, Modal } from 'antd'; +import { Button, Form, Input, Space } from 'antd'; import { Trash } from 'UI/Icons'; import { useStore } from '@/mstore'; import { useModal } from 'Components/ModalContext'; import { useTranslation } from 'react-i18next'; - +import { confirm } from 'UI'; interface Props { tag: any; projectId: number; @@ -23,14 +23,16 @@ function TagForm(props: Props) { }; const onDelete = async () => { - Modal.confirm({ - title: t('Tag'), - content: t('Are you sure you want to remove?'), - onOk: async () => { - await tagWatchStore.deleteTag(tag.tagId, projectId); - closeModal(); - }, - }); + if ( + await confirm({ + header: t('Remove Tag'), + confirmButton: t('Remove'), + confirmation: t('Are you sure you want to remove this tag?'), + }) + ) { + await tagWatchStore.deleteTag(tag.tagId, projectId); + closeModal(); + } }; const onSave = async () => { diff --git a/frontend/app/components/Dashboard/components/Alerts/AlertForm/BottomButtons.tsx b/frontend/app/components/Dashboard/components/Alerts/AlertForm/BottomButtons.tsx index 1acc57fd8..90751e4e4 100644 --- a/frontend/app/components/Dashboard/components/Alerts/AlertForm/BottomButtons.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/AlertForm/BottomButtons.tsx @@ -23,6 +23,7 @@ function BottomButtons({