mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +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:
parent
5ee84cef82
commit
82f77eb146
8
frontend/package-lock.json
generated
8
frontend/package-lock.json
generated
@ -19,7 +19,7 @@
|
||||
"@seafile/sdoc-editor": "^1.0.63",
|
||||
"@seafile/seafile-calendar": "0.0.12",
|
||||
"@seafile/seafile-editor": "1.0.109",
|
||||
"@seafile/sf-metadata-ui-component": "0.0.24",
|
||||
"@seafile/sf-metadata-ui-component": "^0.0.28",
|
||||
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
||||
"@uiw/react-codemirror": "^4.19.4",
|
||||
"axios": "^1.7.4",
|
||||
@ -5092,9 +5092,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@seafile/sf-metadata-ui-component": {
|
||||
"version": "0.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@seafile/sf-metadata-ui-component/-/sf-metadata-ui-component-0.0.24.tgz",
|
||||
"integrity": "sha512-QPIkQ65MiZNEP1CWJFTsiq32Eh+Igq6PIh43x9roPVflEI+eDD1PSLIDbRQl58vLn298maOobLpF9qibVS8I+w==",
|
||||
"version": "0.0.28",
|
||||
"resolved": "https://registry.npmjs.org/@seafile/sf-metadata-ui-component/-/sf-metadata-ui-component-0.0.28.tgz",
|
||||
"integrity": "sha512-jKrA6Q8q+8jS2sMVPEoddhRZ1rWpTL3zWyRryKvYlAPu7A2pW/uqlB9tyw1qumCwkhH8cYtjgKZzmD9pfeBmtQ==",
|
||||
"dependencies": {
|
||||
"@seafile/seafile-calendar": "0.0.24",
|
||||
"@seafile/seafile-editor": "~1.0.102",
|
||||
|
@ -14,7 +14,7 @@
|
||||
"@seafile/sdoc-editor": "^1.0.63",
|
||||
"@seafile/seafile-calendar": "0.0.12",
|
||||
"@seafile/seafile-editor": "1.0.109",
|
||||
"@seafile/sf-metadata-ui-component": "0.0.24",
|
||||
"@seafile/sf-metadata-ui-component": "^0.0.28",
|
||||
"@uiw/codemirror-extensions-langs": "^4.19.4",
|
||||
"@uiw/react-codemirror": "^4.19.4",
|
||||
"axios": "^1.7.4",
|
||||
|
@ -51,6 +51,11 @@ const FileOrFolderFilter = ({ readOnly, value = 'all', onChange: onChangeAPI })
|
||||
value={displayValue}
|
||||
options={options}
|
||||
onSelectOption={onChange}
|
||||
component={{
|
||||
DropDownIcon: (
|
||||
<i className="sf3-font sf3-font-down"></i>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -1,5 +1,28 @@
|
||||
.sf-metadata-basic-filters-select {
|
||||
width: 200px;
|
||||
.sf-metadata-basic-filters-select.custom-select {
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
background-image: none;
|
||||
border: none;
|
||||
padding: 0 6px;
|
||||
margin-left: -6px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.sf-metadata-basic-filters-select.custom-select:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.sf-metadata-basic-filters-select.custom-select .selected-option {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.sf-metadata-basic-filters-select.custom-select.focus {
|
||||
border-color: unset;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.sf-metadata-basic-filters-select .selected-option-show {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.select-basic-filter-option {
|
||||
@ -28,3 +51,7 @@
|
||||
.sf-metadata-option.sf-metadata-option-active .sf-metadata-icon-check-mark {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.sf-metadata-basic-filters-select .sf-metadata-option-group {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ class FilterPopover extends Component {
|
||||
basicFilters: props.basicFilters,
|
||||
filters: getValidFilters(props.filters, props.columns),
|
||||
filterConjunction: props.filterConjunction || 'And',
|
||||
isSubmitDisabled: true,
|
||||
};
|
||||
this.isSelectOpen = false;
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user