diff options
Diffstat (limited to 'apps/web/components/dashboard/search/QueryExplainerTooltip.tsx')
| -rw-r--r-- | apps/web/components/dashboard/search/QueryExplainerTooltip.tsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx b/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx index f5f73be3..37815b0a 100644 --- a/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx +++ b/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx @@ -1,6 +1,7 @@ import InfoTooltip from "@/components/ui/info-tooltip"; import { Table, TableBody, TableCell, TableRow } from "@/components/ui/table"; import { useTranslation } from "@/lib/i18n/client"; +import { match } from "@/lib/utils"; import { TextAndMatcher } from "@hoarder/shared/searchQueryParser"; import { Matcher } from "@hoarder/shared/types/search"; @@ -134,6 +135,21 @@ export default function QueryExplainerTooltip({ <TableCell>{matcher.url}</TableCell> </TableRow> ); + case "type": + return ( + <TableRow> + <TableCell> + {matcher.inverse ? t("search.type_is_not") : t("search.type_is")} + </TableCell> + <TableCell> + {match(matcher.typeName, { + link: t("common.bookmark_types.link"), + text: t("common.bookmark_types.text"), + asset: t("common.bookmark_types.media"), + })} + </TableCell> + </TableRow> + ); default: { const _exhaustiveCheck: never = matcher; return null; |
