chore(react/ribbon): port include archived notes

This commit is contained in:
Elian Doran 2025-08-24 18:11:29 +03:00
parent 68cba8d3b2
commit 2fd3a875b6
No known key found for this signature in database
2 changed files with 9 additions and 25 deletions

View File

@ -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}
/>
}

View File

@ -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);
}
}