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

Merge branch '7.0'

This commit is contained in:
plt
2019-07-04 18:30:31 +08:00
96 changed files with 4464 additions and 4080 deletions

View File

@@ -734,6 +734,23 @@ export const Utils = {
return items;
},
/*
* only used in the 'catch' part of a seafileAPI request
*/
getErrorMsg: function(error) {
let errorMsg = '';
if (error.response) {
if (error.response.data && error.response.data['error_msg']) {
errorMsg = error.response.data['error_msg'];
} else {
errorMsg = gettext('Error');
}
} else {
errorMsg = gettext('Please check the network.');
}
return errorMsg;
},
changeMarkdownNodes: function(nodes, fn) {
nodes.map((item) => {
fn(item);