1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fixes from code review

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-01-28 07:41:59 +02:00
parent 36bc178972
commit 4129ae9338
4 changed files with 2 additions and 7 deletions

View File

@ -10,7 +10,7 @@ import { CommandOverlay } from "../command-palette/command-container";
const uniqueWorkspaceName: InputValidator = {
condition: ({ required }) => required,
message: () => `Workspace with this name already exists`,
validate: value => !workspaceStore.enabledWorkspacesList.find((workspace) => workspace.name === value),
validate: value => !workspaceStore.workspacesList.find((workspace) => workspace.name === value),
};
@observer

View File

@ -31,10 +31,6 @@ export class RemoveWorkspace extends React.Component {
},
ok: () => {
workspaceStore.removeWorkspace(workspace);
if (workspace.id === workspaceStore.currentWorkspaceId) {
workspaceStore.setActive(workspaceStore.enabledWorkspacesList[0].id);
}
},
message: (
<div className="confirm flex column gaps">

View File

@ -30,7 +30,6 @@ export class CommandOverlay {
@observer
export class CommandContainer extends React.Component<{cluster?: Cluster}> {
@observable visible = false;
@observable commandComponent: React.ReactElement;
private escHandler(event: KeyboardEvent) {

View File

@ -61,7 +61,7 @@ export class CommandDialog extends React.Component {
broadcastMessage(`command-palette:run-action:${clusterStore.active.id}`, command.id);
}
} catch(error) {
console.error("failed to execute command", command.id, error);
console.error("[COMMAND-DIALOG] failed to execute command", command.id, error);
}
}