mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Empty state for kubeconfig sync list
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
33e25b3e06
commit
1a21a07efe
@ -515,7 +515,7 @@ export class Extensions extends React.Component<Props> {
|
|||||||
<section>
|
<section>
|
||||||
<h1>Extensions</h1>
|
<h1>Extensions</h1>
|
||||||
|
|
||||||
<Notice>
|
<Notice className="mb-14 mt-3">
|
||||||
<p>
|
<p>
|
||||||
Add new features via Lens Extensions.{" "}
|
Add new features via Lens Extensions.{" "}
|
||||||
Check out <a href={`${docsUrl}/extensions/`} target="_blank" rel="noreferrer">docs</a>{" "}
|
Check out <a href={`${docsUrl}/extensions/`} target="_blank" rel="noreferrer">docs</a>{" "}
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.notice {
|
.notice {
|
||||||
@apply p-8 flex flex-col gap-2 mb-14 mt-3 rounded-lg;
|
@apply p-8 flex flex-col gap-2 rounded-lg;
|
||||||
background-color: var(--inputControlBackground);
|
background-color: var(--inputControlBackground);
|
||||||
border: 1px solid var(--boxShadow);
|
border: 1px solid var(--boxShadow);
|
||||||
color: var(--textColorTertiary);
|
color: var(--textColorTertiary);
|
||||||
|
|||||||
@ -21,12 +21,15 @@
|
|||||||
|
|
||||||
import styles from "./notice.module.css";
|
import styles from "./notice.module.css";
|
||||||
import React, { DOMAttributes } from "react";
|
import React, { DOMAttributes } from "react";
|
||||||
|
import { cssNames } from "../../utils";
|
||||||
|
|
||||||
interface Props extends DOMAttributes<any> {}
|
interface Props extends DOMAttributes<any> {
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export function Notice(props: Props) {
|
export function Notice(props: Props) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.notice}>
|
<div className={cssNames(styles.notice, props.className)}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import fse from "fs-extra";
|
|||||||
import { action, computed, makeObservable, observable, reaction } from "mobx";
|
import { action, computed, makeObservable, observable, reaction } from "mobx";
|
||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { Notice } from "../+extensions/notice";
|
||||||
|
|
||||||
import { KubeconfigSyncEntry, KubeconfigSyncValue, UserStore } from "../../../common/user-store";
|
import { KubeconfigSyncEntry, KubeconfigSyncValue, UserStore } from "../../../common/user-store";
|
||||||
import { isWindows } from "../../../common/vars";
|
import { isWindows } from "../../../common/vars";
|
||||||
@ -148,6 +149,14 @@ export class KubeconfigSyncs extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!entries.length) {
|
||||||
|
return (
|
||||||
|
<Notice className="mt-3">
|
||||||
|
<div className="flex-grow text-center">No files and folders have been synced yet</div>
|
||||||
|
</Notice>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{entries.map(this.renderEntry)}
|
{entries.map(this.renderEntry)}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export class ClusterKubeconfig extends React.Component<Props> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Notice>
|
<Notice className="mb-14 mt-3">
|
||||||
<SubTitle title="Kubeconfig" />
|
<SubTitle title="Kubeconfig" />
|
||||||
<span>
|
<span>
|
||||||
<a className="link value" onClick={this.openKubeconfig}>{this.props.cluster.kubeConfigPath}</a>
|
<a className="link value" onClick={this.openKubeconfig}>{this.props.cluster.kubeConfigPath}</a>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user