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(mobile): address requested changes
Elian Doran8a7bcc316ea3
diff --git a/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx b/apps/client/src/widgets/launch_bar/BookmarkButtons.tsxindex 48bcc867f4..81f2c6e878 100644--- a/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx+++ b/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx@@ -57,7 +57,7 @@ function SingleBookmark({ note }: { note: FNote }) {function MobileBookmarkItem({ noteId, bookmarkFolder }: { noteId: string, bookmarkFolder: boolean }) {const note = useNote(noteId);const noteIcon = useNoteIcon(note);- if (!note) return;+ if (!note) return null;return (!bookmarkFolderdiff --git a/apps/client/src/widgets/layout/NoteTitleActions.tsx b/apps/client/src/widgets/layout/NoteTitleActions.tsxindex c11b690b51..73ad3e0e89 100644--- a/apps/client/src/widgets/layout/NoteTitleActions.tsx+++ b/apps/client/src/widgets/layout/NoteTitleActions.tsx@@ -23,7 +23,7 @@ export default function NoteTitleActions() {<PromotedAttributes note={note} componentId={componentId} noteContext={noteContext} />{noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />}<EditedNotes />- {!viewScope?.viewMode || viewScope.viewMode === "default" && <NoteTypeSwitcher />}+ {(!viewScope?.viewMode || viewScope.viewMode === "default") && <NoteTypeSwitcher />}</div>);}diff --git a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsxindex 2aa527feaa..909d3b6288 100644--- a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx+++ b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx@@ -194,7 +194,7 @@ function NoteInfoModal({ note, modalShown, setModalShown }: { note: FNote | nullshow={modalShown}onHidden={() => setModalShown(false)}>- {note && <NoteInfoContent note={note} noteType={note.type} />}+ {note && <NoteInfoContent note={note} noteType={note.type} />}</Modal>);}diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsxindex d3f974ce9c..2d58fc1913 100644--- a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx+++ b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx@@ -87,9 +87,10 @@ export default function SearchDefinitionTab({ note, ntxId, hidden }: Pick<TabCon<td className="title-column">{t("search_definition.add_search_option")}</td><td colSpan={2} className="add-search-option"><ResponsiveContainer- desktop={searchOptions?.availableOptions.map(({ icon, label, tooltip, attributeName, attributeType, defaultValue }, index) => (+ desktop={searchOptions?.availableOptions.map(({ icon, label, tooltip, attributeName, attributeType, defaultValue }) => (<Button- key={index} size="small" icon={icon} text={label} title={tooltip}+ key={`${attributeType}-${attributeName}`}+ size="small" icon={icon} text={label} title={tooltip}onClick={() => attributes.setAttribute(note, attributeType, attributeName, defaultValue ?? "")}/>))}@@ -100,9 +101,10 @@ export default function SearchDefinitionTab({ note, ntxId, hidden }: Pick<TabCondropdownContainerClassName="mobile-bottom-menu" mobileBackdropnoSelectButtonStyle>- {searchOptions?.availableOptions.map(({ icon, label, tooltip, attributeName, attributeType, defaultValue }, index) => (+ {searchOptions?.availableOptions.map(({ icon, label, tooltip, attributeName, attributeType, defaultValue }) => (<FormListItem- key={index} icon={icon}+ key={`${attributeType}-${attributeName}`}+ icon={icon}description={tooltip}onClick={() => attributes.setAttribute(note, attributeType, attributeName, defaultValue ?? "")}>{label}</FormListItem>@@ -111,7 +113,6 @@ export default function SearchDefinitionTab({ note, ntxId, hidden }: Pick<TabCon}/>-<AddBulkActionButton note={note} /></td></tr>