From d0faafbfbaf92528fce5420cd93aed74d645ef83 Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Mon, 1 Jul 2024 18:33:57 +0800 Subject: [PATCH] 12.0 change some icons (#6278) * 01 history back icon * 02 change download icons * 03 fix code format * 04 change copy icons * 05 tree icon more color * change icon --- .../dirent-list-view/dirent-list-item.js | 4 ++-- .../src/components/share-link-panel/link-item.js | 6 +++--- frontend/src/components/tree-section/index.css | 5 ----- frontend/src/css/file-history.css | 4 ++++ frontend/src/file-history-old.js | 14 +++++++------- frontend/src/metadata/api.js | 4 ++-- frontend/src/pages/institution-admin/api/index.js | 4 ++-- frontend/src/pages/share-admin/share-links.js | 4 ++-- frontend/src/pages/share-admin/upload-links.js | 4 ++-- .../src/pages/share-with-ocm/remote-dir-content.js | 2 +- frontend/src/pages/sys-admin/repos/dir-content.js | 2 +- frontend/src/utils/search-api.js | 4 ++-- frontend/src/utils/system-admin-api.js | 4 ++-- frontend/src/utils/utils.js | 4 ++-- frontend/src/utils/wiki-api.js | 4 ++-- 15 files changed, 34 insertions(+), 35 deletions(-) diff --git a/frontend/src/components/dirent-list-view/dirent-list-item.js b/frontend/src/components/dirent-list-view/dirent-list-item.js index 2ee731025b..761d7e710c 100644 --- a/frontend/src/components/dirent-list-view/dirent-list-item.js +++ b/frontend/src/components/dirent-list-view/dirent-list-item.js @@ -634,7 +634,7 @@ class DirentListItem extends React.Component { {this.state.isOperationShow && !dirent.isSelected &&
{(dirent.permission === 'rw' || dirent.permission === 'r' || (isCustomPermission && canDownload)) && ( - + )} {showShareBtn && ( @@ -657,7 +657,7 @@ class DirentListItem extends React.Component { {this.state.isOperationShow &&
{(dirent.permission === 'rw' || dirent.permission === 'r' || (isCustomPermission && canDownload)) && ( - + )} {showShareBtn && ( diff --git a/frontend/src/components/share-link-panel/link-item.js b/frontend/src/components/share-link-panel/link-item.js index cc40f4faa2..3584713f66 100644 --- a/frontend/src/components/share-link-panel/link-item.js +++ b/frontend/src/components/share-link-panel/link-item.js @@ -38,7 +38,7 @@ class LinkItem extends React.Component { cutLink = (link) => { let length = link.length; - return link.slice(0, 9) + '...' + link.slice(length-5); + return link.slice(0, 9) + '...' + link.slice(length - 5); }; onDeleteIconClicked = (e) => { @@ -109,8 +109,8 @@ class LinkItem extends React.Component { {expire_date ? moment(expire_date).format('YYYY-MM-DD HH:mm') : '--'} - - + + {this.state.isDeleteShareLinkDialogOpen && ( diff --git a/frontend/src/components/tree-section/index.css b/frontend/src/components/tree-section/index.css index a0631752f9..f2c3f6f0e4 100644 --- a/frontend/src/components/tree-section/index.css +++ b/frontend/src/components/tree-section/index.css @@ -108,8 +108,3 @@ .tree-section .tree-section-body .right-icon i { margin-left: 0; } - -.tree-section .tree-section-body .sf-dropdown-toggle:focus, -.tree-section .tree-section-body .sf-dropdown-toggle:hover { - color: #999; -} diff --git a/frontend/src/css/file-history.css b/frontend/src/css/file-history.css index 4aa801c5df..0a84d64697 100644 --- a/frontend/src/css/file-history.css +++ b/frontend/src/css/file-history.css @@ -28,6 +28,10 @@ text-decoration: none; } +.history-header .title .go-back .sf3-font-down { + font-size: 1.25rem !important; +} + .content-viewer { flex: 1; display: flex; diff --git a/frontend/src/file-history-old.js b/frontend/src/file-history-old.js index 95b253fcd9..3eb176aeef 100644 --- a/frontend/src/file-history-old.js +++ b/frontend/src/file-history-old.js @@ -64,9 +64,9 @@ class FileHistory extends React.Component { initNewRecords(result) { if (result.total_count < 5) { if (result.data.length) { - let commitID = result.data[result.data.length-1].commit_id; - let path = result.data[result.data.length-1].path; - let oldPath = result.data[result.data.length-1].old_path; + let commitID = result.data[result.data.length - 1].commit_id; + let path = result.data[result.data.length - 1].path; + let oldPath = result.data[result.data.length - 1].old_path; path = oldPath ? oldPath : path; seafileAPI.listOldFileHistoryRecords(historyRepoID, path, commitID).then((res) => { if (!res.data) { @@ -105,8 +105,8 @@ class FileHistory extends React.Component { this.setState({ historyList: result.data, nextCommit: result.next_start_commit, - filePath: result.data[result.data.length-1].path, - oldFilePath: result.data[result.data.length-1].rev_renamed_old_path, + filePath: result.data[result.data.length - 1].path, + oldFilePath: result.data[result.data.length - 1].rev_renamed_old_path, isLoading: false, }); } else { @@ -175,8 +175,8 @@ class FileHistory extends React.Component { this.setState({ historyList: [...this.state.historyList, ...result.data], nextCommit: result.next_start_commit, - filePath: result.data[result.data.length-1].path, - oldFilePath: result.data[result.data.length-1].rev_renamed_old_path, + filePath: result.data[result.data.length - 1].path, + oldFilePath: result.data[result.data.length - 1].rev_renamed_old_path, isReloadingData: false, }); } else { diff --git a/frontend/src/metadata/api.js b/frontend/src/metadata/api.js index 95efb72242..a43f7da4ec 100644 --- a/frontend/src/metadata/api.js +++ b/frontend/src/metadata/api.js @@ -18,8 +18,8 @@ class MetadataManagerAPI { } initForSeahubUsage({ siteRoot, xcsrfHeaders }) { - if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') { - var server = siteRoot.substring(0, siteRoot.length-1); + if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') { + var server = siteRoot.substring(0, siteRoot.length - 1); this.server = server; } else { this.server = siteRoot; diff --git a/frontend/src/pages/institution-admin/api/index.js b/frontend/src/pages/institution-admin/api/index.js index 76693a4200..1236e8d598 100644 --- a/frontend/src/pages/institution-admin/api/index.js +++ b/frontend/src/pages/institution-admin/api/index.js @@ -19,8 +19,8 @@ class InstAdminAPI { } initForSeahubUsage({ siteRoot, xcsrfHeaders }) { - if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') { - var server = siteRoot.substring(0, siteRoot.length-1); + if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') { + var server = siteRoot.substring(0, siteRoot.length - 1); this.server = server; } else { this.server = siteRoot; diff --git a/frontend/src/pages/share-admin/share-links.js b/frontend/src/pages/share-admin/share-links.js index af6e2aea1b..f18c1f5bbd 100644 --- a/frontend/src/pages/share-admin/share-links.js +++ b/frontend/src/pages/share-admin/share-links.js @@ -293,8 +293,8 @@ class Item extends Component { {item.view_cnt} {this.renderExpiration()} - {!item.is_expired && } - + {!item.is_expired && } + ); diff --git a/frontend/src/pages/share-admin/upload-links.js b/frontend/src/pages/share-admin/upload-links.js index c8c4d6b178..fec20bd0e4 100644 --- a/frontend/src/pages/share-admin/upload-links.js +++ b/frontend/src/pages/share-admin/upload-links.js @@ -149,8 +149,8 @@ class Item extends Component { {item.view_cnt} {this.renderExpiration()} - {!item.is_expired && } - + {!item.is_expired && } + ); diff --git a/frontend/src/pages/share-with-ocm/remote-dir-content.js b/frontend/src/pages/share-with-ocm/remote-dir-content.js index 1516376f62..fab5498bd8 100644 --- a/frontend/src/pages/share-with-ocm/remote-dir-content.js +++ b/frontend/src/pages/share-with-ocm/remote-dir-content.js @@ -53,7 +53,7 @@ class DirentItem extends React.Component { {isOpIconShown && dirent.is_file && - + } {Utils.bytesToSize(dirent.size)} diff --git a/frontend/src/pages/sys-admin/repos/dir-content.js b/frontend/src/pages/sys-admin/repos/dir-content.js index 1ad6b6be68..fed0f31772 100644 --- a/frontend/src/pages/sys-admin/repos/dir-content.js +++ b/frontend/src/pages/sys-admin/repos/dir-content.js @@ -61,7 +61,7 @@ class DirentItem extends React.Component { } {isOpIconShown && dirent.is_file && - + } {dirent.size} diff --git a/frontend/src/utils/search-api.js b/frontend/src/utils/search-api.js index fd7e5e06ad..bc3ad66eb6 100644 --- a/frontend/src/utils/search-api.js +++ b/frontend/src/utils/search-api.js @@ -19,8 +19,8 @@ class SearchAPI { } initForSeahubUsage({ siteRoot, xcsrfHeaders }) { - if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') { - var server = siteRoot.substring(0, siteRoot.length-1); + if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') { + var server = siteRoot.substring(0, siteRoot.length - 1); this.server = server; } else { this.server = siteRoot; diff --git a/frontend/src/utils/system-admin-api.js b/frontend/src/utils/system-admin-api.js index 6ee0c5b9e8..d69816f278 100644 --- a/frontend/src/utils/system-admin-api.js +++ b/frontend/src/utils/system-admin-api.js @@ -19,8 +19,8 @@ class SystemAdminAPI { } initForSeahubUsage({ siteRoot, xcsrfHeaders }) { - if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') { - var server = siteRoot.substring(0, siteRoot.length-1); + if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') { + var server = siteRoot.substring(0, siteRoot.length - 1); this.server = server; } else { this.server = siteRoot; diff --git a/frontend/src/utils/utils.js b/frontend/src/utils/utils.js index 0a75a14515..c3626e929b 100644 --- a/frontend/src/utils/utils.js +++ b/frontend/src/utils/utils.js @@ -326,7 +326,7 @@ export const Utils = { }, joinPath: function(pathA, pathB) { - if (pathA[pathA.length-1] === '/') { + if (pathA[pathA.length - 1] === '/') { return pathA + pathB; } else { return pathA + '/' + pathB; @@ -1389,7 +1389,7 @@ export const Utils = { // 91~96:[~` // 97~122:a~z // 123~127:{~ - for (var i = 0; i < length-4; i++) { + for (var i = 0; i < length - 4; i++) { var num = Math.floor((Math.random() * (127-33)) + 33); password += String.fromCharCode(num); } diff --git a/frontend/src/utils/wiki-api.js b/frontend/src/utils/wiki-api.js index 693ae0d489..5e5ca07240 100644 --- a/frontend/src/utils/wiki-api.js +++ b/frontend/src/utils/wiki-api.js @@ -20,8 +20,8 @@ class WikiAPI { } initForSeahubUsage({ siteRoot, xcsrfHeaders }) { - if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') { - var server = siteRoot.substring(0, siteRoot.length-1); + if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') { + var server = siteRoot.substring(0, siteRoot.length - 1); this.server = server; } else { this.server = siteRoot;