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