refactor: title to tooltip

This commit is contained in:
Maël Gangloff
2024-08-22 01:50:16 +02:00
parent 5ae0b836a5
commit 884206e927
2 changed files with 11 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import {Card, Divider, Space, Table, Tag, Tooltip, Typography} from "antd"; import {Card, Divider, Space, Table, Tag, Tooltip} from "antd";
import {DisconnectOutlined, LinkOutlined} from "@ant-design/icons"; import {DisconnectOutlined, LinkOutlined} from "@ant-design/icons";
import {t} from "ttag"; import {t} from "ttag";
import {ViewDiagramWatchlistButton} from "./diagram/ViewDiagramWatchlistButton"; import {ViewDiagramWatchlistButton} from "./diagram/ViewDiagramWatchlistButton";
@@ -41,13 +41,16 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
title={<> title={<>
{ {
watchlist.connector ? watchlist.connector ?
<Tag icon={<LinkOutlined/>} color="lime-inverse" title={watchlist.connector.id}/> : <Tooltip title={watchlist.connector.id}>
<Tag icon={<DisconnectOutlined/>} color="default" <Tag icon={<LinkOutlined/>} color="lime-inverse"/>
title={t`This Watchlist is not linked to a Connector.`}/> </Tooltip> :
<Tooltip title={t`This Watchlist is not linked to a Connector.`}>
<Tag icon={<DisconnectOutlined/>} color="default"/>
</Tooltip>
} }
<Typography.Text title={new Date(watchlist.createdAt).toLocaleString()}> <Tooltip title={new Date(watchlist.createdAt).toLocaleString()}>
{t`Watchlist` + (watchlist.name ? ` (${watchlist.name})` : '')} {t`Watchlist` + (watchlist.name ? ` (${watchlist.name})` : '')}
</Typography.Text> </Tooltip>
</> </>
} }
size='small' size='small'

View File

@@ -697,11 +697,11 @@ msgstr ""
msgid "Are you sure to delete this Watchlist?" msgid "Are you sure to delete this Watchlist?"
msgstr "" msgstr ""
#: assets/components/tracking/watchlist/WatchlistCard.tsx:46 #: assets/components/tracking/watchlist/WatchlistCard.tsx:47
msgid "This Watchlist is not linked to a Connector." msgid "This Watchlist is not linked to a Connector."
msgstr "" msgstr ""
#: assets/components/tracking/watchlist/WatchlistCard.tsx:49 #: assets/components/tracking/watchlist/WatchlistCard.tsx:52
msgid "Watchlist" msgid "Watchlist"
msgstr "" msgstr ""