feat(collections): move help button to the title area

This commit is contained in:
Elian Doran
2026-01-31 11:00:55 +02:00
parent 85a82124b1
commit fc756ba46e
3 changed files with 3 additions and 16 deletions

View File

@@ -47,7 +47,6 @@ export default function CollectionProperties({ note, centerChildren, rightChildr
</div>
<div className="right-container">
{rightChildren}
<HelpButton note={note} />
</div>
</div>
);
@@ -234,15 +233,3 @@ function CheckBoxPropertyView({ note, property }: { note: FNote, property: Check
/>
);
}
function HelpButton({ note }: { note: FNote }) {
const helpUrl = getHelpUrlForNote(note);
return (helpUrl && (
<ActionButton
icon="bx bx-help-circle"
onClick={(() => openInAppHelpFromUrl(helpUrl))}
text={t("help-button.title")}
/>
));
}

View File

@@ -234,9 +234,9 @@ function OpenTriliumApiDocsButton({ noteMime }: NoteActionsCustomInnerProps) {
/>;
}
function InAppHelpButton({ note, noteType }: NoteActionsCustomInnerProps) {
function InAppHelpButton({ note }: NoteActionsCustomInnerProps) {
const helpUrl = getHelpUrlForNote(note);
const isEnabled = !!helpUrl && (noteType !== "book");
const isEnabled = !!helpUrl;
return isEnabled && (
<ActionButton

View File

@@ -459,7 +459,7 @@ body.experimental-feature-new-layout {
gap: var(--button-gap);
&> button:last-of-type {
margin-right: 1em;
margin-right: 0.5em;
}
}
}