mirror of
https://github.com/docmost/docmost.git
synced 2026-08-25 15:57:11 +08:00
feat: extend title-only search to attachments
The titleOnly flag now matches attachment file names via the separator-normalized trigram expression, and the toggle chip stays available in attachment mode as File name only.
This commit is contained in:
@@ -255,7 +255,7 @@ export function SearchSpotlightFilters({
|
||||
</Menu.Dropdown>
|
||||
</Menu>
|
||||
|
||||
{contentType !== "attachment" && !isAiMode && (
|
||||
{!isAiMode && (
|
||||
<Button
|
||||
variant={titleOnly ? "light" : "subtle"}
|
||||
color={titleOnly ? "blue" : "gray"}
|
||||
@@ -270,7 +270,9 @@ export function SearchSpotlightFilters({
|
||||
aria-pressed={titleOnly}
|
||||
onClick={() => setTitleOnly(!titleOnly)}
|
||||
>
|
||||
{t("Title only")}
|
||||
{contentType === "attachment"
|
||||
? t("File name only")
|
||||
: t("Title only")}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user