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

ex-props support folder (#5617)

* ex-props support folder

* feat: add front code

* support empty folder whose hash is empty-sha1

---------

Co-authored-by: er-pai-r <18335219360@163.com>
This commit is contained in:
Alex Happy
2023-08-30 22:30:23 +08:00
committed by GitHub
parent 6e9595f33b
commit 395790a879
3 changed files with 118 additions and 95 deletions

View File

@@ -17,7 +17,7 @@ class ExtraAttributesDialog extends Component {
constructor(props) {
super(props);
const { direntDetail } = props;
const { direntDetail, direntType } = props;
this.state = {
animationEnd: false,
isLoading: true,
@@ -26,8 +26,12 @@ class ExtraAttributesDialog extends Component {
columns: [],
errorMsg: '',
};
const direntDetailId = direntDetail.id;
this.isEmptyFile = direntDetailId === '0'.repeat(direntDetailId.length);
if (direntType === 'dir') {
this.isEmptyFile = false;
} else {
const direntDetailId = direntDetail?.id || '';
this.isEmptyFile = direntDetailId === '0'.repeat(direntDetailId.length);
}
this.isExist = false;
this.modalRef = React.createRef();
}
@@ -243,6 +247,7 @@ class ExtraAttributesDialog extends Component {
ExtraAttributesDialog.propTypes = {
repoID: PropTypes.string,
filePath: PropTypes.string,
direntType: PropTypes.string,
direntDetail: PropTypes.object,
onToggle: PropTypes.func,
};