mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
Sharing dialog improvements (#3449)
This commit is contained in:
@@ -296,7 +296,7 @@ class GenerateShareLink extends React.Component {
|
||||
</Label>
|
||||
</FormGroup>
|
||||
{this.state.isShowPasswordInput &&
|
||||
<FormGroup className="link-operation-content">
|
||||
<FormGroup className="link-operation-content" check>
|
||||
{/* todo translate */}
|
||||
<Label className="font-weight-bold">{gettext('Password')}</Label>{' '}<span className="tip">{passwordLengthTip}</span>
|
||||
<InputGroup className="passwd">
|
||||
@@ -314,10 +314,16 @@ class GenerateShareLink extends React.Component {
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input className="expire-checkbox" type="checkbox" onChange={this.onExpireChecked}/>{' '}{gettext('Add auto expiration')}
|
||||
<Input className="expire-input" type="text" value={this.state.expireDays} onChange={this.onExpireDaysChanged} readOnly={!this.state.isExpireChecked}/><span>{gettext('days')}</span>
|
||||
</Label>
|
||||
</FormGroup>
|
||||
)}
|
||||
{this.state.isExpireChecked &&
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input className="expire-input expire-input-border" type="text" value={this.state.expireDays} onChange={this.onExpireDaysChanged} readOnly={!this.state.isExpireChecked}/><span className="expir-span">{gettext('days')}</span>
|
||||
</Label>
|
||||
</FormGroup>
|
||||
}
|
||||
{!this.isExpireDaysNoLimit && (
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
@@ -337,7 +343,7 @@ class GenerateShareLink extends React.Component {
|
||||
)}
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input type="checkbox" checked readOnly/>{' '}{gettext('Set permission')}
|
||||
<span>{' '}{gettext('Set permission')}</span>
|
||||
</Label>
|
||||
</FormGroup>
|
||||
<FormGroup check className="permission">
|
||||
@@ -346,7 +352,7 @@ class GenerateShareLink extends React.Component {
|
||||
</Label>
|
||||
</FormGroup>
|
||||
<FormGroup check className="permission">
|
||||
<Label check>
|
||||
<Label>
|
||||
<Input type="radio" name="radio1" onChange={() => this.setPermission('preview')} />{' '}{gettext('Preview only')}
|
||||
</Label>
|
||||
</FormGroup>
|
||||
|
@@ -44,7 +44,7 @@ class GenerateUploadLink extends React.Component {
|
||||
toaster.danger(
|
||||
<SessionExpiredTip />,
|
||||
{id: 'session_expired', duration: 3600}
|
||||
)
|
||||
);
|
||||
this.props.closeShareDialog();
|
||||
}
|
||||
});
|
||||
@@ -153,9 +153,6 @@ class GenerateUploadLink extends React.Component {
|
||||
}
|
||||
return (
|
||||
<Form className="generate-upload-link">
|
||||
<FormGroup>
|
||||
<FormText className="tip">{gettext('You can share the generated link to others and then they can upload files to this directory via the link.')}</FormText>
|
||||
</FormGroup>
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input type="checkbox" onChange={this.addPassword}/>{' '}{gettext('Add password protection')}
|
||||
|
@@ -62,7 +62,7 @@
|
||||
}
|
||||
|
||||
.generate-share-link .permission {
|
||||
margin-left: 1.25rem;
|
||||
margin-left: 2.5rem;
|
||||
}
|
||||
|
||||
.generate-link-btn {
|
||||
@@ -81,6 +81,30 @@ input.expire-input {
|
||||
margin: 0 0.25rem 0 1.25rem;
|
||||
}
|
||||
|
||||
.expire-input-border {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
height: 2.375rem!important;
|
||||
padding: 0.375rem 0.75rem!important;
|
||||
}
|
||||
|
||||
.share-dialog-main .permission-editor .permission-editor__menu {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.expir-span {
|
||||
border: 1px solid rgba(0, 40, 100, 0.12);
|
||||
border-left: none;
|
||||
font-size: 0.9375rem;
|
||||
margin-left: -5px;
|
||||
padding: 0px 8px;
|
||||
height: 2.375rem;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
min-width: 2.375rem;
|
||||
line-height: 2.25;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
Reference in New Issue
Block a user