mirror of
https://github.com/zadam/trilium.git
synced 2026-07-12 18:11:58 +02:00
feat(collections): move help button to the title area
This commit is contained in:
@@ -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")}
|
||||
/>
|
||||
));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -459,7 +459,7 @@ body.experimental-feature-new-layout {
|
||||
gap: var(--button-gap);
|
||||
|
||||
&> button:last-of-type {
|
||||
margin-right: 1em;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user