From fe2f36adae5450db056ccd2427112a2d0e8ba3af Mon Sep 17 00:00:00 2001
From: zxj96 <519213124@qq.com>
Date: Mon, 24 Jun 2019 17:01:14 +0800
Subject: [PATCH 1/5] Encryption options are supported when creating
departmental repositories
---
frontend/src/components/dialog/create-repo-dialog.js | 11 +++++++++++
frontend/src/pages/groups/group-view.js | 3 ++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/frontend/src/components/dialog/create-repo-dialog.js b/frontend/src/components/dialog/create-repo-dialog.js
index 6fee61977a..ce1959cc94 100644
--- a/frontend/src/components/dialog/create-repo-dialog.js
+++ b/frontend/src/components/dialog/create-repo-dialog.js
@@ -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,13 @@ class CreateRepoDialog extends React.Component {
permission: permission,
};
}
+ if (libraryType === 'department') {
+ repo = {
+ repo_name: repoName,
+ passwd: password,
+ permission: 'rw',
+ };
+ }
return repo;
}
diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js
index d7c2e3359e..b59f531913 100644
--- a/frontend/src/pages/groups/group-view.js
+++ b/frontend/src/pages/groups/group-view.js
@@ -496,10 +496,11 @@ class GroupView extends React.Component {
)}
{this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup &&
-
}
{this.state.showRenameGroupDialog &&
From b7bf1d4e998356f7b674375d4086410abe1509f7 Mon Sep 17 00:00:00 2001
From: zxj96 <519213124@qq.com>
Date: Tue, 25 Jun 2019 09:54:03 +0800
Subject: [PATCH 2/5] Update new version
---
frontend/package-lock.json | 6 +++---
frontend/package.json | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index db1544ad46..cbc0b9e7c7 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -13361,9 +13361,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",
diff --git a/frontend/package.json b/frontend/package.json
index b36f793489..abc72c2bfd 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -38,7 +38,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",
From 26005cbe83af27251adcbc52bec33043e678ede9 Mon Sep 17 00:00:00 2001
From: zxj96 <519213124@qq.com>
Date: Tue, 25 Jun 2019 09:55:50 +0800
Subject: [PATCH 3/5] delete permission
---
frontend/src/components/dialog/create-repo-dialog.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/frontend/src/components/dialog/create-repo-dialog.js b/frontend/src/components/dialog/create-repo-dialog.js
index ce1959cc94..410b263e6c 100644
--- a/frontend/src/components/dialog/create-repo-dialog.js
+++ b/frontend/src/components/dialog/create-repo-dialog.js
@@ -158,7 +158,6 @@ class CreateRepoDialog extends React.Component {
repo = {
repo_name: repoName,
passwd: password,
- permission: 'rw',
};
}
return repo;
From 621c26b56e2f2813d1080f40b4bdb21e1fd93f95 Mon Sep 17 00:00:00 2001
From: Michael An <1822852997@qq.com>
Date: Tue, 25 Jun 2019 10:45:10 +0800
Subject: [PATCH 4/5] change activity icon
---
frontend/src/css/files-activities.css | 12 ++++++++++-
.../src/pages/dashboard/files-activities.js | 21 ++++---------------
2 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/frontend/src/css/files-activities.css b/frontend/src/css/files-activities.css
index b83fddccdb..9a409343d7 100644
--- a/frontend/src/css/files-activities.css
+++ b/frontend/src/css/files-activities.css
@@ -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;
}
\ No newline at end of file
diff --git a/frontend/src/pages/dashboard/files-activities.js b/frontend/src/pages/dashboard/files-activities.js
index 0752e593f2..a462aca577 100644
--- a/frontend/src/pages/dashboard/files-activities.js
+++ b/frontend/src/pages/dashboard/files-activities.js
@@ -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 =
-
- {' '}
- {this.state.active && }
+ |
+ {' '}
+ {gettext('details')}
{smallLibLink}
| ;
} else if (item.obj_type == 'file') {
@@ -239,7 +226,7 @@ class ActivityItem extends Component {
{moment(item.time).format('YYYY-MM-DD')} |
}
-
+
|
From 259abceda56071883a518067c5a1d676dad2aaa7 Mon Sep 17 00:00:00 2001
From: zxj96 <519213124@qq.com>
Date: Tue, 25 Jun 2019 11:53:43 +0800
Subject: [PATCH 5/5] alignment position
---
frontend/src/components/dialog/internal-link-dialog.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/components/dialog/internal-link-dialog.js b/frontend/src/components/dialog/internal-link-dialog.js
index 368a967801..a72d7d5620 100644
--- a/frontend/src/components/dialog/internal-link-dialog.js
+++ b/frontend/src/components/dialog/internal-link-dialog.js
@@ -68,8 +68,8 @@ class InternalLinkDialog extends React.Component {
- {' '}
+