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:
@@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user