mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
28 lines
633 B
TypeScript
28 lines
633 B
TypeScript
|
|
import FNote from "../../entities/fnote"
|
||
|
|
import { t } from "../../services/i18n"
|
||
|
|
import ActionButton from "../react/ActionButton"
|
||
|
|
|
||
|
|
interface NoteActionsProps {
|
||
|
|
note?: FNote;
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function NoteActions(props: NoteActionsProps) {
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
<RevisionsButton {...props} />
|
||
|
|
</>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
function RevisionsButton({ note }: NoteActionsProps) {
|
||
|
|
const isEnabled = !["launcher", "doc"].includes(note?.type ?? "");
|
||
|
|
|
||
|
|
return (isEnabled &&
|
||
|
|
<ActionButton
|
||
|
|
icon="bx bx-history"
|
||
|
|
text={t("revisions_button.note_revisions")}
|
||
|
|
triggerCommand="showRevisions"
|
||
|
|
titlePosition="bottom"
|
||
|
|
/>
|
||
|
|
)
|
||
|
|
}
|