import "./ReadOnlyNoteInfoBar.css"; import { t } from "../services/i18n"; import { useIsNoteReadOnly, useNoteContext, useTriliumEvent } from "./react/hooks" import Button from "./react/Button"; import InfoBar from "./react/InfoBar"; import HelpButton from "./react/HelpButton"; export default function ReadOnlyNoteInfoBar(props: {}) { const { note, noteContext } = useNoteContext(); const { isReadOnly, enableEditing } = useIsNoteReadOnly(note, noteContext); const isExplicitReadOnly = note?.isLabelTruthy("readOnly"); return (
{(isExplicitReadOnly) ? (
{t("read-only-info.read-only-note")}
) : (
{t("read-only-info.auto-read-only-note")} {" "}
)}
); }