mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 03:32:06 +10:00
fix
This commit is contained in:
@ -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";
|
||||
@ -24,7 +32,7 @@ export function SearchResultItem({
|
||||
showSpace,
|
||||
}: SearchResultItemProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
||||
if (isAttachmentResult) {
|
||||
const attachmentResult = result as IAttachmentSearch;
|
||||
|
||||
@ -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,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user