mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-10-13 13:58:05 +00:00

* clean up sidesheet * clean up sharing * add revisions sidesheet * update getCommits and clean up * update date localization * load diagram in read only mode from previous version * disable input from control panel and popovers * add restore warning modal * separate share and versions * update versions * finalize versioning implementation, add pagination * fix package-lock.json * clear versions cache on flush storgae * disable menubar items when in read only mode * disable remaining fields in readonlt * suppress eslint only-export-components rule * show loading version progress
30 lines
821 B
JavaScript
30 lines
821 B
JavaScript
import { useTranslation } from "react-i18next";
|
|
import { useUndoRedo } from "../../../hooks";
|
|
import { List } from "@douyinfe/semi-ui";
|
|
|
|
export default function Timeline() {
|
|
const { undoStack } = useUndoRedo();
|
|
const { t } = useTranslation();
|
|
|
|
if (undoStack.length > 0) {
|
|
return (
|
|
<List>
|
|
{[...undoStack].reverse().map((e, i) => (
|
|
<List.Item
|
|
key={i}
|
|
style={{ padding: "4px 18px 4px 18px" }}
|
|
className="hover-1"
|
|
>
|
|
<div className="flex items-center py-1 w-full">
|
|
<i className="block fa-regular fa-circle fa-xs" />
|
|
<div className="ms-2">{e.message}</div>
|
|
</div>
|
|
</List.Item>
|
|
))}
|
|
</List>
|
|
);
|
|
} else {
|
|
return <div className="m-5">{t("no_activity")}</div>;
|
|
}
|
|
}
|