monaco editor implemented right

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2021-09-29 14:08:27 +03:00
1 parent b41f923931
commit 92766e71e4
27 files changed
+265 -501

No files matched your search

@@ -22,7 +22,7 @@
import "./kubeconfig-dialog.scss";
import React from "react";
import { observable, makeObservable } from "mobx";
import { makeObservable, observable } from "mobx";
import { observer } from "mobx-react";
import jsYaml from "js-yaml";
import type { ServiceAccount } from "../../../common/k8s-api/endpoints";
@@ -33,9 +33,7 @@ import { Icon } from "../icon";
import { Notifications } from "../notifications";
import { Wizard, WizardStep } from "../wizard";
import { apiBase } from "../../api";
import MonacoEditor from "react-monaco-editor";
import { ThemeStore } from "../../theme.store";
import { UserStore } from "../../../common/user-store";
import { MonacoEditor } from "../monaco-editor";
interface IKubeconfigDialogData {
title?: React.ReactNode;
@@ -129,13 +127,7 @@ export class KubeConfigDialog extends React.Component<Props> {
>
<Wizard header={header}>
<WizardStep customButtons={buttons} prev={this.close}>
<MonacoEditor
language="yaml"
value={yamlConfig}
theme={ThemeStore.getInstance().activeTheme.monacoTheme}
className={cssNames( "MonacoEditor")}
options={{readOnly: true, ...UserStore.getInstance().getEditorOptions()}}
/>
<MonacoEditor readOnly={true} value={yamlConfig}/>
<textarea
className="config-copy"
readOnly defaultValue={yamlConfig}