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

feat: metadata basic filters ui (#6647)

* feat: metadata basic filters ui

* feat: update code

---------

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-08-27 14:53:29 +08:00
committed by GitHub
parent 5ee84cef82
commit 82f77eb146
6 changed files with 45 additions and 8 deletions

View File

@@ -179,6 +179,10 @@ class LibContentView extends React.Component {
};
getPathFromLocation = (repoID) => {
const urlParams = new URLSearchParams(window.location.search);
const viewID = urlParams.get('view');
if (viewID) return `/${PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES}`;
let location = window.location.href.split('?')[0];
location = decodeURIComponent(location);
let path = location.slice(location.indexOf(repoID) + repoID.length + 1);
@@ -525,7 +529,7 @@ class LibContentView extends React.Component {
isDirentDetailShow: false
});
const url = `${siteRoot}library/${repoID}/${encodeURIComponent(repoInfo.repo_name)}?view=${encodeURIComponent(viewId)}`;
const url = `${siteRoot}library/${repoID}/${encodeURIComponent(repoInfo.repo_name)}/?view=${encodeURIComponent(viewId)}`;
window.history.pushState({ url: url, path: '' }, '', url);
};