1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 09:51:26 +00:00

Merge branch '7.0'

This commit is contained in:
plt
2019-06-25 12:00:42 +08:00
7 changed files with 32 additions and 24 deletions

View File

@@ -15921,9 +15921,9 @@
}
},
"seafile-js": {
"version": "0.2.93",
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.93.tgz",
"integrity": "sha512-5stGnu5LJZj2MoN9ABjh/iYBpQpF5skbxmXZH4w4Vb1GVeQOWFz7oGWe0pSMMZvKriXN6GNRHB0K1nkL+OFBAg==",
"version": "0.2.94",
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.94.tgz",
"integrity": "sha512-X7mYw2w9j4F/jSsy4g5LeigyqBZkKhvCf1y9OcKjhw/u4ZCqgztejjIKXVZwm18VtePOo4fxg5HooXn9pQoNUg==",
"requires": {
"axios": "^0.18.0",
"form-data": "^2.3.2",

View File

@@ -37,7 +37,7 @@
"react-responsive": "^6.1.1",
"react-select": "^2.4.1",
"reactstrap": "^6.4.0",
"seafile-js": "^0.2.93",
"seafile-js": "^0.2.94",
"socket.io-client": "^2.2.0",
"sw-precache-webpack-plugin": "0.11.4",
"unified": "^7.0.0",

View File

@@ -50,6 +50,10 @@ class CreateRepoDialog extends React.Component {
let password = this.state.encrypt ? this.state.password1 : '';
let permission= this.state.permission;
let repo = this.createRepo(repoName, password, permission);
if (this.props.libraryType === 'department') {
this.props.onCreateRepo(repo, 'department');
return;
}
this.props.onCreateRepo(repo);
}
}
@@ -150,6 +154,12 @@ class CreateRepoDialog extends React.Component {
permission: permission,
};
}
if (libraryType === 'department') {
repo = {
repo_name: repoName,
passwd: password,
};
}
return repo;
}

View File

@@ -68,8 +68,8 @@ class InternalLinkDialog extends React.Component {
</p>
</ModalBody>
<ModalFooter>
<Button color="primary" onClick={this.copyToClipBoard}>{gettext('Copy')}</Button>{' '}
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={this.copyToClipBoard}>{gettext('Copy')}</Button>
</ModalFooter>
</Modal>
</span>

View File

@@ -1,6 +1,16 @@
table tr .activity-date {
border-top: 0;
}
table td .activity-detail {
table .activity-detail {
word-break: break-word;
}
table .activity-detail div {
display: inline;
}
table .activity-detail span {
color: #888;
}
table .activity-detail span:hover {
color: #333;
text-decoration: underline;
}

View File

@@ -64,22 +64,9 @@ class ActivityItem extends Component {
super(props);
this.state = {
isListCreatedFiles: false,
active: false,
};
}
onMouseEnter = () => {
this.setState({
active: true
});
}
onMouseLeave = () => {
this.setState({
active: false
});
}
onListCreatedFilesToggle = () => {
this.setState({
isListCreatedFiles: !this.state.isListCreatedFiles,
@@ -142,9 +129,9 @@ class ActivityItem extends Component {
firstLine = firstLine.replace('{n}', fileCount);
op = gettext('Created {n} files').replace('{n}', item.createdFilesCount);
details =
<td>
<div className="activity-detail" dangerouslySetInnerHTML={{__html: firstLine}}></div>{' '}
{this.state.active && <i className="attr-action-icon fas fa-eye" onClick={this.onListCreatedFilesToggle}></i>}
<td className="activity-detail">
<div dangerouslySetInnerHTML={{__html: firstLine}}></div>{' '}
<span onClick={this.onListCreatedFilesToggle} className="cursor-pointer">{gettext('details')}</span>
<br />{smallLibLink}
</td>;
} else if (item.obj_type == 'file') {
@@ -239,7 +226,7 @@ class ActivityItem extends Component {
<td colSpan='5' className="activity-date">{moment(item.time).format('YYYY-MM-DD')}</td>
</tr>
}
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<tr>
<td className="text-center">
<img src={item.avatar_url} alt="" width="36px" height="36px" className="avatar" />
</td>

View File

@@ -496,10 +496,11 @@ class GroupView extends React.Component {
</ModalPortal>
)}
{this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup &&
<CreateDepartmentRepoDialog
<CreateRepoDialog
isAdmin={this.state.isAdmin}
onCreateToggle={this.onCreateRepoToggle}
onCreateRepo={this.onCreateRepo}
libraryType='department'
/>
}
{this.state.showRenameGroupDialog &&