Release notes dialog (#2726)

* Move manual docs
* Move changelog docs
* Add migration notes
* Move changelog to settings
* Add release notes dialog
* Add new changelog
This commit is contained in:
WithoutPants
2022-07-13 12:57:53 +10:00
parent 964b559309
commit 30877c75fb
59 changed files with 229 additions and 57 deletions

View File

@@ -0,0 +1,39 @@
import React from "react";
import { Form } from "react-bootstrap";
import { Modal } from "src/components/Shared";
import { faCogs } from "@fortawesome/free-solid-svg-icons";
import { useIntl } from "react-intl";
import { MarkdownPage } from "../Shared/MarkdownPage";
import { Module } from "src/docs/en/ReleaseNotes";
interface IReleaseNotesDialog {
notes: Module[];
onClose: () => void;
}
export const ReleaseNotesDialog: React.FC<IReleaseNotesDialog> = ({
notes,
onClose,
}) => {
const intl = useIntl();
return (
<Modal
show
icon={faCogs}
header={intl.formatMessage({ id: "release_notes" })}
accept={{
onClick: onClose,
text: intl.formatMessage({ id: "actions.close" }),
}}
>
<Form>
{notes.map((n, i) => (
<MarkdownPage page={n} key={i} />
))}
</Form>
</Modal>
);
};
export default ReleaseNotesDialog;