Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(react/ribbon): port include archived notes
Elian Doran2fd3a875b611
diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsxindex 89f62be73b..dffd1b0240 100644--- a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx+++ b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx@@ -77,7 +77,8 @@ const SEARCH_OPTIONS: SearchOption[] = [attributeType: "label",icon: "bx bx-archive",label: t("search_definition.include_archived"),- tooltip: t("search_definition.include_archived_notes_description")+ tooltip: t("search_definition.include_archived_notes_description"),+ component: IncludeArchivedNotesOption},{attributeName: "orderBy",@@ -428,4 +429,11 @@ function DebugOption({ ...restProps }: SearchOptionProps) {</>}{...restProps}/>+}++function IncludeArchivedNotesOption({ ...restProps }: SearchOptionProps) {+ return <SearchOption+ titleIcon="bx bx-archive" title={t("include_archived_notes.include_archived_notes")}+ {...restProps}+ />}\ No newline at end of filediff --git a/apps/client/src/widgets/search_options/include_archived_notes.ts b/apps/client/src/widgets/search_options/include_archived_notes.tsdeleted file mode 100644index 98f33f4d6d..0000000000--- a/apps/client/src/widgets/search_options/include_archived_notes.ts+++ /dev/null@@ -1,24 +0,0 @@-import AbstractSearchOption from "./abstract_search_option.js";-import { t } from "../../services/i18n.js";--const TPL = /*html*/`-<tr data-search-option-conf="includeArchivedNotes">- <td colspan="2">- <span class="bx bx-archive"></span>- ${t("include_archived_notes.include_archived_notes")}- </td>- <td class="button-column">- <span class="bx bx-x icon-action search-option-del"></span>- </td>-</tr>`;--export default class IncludeArchivedNotes extends AbstractSearchOption {-- static async create(noteId: string) {- await AbstractSearchOption.setAttribute(noteId, "label", "includeArchivedNotes");- }-- doRender() {- return $(TPL);- }-}