diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx
index 44c9c675e..9ced53a6d 100644
--- a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx
+++ b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx
@@ -19,6 +19,7 @@ import ws from "../../services/ws";
import tree from "../../services/tree";
import NoteAutocomplete from "../react/NoteAutocomplete";
import FormSelect from "../react/FormSelect";
+import Icon from "../react/Icon";
interface SearchOption {
attributeName: string;
@@ -68,7 +69,8 @@ const SEARCH_OPTIONS: SearchOption[] = [
attributeType: "label",
icon: "bx bx-run",
label: t("search_definition.fast_search"),
- tooltip: t("search_definition.fast_search_description")
+ tooltip: t("search_definition.fast_search_description"),
+ component: FastSearchOption
},
{
attributeName: "includeArchivedNotes",
@@ -235,10 +237,11 @@ export default function SearchDefinitionTab({ note, ntxId }: TabContext) {
)
}
-function SearchOption({ note, title, children, help, attributeName, attributeType, additionalAttributesToDelete }: {
+function SearchOption({ note, title, titleIcon, children, help, attributeName, attributeType, additionalAttributesToDelete }: {
note: FNote;
title: string,
- children: ComponentChildren,
+ titleIcon: string,
+ children?: ComponentChildren,
help: ComponentChildren,
attributeName: string,
attributeType: AttributeType,
@@ -246,7 +249,10 @@ function SearchOption({ note, title, children, help, attributeName, attributeTyp
}) {
return (
- | {title} |
+
+ {titleIcon && <>{" "}>}
+ {title}
+ |
{children} |
{help && {help}}
@@ -402,4 +408,13 @@ function AncestorOption({ note, ...restProps}: SearchOptionProps) {
/>
;
+}
+
+function FastSearchOption({ ...restProps }: SearchOptionProps) {
+ return
}
\ No newline at end of file
diff --git a/apps/client/src/widgets/search_options/fast_search.ts b/apps/client/src/widgets/search_options/fast_search.ts
deleted file mode 100644
index 7b77b1ca8..000000000
--- a/apps/client/src/widgets/search_options/fast_search.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import AbstractSearchOption from "./abstract_search_option.js";
-import { t } from "../../services/i18n.js";
-
-const TPL = /*html*/`
- |
- |
-
- ${t("fast_search.fast_search")}
- |
-
-
-
-
-
-
- |
-
`;
-
-export default class FastSearch extends AbstractSearchOption {
-
- static async create(noteId: string) {
- await AbstractSearchOption.setAttribute(noteId, "label", "fastSearch");
- }
-
- doRender() {
- return $(TPL);
- }
-}
diff --git a/apps/server/src/services/i18n.ts b/apps/server/src/services/i18n.ts
index c849ecc5a..4344f462f 100644
--- a/apps/server/src/services/i18n.ts
+++ b/apps/server/src/services/i18n.ts
@@ -18,7 +18,7 @@ const DAYJS_LOADER: Record Promise import("dayjs/locale/he.js"),
"ja": () => import("dayjs/locale/ja.js"),
"ku": () => import("dayjs/locale/ku.js"),
- "pt_BR": () => import("dayjs/locale/pt_BR.js"),
+ "pt_BR": () => import("dayjs/locale/pt-BR.js"),
"ro": () => import("dayjs/locale/ro.js"),
"ru": () => import("dayjs/locale/ru.js"),
"tw": () => import("dayjs/locale/zh-tw.js"),