chore(mobile): address requested changes
Some checks are pending
Checks / main (push) Waiting to run

This commit is contained in:
Elian Doran 2026-02-05 22:25:01 +02:00
parent a2921cb982
commit 8a7bcc316e
No known key found for this signature in database
4 changed files with 9 additions and 8 deletions

View File

@ -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 (
!bookmarkFolder

View File

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

View File

@ -194,7 +194,7 @@ function NoteInfoModal({ note, modalShown, setModalShown }: { note: FNote | null
show={modalShown}
onHidden={() => setModalShown(false)}
>
{note && <NoteInfoContent note={note} noteType={note.type} />}
{note && <NoteInfoContent note={note} noteType={note.type} />}
</Modal>
);
}

View File

@ -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<TabCon
dropdownContainerClassName="mobile-bottom-menu" mobileBackdrop
noSelectButtonStyle
>
{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>