mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
add folder in empty view tree (#7357)
Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
@@ -17,7 +17,7 @@ const DirViews = ({ userPerm, repoID, currentPath, currentRepoInfo }) => {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [window.app.pageOptions.enableMetadataManagement, currentRepoInfo]);
|
||||
|
||||
const { isLoading, navigation } = useMetadata();
|
||||
const { isLoading } = useMetadata();
|
||||
const { enableMetadata } = useMetadataStatus();
|
||||
|
||||
let [isSettingsDialogOpen, setSettingsDialogOpen] = useState(false);
|
||||
@@ -58,7 +58,7 @@ const DirViews = ({ userPerm, repoID, currentPath, currentRepoInfo }) => {
|
||||
>
|
||||
{!enableMetadata ? (
|
||||
<ExtensionPrompts onExtendedProperties={onExtendedProperties} />
|
||||
) : !isLoading && Array.isArray(navigation) && navigation.length > 0 ? (
|
||||
) : !isLoading ? (
|
||||
<MetadataTreeView userPerm={userPerm} currentPath={currentPath} />
|
||||
) : null}
|
||||
</TreeSection>
|
||||
|
@@ -154,7 +154,7 @@ const MetadataTreeView = ({ userPerm, currentPath }) => {
|
||||
<div className="tree-view tree metadata-tree-view">
|
||||
<div className="tree-node">
|
||||
<div className="children">
|
||||
{navigation.map((item, index) => {
|
||||
{Array.isArray(navigation) && navigation.length > 0 && navigation.map((item, index) => {
|
||||
if (item.type === VIEWS_TYPE_FOLDER) {
|
||||
return renderFolder(item, index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user