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:
@@ -1309,5 +1309,6 @@
|
||||
"Read-only mode": "Read-only mode",
|
||||
"AI Chat can search and read workspace content, but cannot create or edit pages.": "AI Chat can search and read workspace content, but cannot create or edit pages.",
|
||||
"Toggle AI Chat read-only mode": "Toggle AI Chat read-only mode",
|
||||
"Title only": "Title only"
|
||||
"Title only": "Title only",
|
||||
"File name only": "File name only"
|
||||
}
|
||||
|
||||
@@ -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