mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
Bug Bash issues fixes (#1162)
* Bug Bash issues fixes * Remove rename from root of Temporary Workspace context menu * Update comments * Update comments
This commit is contained in:
parent
ada95eae1f
commit
469cd866e0
@ -977,7 +977,7 @@ export default class Explorer {
|
|||||||
/**
|
/**
|
||||||
* This creates a new notebook file, then opens the notebook
|
* This creates a new notebook file, then opens the notebook
|
||||||
*/
|
*/
|
||||||
public onNewNotebookClicked(parent?: NotebookContentItem, isGithubTree?: boolean): void {
|
public async onNewNotebookClicked(parent?: NotebookContentItem, isGithubTree?: boolean): Promise<void> {
|
||||||
if (!useNotebook.getState().isNotebookEnabled || !this.notebookManager?.notebookContentClient) {
|
if (!useNotebook.getState().isNotebookEnabled || !this.notebookManager?.notebookContentClient) {
|
||||||
const error = "Attempt to create new notebook, but notebook is not enabled";
|
const error = "Attempt to create new notebook, but notebook is not enabled";
|
||||||
handleError(error, "Explorer/onNewNotebookClicked");
|
handleError(error, "Explorer/onNewNotebookClicked");
|
||||||
@ -986,11 +986,9 @@ export default class Explorer {
|
|||||||
const isPhoenixEnabled = NotebookUtil.isPhoenixEnabled();
|
const isPhoenixEnabled = NotebookUtil.isPhoenixEnabled();
|
||||||
if (isPhoenixEnabled) {
|
if (isPhoenixEnabled) {
|
||||||
if (isGithubTree) {
|
if (isGithubTree) {
|
||||||
async () => {
|
await this.allocateContainer();
|
||||||
await this.allocateContainer();
|
parent = parent || this.resourceTree.myNotebooksContentRoot;
|
||||||
parent = parent || this.resourceTree.myNotebooksContentRoot;
|
this.createNewNoteBook(parent, isGithubTree);
|
||||||
this.createNewNoteBook(parent, isGithubTree);
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
useDialog.getState().showOkCancelModalDialog(
|
useDialog.getState().showOkCancelModalDialog(
|
||||||
Notebook.newNotebookModalTitle,
|
Notebook.newNotebookModalTitle,
|
||||||
|
@ -397,6 +397,11 @@ export const ResourceTree: React.FC<ResourceTreeProps> = ({ container }: Resourc
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
//disallow renaming of temporary notebook workspace
|
||||||
|
if (item?.path === useNotebook.getState().notebookBasePath) {
|
||||||
|
items = items.filter((item) => item.label !== "Rename");
|
||||||
|
}
|
||||||
|
|
||||||
// For GitHub paths remove "Delete", "Rename", "New Directory", "Upload File"
|
// For GitHub paths remove "Delete", "Rename", "New Directory", "Upload File"
|
||||||
if (GitHubUtils.fromContentUri(item.path)) {
|
if (GitHubUtils.fromContentUri(item.path)) {
|
||||||
items = items.filter(
|
items = items.filter(
|
||||||
|
@ -808,6 +808,11 @@ export class ResourceTreeAdapter implements ReactAdapter {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
//disallow renaming of temporary notebook workspace
|
||||||
|
if (item?.path === useNotebook.getState().notebookBasePath) {
|
||||||
|
items = items.filter((item) => item.label !== "Rename");
|
||||||
|
}
|
||||||
|
|
||||||
// For GitHub paths remove "Delete", "Rename", "New Directory", "Upload File"
|
// For GitHub paths remove "Delete", "Rename", "New Directory", "Upload File"
|
||||||
if (GitHubUtils.fromContentUri(item.path)) {
|
if (GitHubUtils.fromContentUri(item.path)) {
|
||||||
items = items.filter(
|
items = items.filter(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user