Skip to content

Commit 16053ab

Browse files
committed
Do not show delete in file browser menu, change delete icon
1 parent 5d0f73b commit 16053ab

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/commandsAndMenu.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
import { GitCredentialsForm } from './widgets/CredentialsBox';
4545
import { GitCloneForm } from './widgets/GitCloneForm';
4646
import { Contents } from '@jupyterlab/services';
47-
import { ContextMenuSvg } from '@jupyterlab/ui-components';
47+
import { closeIcon, ContextMenuSvg } from '@jupyterlab/ui-components';
4848
import { Message } from '@lumino/messaging';
4949
import { CONTEXT_COMMANDS } from './components/FileList';
5050

@@ -596,7 +596,7 @@ export function addCommands(
596596
}
597597
}
598598
},
599-
icon: removeIcon
599+
icon: closeIcon
600600
});
601601

602602
commands.addCommand(ContextCommandIDs.gitFileDiscard, {
@@ -853,8 +853,13 @@ export function addFileBrowserContextMenu(
853853
// flatten the list of lists of commands
854854
[]
855855
.concat(...[...statuses].map(status => CONTEXT_COMMANDS[status]))
856-
// filter out the Open command as it is not needed in file browser
857-
.filter(command => command !== ContextCommandIDs.gitFileOpen)
856+
// filter out the Open and Delete commands as
857+
// those are not needed in file browser
858+
.filter(
859+
command =>
860+
command !== ContextCommandIDs.gitFileOpen &&
861+
command !== ContextCommandIDs.gitFileDelete
862+
)
858863
);
859864

860865
const commandsChanged =

0 commit comments

Comments
 (0)