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

Fix search input UI (#5769)

* fix code warnings

* change search UI
This commit is contained in:
Michael An
2023-11-15 15:39:47 +08:00
committed by GitHub
parent c5e9bb9d8f
commit 4e5c6fa98a
5 changed files with 57 additions and 26 deletions

View File

@@ -1037,14 +1037,12 @@ class LibContentView extends React.Component {
seafileAPI.renameFile(repoID, path, newName).then(() => {
this.renameItemAjaxCallback(path, newName);
}).catch((error) => {
let errMessage = "";
let errMessage = '';
if (error.response.status == 403 && error.response.data && error.response.data['error_msg']) {
errMessage = error.response.data['error_msg'];
} else {
errMessage = Utils.getErrorMsg(error);
}
}
if (errMessage === gettext('Error')) {
let name = Utils.getFileName(path);
errMessage = gettext('Renaming {name} failed').replace('{name}', name);