fix
This commit is contained in:
parent
d43ee77617
commit
b08d37fbf0
2 changed files with 21 additions and 12 deletions
|
|
@ -1,5 +1,13 @@
|
|||
import React from "react";
|
||||
import { Group, Center, Text, Badge, ActionIcon, Tooltip } from "@mantine/core";
|
||||
import {
|
||||
Group,
|
||||
Center,
|
||||
Text,
|
||||
Badge,
|
||||
ActionIcon,
|
||||
Tooltip,
|
||||
getDefaultZIndex,
|
||||
} from "@mantine/core";
|
||||
import { Spotlight } from "@mantine/spotlight";
|
||||
import { Link } from "react-router-dom";
|
||||
import { IconFile, IconDownload } from "@tabler/icons-react";
|
||||
|
|
@ -48,7 +56,7 @@ export function SearchResultItem({
|
|||
>
|
||||
<Group wrap="nowrap" w="100%">
|
||||
<Center>
|
||||
<IconFile size={20} />
|
||||
<IconFile size={16} />
|
||||
</Center>
|
||||
|
||||
<div style={{ flex: 1 }}>
|
||||
|
|
@ -64,19 +72,19 @@ export function SearchResultItem({
|
|||
dangerouslySetInnerHTML={{
|
||||
__html: DOMPurify.sanitize(attachmentResult.highlight, {
|
||||
ALLOWED_TAGS: ["mark", "em", "strong", "b"],
|
||||
ALLOWED_ATTR: []
|
||||
ALLOWED_ATTR: [],
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Tooltip label={t("Download attachment")} withArrow>
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
color="gray"
|
||||
onClick={handleDownload}
|
||||
<Tooltip
|
||||
label={t("Download attachment")}
|
||||
zIndex={getDefaultZIndex("max")}
|
||||
withArrow
|
||||
>
|
||||
<ActionIcon variant="subtle" color="gray" onClick={handleDownload}>
|
||||
<IconDownload size={18} />
|
||||
</ActionIcon>
|
||||
</Tooltip>
|
||||
|
|
@ -115,7 +123,7 @@ export function SearchResultItem({
|
|||
dangerouslySetInnerHTML={{
|
||||
__html: DOMPurify.sanitize(pageResult.highlight, {
|
||||
ALLOWED_TAGS: ["mark", "em", "strong", "b"],
|
||||
ALLOWED_ATTR: []
|
||||
ALLOWED_ATTR: [],
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import { useDebouncedValue } from "@mantine/hooks";
|
|||
import { useGetSpacesQuery } from "@/features/space/queries/space-query";
|
||||
import { useLicense } from "@/ee/hooks/use-license";
|
||||
import classes from "./search-spotlight-filters.module.css";
|
||||
import { isCloud } from "@/lib/config.ts";
|
||||
|
||||
interface SearchSpotlightFiltersProps {
|
||||
onFiltersChange?: (filters: any) => void;
|
||||
|
|
@ -79,7 +80,7 @@ export function SearchSpotlightFilters({
|
|||
{
|
||||
value: "attachment",
|
||||
label: t("Attachments"),
|
||||
disabled: !hasLicenseKey,
|
||||
disabled: !isCloud() && !hasLicenseKey,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue