chore(react/ribbon): port revisions button

This commit is contained in:
Elian Doran
2025-08-24 22:56:47 +03:00
parent d85746c1b9
commit f91c1f4180
4 changed files with 38 additions and 16 deletions

View File

@@ -0,0 +1,28 @@
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"
/>
)
}