mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
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:
39
ui/v2.5/src/components/Dialogs/ReleaseNotesDialog.tsx
Normal file
39
ui/v2.5/src/components/Dialogs/ReleaseNotesDialog.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user