1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00
* [create repo] fixup for 'template'

* [auto deletion] fixup

* [file upload] fixup

* fixup
This commit is contained in:
llj
2020-12-17 18:03:21 +08:00
committed by GitHub
parent c0e40076d4
commit c5f5051cea
4 changed files with 16 additions and 16 deletions

View File

@@ -191,6 +191,19 @@ class CreateRepoDialog extends React.Component {
onChange={this.handleRepoNameChange}
/>
</FormGroup>
{libraryTemplates.length > 0 && (
<FormGroup>
<Label for="library-template">{gettext('Template')}</Label>
<Select
id="library-template"
defaultValue={{value: libraryTemplates[0], label: libraryTemplates[0]}}
options={libraryTemplates.map((item, index) => { return {value: item, label: item}; })}
onChange={this.handlelibraryTemplatesInputChange}
/>
</FormGroup>
)}
{storages.length > 0 && (
<FormGroup>
<Label for="storage-backend">{gettext('Storage Backend')}</Label>
@@ -203,18 +216,6 @@ class CreateRepoDialog extends React.Component {
</FormGroup>
)}
{libraryTemplates.length > 0 && (
<FormGroup>
<Label for="library-templates">{gettext('Library Templates')}</Label>
<Select
id="library-templates"
defaultValue={{value: libraryTemplates[0], label: libraryTemplates[0]}}
options={libraryTemplates.map((item, index) => { return {value: item, label: item}; })}
onChange={this.handlelibraryTemplatesInputChange}
/>
</FormGroup>
)}
{this.props.libraryType === 'group' && (
<FormGroup>
<Label for="exampleSelect">{gettext('Permission')}</Label>

View File

@@ -52,10 +52,9 @@ class LibOldFilesAutoDelDialog extends React.Component {
let repoID = this.props.repoID;
let message = gettext('Library old files auto delete days setted.');
seafileAPI.setRepoOldFilesAutoDelDays(repoID, daysNeedTobeSet).then(res => {
toaster.success(message);
this.props.toggleDialog();
toaster.success(gettext('Successfully set it.'));
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);

View File

@@ -390,7 +390,7 @@ class FileUploader extends React.Component {
getFileServerErrorMessage = (key) => {
const errorMessage = {
'File locked by others.': gettext('File locked by others.'), // 403
'File locked by others.': gettext('File is locked by others.'), // 403
'Invalid filename.': gettext('Invalid filename.'), // 440
'File already exists.': gettext('File already exists.'), // 441
'File size is too large.': gettext('File size is too large.'), // 442