1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 01:44:13 +00:00

12.0 change wiki style (#6152)

* 01 change delete Wiki tip

* 02 remove modify time when wiki init
This commit is contained in:
Michael An
2024-05-31 16:12:53 +08:00
committed by GitHub
parent 7ea5517e40
commit 4b81908955
6 changed files with 40 additions and 127 deletions

View File

@@ -6,28 +6,24 @@ import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
const propTypes = {
toggleCancel: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
title: PropTypes.string.isRequired,
content: PropTypes.string.isRequired,
footer: PropTypes.string.isRequired,
};
class WikiDeleteDialog extends React.Component {
toggle = () => {
this.props.toggleCancel();
};
render() {
return (
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}>{gettext('Unpublish Library')}</ModalHeader>
<ModalBody>
<p>{gettext('Are you sure you want to unpublish this library?')}</p>
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={this.props.handleSubmit}>{gettext('Unpublish')}</Button>
</ModalFooter>
</Modal>
);
}
function WikiDeleteDialog({ handleSubmit, toggleCancel, title, content, footer }) {
return (
<Modal isOpen={true} toggle={toggleCancel}>
<ModalHeader toggle={toggleCancel}>{title}</ModalHeader>
<ModalBody>
<p>{content}</p>
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={toggleCancel}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={handleSubmit}>{footer}</Button>
</ModalFooter>
</Modal>
);
}
WikiDeleteDialog.propTypes = propTypes;