Resolve merge conflict

This commit is contained in:
Victor Meng
2021-08-16 14:15:55 -07:00
parent 4db4d8494e
commit 98640785fc

View File

@@ -9,7 +9,7 @@ import NewNotebookIcon from "../../../images/notebook/Notebook-new.svg";
import NotebookIcon from "../../../images/notebook/Notebook-resource.svg"; import NotebookIcon from "../../../images/notebook/Notebook-resource.svg";
import PublishIcon from "../../../images/notebook/publish_content.svg"; import PublishIcon from "../../../images/notebook/publish_content.svg";
import RefreshIcon from "../../../images/refresh-cosmos.svg"; import RefreshIcon from "../../../images/refresh-cosmos.svg";
import { Areas } from "../../Common/Constants"; import { Areas, Notebook } from "../../Common/Constants";
import * as ViewModels from "../../Contracts/ViewModels"; import * as ViewModels from "../../Contracts/ViewModels";
import { useSidePanel } from "../../hooks/useSidePanel"; import { useSidePanel } from "../../hooks/useSidePanel";
import { useTabs } from "../../hooks/useTabs"; import { useTabs } from "../../hooks/useTabs";
@@ -108,23 +108,34 @@ export const NotebooksResourceTree: React.FC<NotebooksResourceTreeProps> = ({
children: [], children: [],
}; };
if (galleryContentRoot) { if (userContext.features.notebooksTemporarilyDown) {
notebooksTree.children.push(buildGalleryNotebooksTree()); notebooksTree.children.push(buildNotebooksTemporarilyDownTree());
} } else {
if (galleryContentRoot) {
notebooksTree.children.push(buildGalleryNotebooksTree());
}
if (myNotebooksContentRoot) { if (myNotebooksContentRoot) {
notebooksTree.children.push(buildMyNotebooksTree()); notebooksTree.children.push(buildMyNotebooksTree());
} }
if (container.notebookManager?.gitHubOAuthService.isLoggedIn()) { if (container.notebookManager?.gitHubOAuthService.isLoggedIn()) {
// collapse all other notebook nodes // collapse all other notebook nodes
notebooksTree.children.forEach((node) => (node.isExpanded = false)); notebooksTree.children.forEach((node) => (node.isExpanded = false));
notebooksTree.children.push(buildGitHubNotebooksTree()); notebooksTree.children.push(buildGitHubNotebooksTree());
}
} }
return notebooksTree; return notebooksTree;
}; };
const buildNotebooksTemporarilyDownTree = (): TreeNode => {
return {
label: Notebook.temporarilyDownMsg,
className: "clickDisabled",
};
};
const buildGalleryNotebooksTree = (): TreeNode => { const buildGalleryNotebooksTree = (): TreeNode => {
return { return {
label: "Gallery", label: "Gallery",