mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: better bgc for remove-cluster button, clean up
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
3aef3700de
commit
0b8c96f25e
@ -42,7 +42,7 @@ import { CubeSpinner } from "./spinner";
|
|||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class App extends React.Component {
|
export class App extends React.Component {
|
||||||
@observable appReady = false;
|
@observable isReady = false;
|
||||||
|
|
||||||
@computed get clusterReady() {
|
@computed get clusterReady() {
|
||||||
const clusterId = location.hostname.split(".")[0];
|
const clusterId = location.hostname.split(".")[0];
|
||||||
@ -51,7 +51,7 @@ export class App extends React.Component {
|
|||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
await clusterIpc.activate.invokeFromRenderer();
|
await clusterIpc.activate.invokeFromRenderer();
|
||||||
this.appReady = true;
|
this.isReady = true;
|
||||||
|
|
||||||
disposeOnUnmount(this, [
|
disposeOnUnmount(this, [
|
||||||
reaction(() => this.startURL, url => {
|
reaction(() => this.startURL, url => {
|
||||||
@ -77,7 +77,7 @@ export class App extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (!this.appReady) {
|
if (!this.isReady) {
|
||||||
return <CubeSpinner className="box center"/>
|
return <CubeSpinner className="box center"/>
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -64,8 +64,12 @@ export class ClustersMenu extends React.Component<Props> {
|
|||||||
label: _i18n._(t`Remove`),
|
label: _i18n._(t`Remove`),
|
||||||
click: () => {
|
click: () => {
|
||||||
ConfirmDialog.open({
|
ConfirmDialog.open({
|
||||||
|
okButtonProps: {
|
||||||
|
primary: false,
|
||||||
|
accent: true,
|
||||||
|
label: _i18n._(t`Remove`),
|
||||||
|
},
|
||||||
ok: () => clusterStore.removeById(cluster.id),
|
ok: () => clusterStore.removeById(cluster.id),
|
||||||
labelOk: _i18n._(t`Remove`),
|
|
||||||
message: <p>Are you sure want to remove cluster <b title={cluster.id}>{cluster.contextName}</b>?</p>,
|
message: <p>Are you sure want to remove cluster <b title={cluster.id}>{cluster.contextName}</b>?</p>,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user