642c11ff7d
* WIP: Archive * WIP * Finishing up archive endpoints * WIP * Update docs * Flow * Stash * Add toast message confirmations * Redirect handling, fixed publishhing info for archived docs * Redirect to collection instead of home, remove unused pub info * Account for deleted parent * Trash -> Archive Allow reading of archived docs * Dont overload deletedAt * Fixes * 💚 * ParentDocumentId wipe for unarchived sub docs * Fix: CMD+S exits editing Fix: Duplicate user name on published but unedited docs * Improve jank on paginated lists * Prevent editing when archived * 💚 Separate lint / flow steps
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import { observer, inject } from 'mobx-react';
|
|
|
|
import CenteredContent from 'components/CenteredContent';
|
|
import Empty from 'components/Empty';
|
|
import PageTitle from 'components/PageTitle';
|
|
import Heading from 'components/Heading';
|
|
import PaginatedDocumentList from 'components/PaginatedDocumentList';
|
|
import Subheading from 'components/Subheading';
|
|
import DocumentsStore from 'stores/DocumentsStore';
|
|
|
|
type Props = {
|
|
documents: DocumentsStore,
|
|
};
|
|
|
|
@observer
|
|
class Archive extends React.Component<Props> {
|
|
render() {
|
|
const { documents } = this.props;
|
|
|
|
return (
|
|
<CenteredContent column auto>
|
|
<PageTitle title="Archive" />
|
|
<Heading>Archive</Heading>
|
|
<PaginatedDocumentList
|
|
documents={documents.archived}
|
|
fetch={documents.fetchArchived}
|
|
heading={<Subheading>Documents</Subheading>}
|
|
empty={<Empty>The document archive is empty at the moment.</Empty>}
|
|
showCollection
|
|
/>
|
|
</CenteredContent>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default inject('documents')(Archive);
|