import React from "react"; import { observer } from "mobx-react"; import { formatDateTimeLong } from "eez-studio-shared/util"; import { beginTransaction, commitTransaction } from "eez-studio-shared/store"; import { Balloon } from "eez-studio-ui/balloon"; import { PropertyList, StaticRichTextProperty } from "eez-studio-ui/properties"; import { Toolbar } from "eez-studio-ui/toolbar"; import { IconAction } from "eez-studio-ui/action"; import { logUpdate } from "instrument/window/history/activity-log"; import { showEditNoteDialog } from "instrument/window/note-dialog"; import type { IAppStore } from "instrument/window/history/history"; import { HistoryItem } from "instrument/window/history/item"; import { PreventDraggable } from "instrument/window/history/helper"; import { HistoryItemInstrumentInfo } from "../HistoryItemInstrumentInfo"; //////////////////////////////////////////////////////////////////////////////// export const NoteHistoryItemComponent = observer( class NoteHistoryItemComponent extends React.Component< { appStore: IAppStore; historyItem: NoteHistoryItem; }, {} > { handleEditNote = () => { showEditNoteDialog(this.props.historyItem.message, note => { beginTransaction("Edit note"); logUpdate( this.props.appStore.history.options.store, { id: this.props.historyItem.id, oid: this.props.appStore.history.oid, message: note }, { undoable: true } ); commitTransaction(); }); }; render() { return (