1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00

12.0 redesign wiki list (#6155)

* 01 remove useless wiki codes

* 02 change delete wiki tip

* 03 fix code format

* 04 redesign wikis
This commit is contained in:
Michael An
2024-06-01 09:09:42 +08:00
committed by GitHub
parent 4b81908955
commit 80637c506c
21 changed files with 124 additions and 293 deletions

View File

@@ -105,12 +105,33 @@ class ChangeRepoPasswordDialog extends React.Component {
</ModalHeader>
<ModalBody>
<form id="repo-change-passwd-form" action="" method="post">
<label htmlFor="passwd">{gettext('Old Password')}</label><br />
<input type="password" name="old_passwd" className="form-control" id="passwd" value={this.state.oldPassword} onChange={this.handleOldPasswordInputChange} /><br />
<label htmlFor="new-passwd">{gettext('New Password')}</label><span className="tip">{gettext('(at least {placeholder} characters)').replace('{placeholder}', repoPasswordMinLength)}</span><br />
<input type="password" name="new_passwd" className="form-control" id="new-passwd" value={this.state.newPassword} onChange={this.handleNewPasswordInputChange} /><br />
<label htmlFor="new-passwd-again">{gettext('New Password Again')}</label><br />
<input type="password" name="new_passwd_again" className="form-control" id="new-passwd-again" value={this.state.newPasswordAgain} onChange={this.handleNewPasswordAgainInputChange} /><br />
<label htmlFor="passwd">{gettext('Old Password')}</label>
<br />
<input
type="password"
name="old_passwd"
className="form-control"
id="passwd"
value={this.state.oldPassword}
onChange={this.handleOldPasswordInputChange}
/>
<br />
<label htmlFor="new-passwd">{gettext('New Password')}</label>
<span className="tip">{gettext('(at least {placeholder} characters)').replace('{placeholder}', repoPasswordMinLength)}</span>
<br />
<input
type="password"
name="new_passwd"
className="form-control"
id="new-passwd"
value={this.state.newPassword}
onChange={this.handleNewPasswordInputChange}
/>
<br />
<label htmlFor="new-passwd-again">{gettext('New Password Again')}</label>
<br />
<input type="password" name="new_passwd_again" className="form-control" id="new-passwd-again" value={this.state.newPasswordAgain} onChange={this.handleNewPasswordAgainInputChange} />
<br />
{this.state.errorMsg && <Alert color="danger">{this.state.errorMsg}</Alert>}
</form>
</ModalBody>

View File

@@ -26,7 +26,7 @@ class Delete extends React.Component {
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}>{title}</ModalHeader>
<ModalBody>
<p>{gettext('Are you sure to delete')}{' '}<b>{name}</b> ?</p>
<p>{gettext('Are you sure you want to delete')}{' '}<b>{name}</b> ?</p>
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>

View File

@@ -7,17 +7,15 @@ const propTypes = {
toggleCancel: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
title: PropTypes.string.isRequired,
content: PropTypes.string.isRequired,
content: PropTypes.node.isRequired,
footer: PropTypes.string.isRequired,
};
function WikiDeleteDialog({ handleSubmit, toggleCancel, title, content, footer }) {
function DeleteWikiDialog({ handleSubmit, toggleCancel, title, content, footer }) {
return (
<Modal isOpen={true} toggle={toggleCancel}>
<ModalHeader toggle={toggleCancel}>{title}</ModalHeader>
<ModalBody>
<p>{content}</p>
</ModalBody>
<ModalBody>{content}</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={toggleCancel}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={handleSubmit}>{footer}</Button>
@@ -26,6 +24,6 @@ function WikiDeleteDialog({ handleSubmit, toggleCancel, title, content, footer }
);
}
WikiDeleteDialog.propTypes = propTypes;
DeleteWikiDialog.propTypes = propTypes;
export default WikiDeleteDialog;
export default DeleteWikiDialog;