diff --git a/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.module.css b/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.module.css
index da7668a676..1a5759642e 100644
--- a/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.module.css
+++ b/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.module.css
@@ -21,7 +21,7 @@
.dialog {
> div {
- max-width: 50vw;
+ max-width: 600px;
min-width: calc(45 * var(--unit));
background-color: white;
border-radius: 3px;
diff --git a/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.tsx b/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.tsx
index ea36ad6617..9285a1c9e7 100644
--- a/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.tsx
+++ b/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog.tsx
@@ -20,12 +20,12 @@
*/
import styles from "./delete-cluster-dialog.module.css";
-import { observable } from "mobx";
+import { makeObservable, observable } from "mobx";
import { observer } from "mobx-react";
import React from "react";
import { Button } from "../button";
-import type { KubeConfig } from "@kubernetes/client-node";
+import type { Context, KubeConfig } from "@kubernetes/client-node";
import type { Cluster } from "../../../main/cluster";
import { saveKubeconfig } from "./save-config";
import { requestMain } from "../../../common/ipc";
@@ -35,6 +35,7 @@ import { HotbarStore } from "../../../common/hotbar-store";
import { boundMethod } from "autobind-decorator";
import { Dialog } from "../dialog";
import { Icon } from "../icon";
+import { Select } from "../select";
type DialogState = {
isOpen: boolean,
@@ -46,8 +47,21 @@ const dialogState: DialogState = observable({
isOpen: false
});
+type Props = {};
+
@observer
export class DeleteClusterDialog extends React.Component {
+ showContextSwitch = false;
+ newCurrentContext = "";
+
+ constructor(props: Props) {
+ super(props);
+ makeObservable(this, {
+ showContextSwitch: observable,
+ newCurrentContext: observable
+ });
+ }
+
static open({ config, cluster }: Partial Choose new current-context The current-context field from the kubeconfig file indicates a minikube context
- that will cease to exist after the change. This will affect the operation of kubectl.
- {" "}Replace current context
The contents of your kubeconfig file will be changed!
@@ -102,6 +166,7 @@ export class DeleteClusterDialog extends React.Component { className={styles.dialog} isOpen={isOpen} close={this.onClose} + open={this.onOpen} >