mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 14:21:23 +00:00
[lib decrypt] redesigned it
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Button, Modal, Input, ModalBody, Form, FormGroup } from 'reactstrap';
|
import { Button, Modal, Input, ModalBody, Form, FormGroup } from 'reactstrap';
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot, mediaUrl } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
|
|
||||||
|
import '../../css/lib-decrypt.css';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
repoID: PropTypes.string.isRequired,
|
repoID: PropTypes.string.isRequired,
|
||||||
onLibDecryptDialog: PropTypes.func.isRequired
|
onLibDecryptDialog: PropTypes.func.isRequired
|
||||||
@@ -56,17 +58,13 @@ class LibDecryptDialog extends React.Component {
|
|||||||
<ModalBody>
|
<ModalBody>
|
||||||
<button type="button" className="close" onClick={this.toggle}><span aria-hidden="true">×</span></button>
|
<button type="button" className="close" onClick={this.toggle}><span aria-hidden="true">×</span></button>
|
||||||
<Form className="lib-decrypt-form text-center">
|
<Form className="lib-decrypt-form text-center">
|
||||||
<img src={siteRoot + 'media/img/lock.png'} alt=""/>
|
<img src={`${mediaUrl}img/lock.png`} alt="" aria-hidden="true" />
|
||||||
<p>{gettext('This library is password protected')}</p>
|
<p className="intro">{gettext('This library is password protected')}</p>
|
||||||
{this.state.showError &&
|
{this.state.showError &&
|
||||||
<p className="error">{gettext('Wrong password')}</p>
|
<p className="error">{gettext('Wrong password')}</p>
|
||||||
}
|
}
|
||||||
<FormGroup>
|
<input type="password" name="password" className="form-control password-input" autoComplete="off" onKeyPress={this.handleKeyPress} placeholder={gettext('Password')} onChange={this.handleChange} />
|
||||||
<Input type="password" name="password" onKeyPress={this.handleKeyPress} placeholder={gettext('Password')} onChange={this.handleChange}/>
|
<button type="submit" className="btn btn-block btn-secondary submit" onClick={this.handleSubmit}>{gettext('Submit')}</button>
|
||||||
</FormGroup>
|
|
||||||
<FormGroup>
|
|
||||||
<Button type="submit" value="Submit" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
|
||||||
</FormGroup>
|
|
||||||
<p className="tip">{'* '}{gettext('The password will be kept in the server for only 1 hour.')}</p>
|
<p className="tip">{'* '}{gettext('The password will be kept in the server for only 1 hour.')}</p>
|
||||||
</Form>
|
</Form>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
19
frontend/src/css/lib-decrypt.css
Normal file
19
frontend/src/css/lib-decrypt.css
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
.lib-decrypt-form .intro {
|
||||||
|
color: #464646;
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
.lib-decrypt-form .password-input {
|
||||||
|
width: 50%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.lib-decrypt-form .submit {
|
||||||
|
width: 50%;
|
||||||
|
margin: 1.5em auto 1em;
|
||||||
|
background: -webkit-linear-gradient(top, #fafafb, #eeeeee);
|
||||||
|
background: -moz-linear-gradient(top, #fafafb, #eeeeee);
|
||||||
|
background: linear-gradient(top, #fafafb, #eeeeee);
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.lib-decrypt-form .submit:hover {
|
||||||
|
background: #fff;
|
||||||
|
}
|
Reference in New Issue
Block a user