mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Monaco editor refactoring (#4225)
* monaco editor refactoring Signed-off-by: Roman <ixrock@gmail.com> * clean up / responding to comments Signed-off-by: Roman <ixrock@gmail.com> * move custom monaco themes to own folder Signed-off-by: Roman <ixrock@gmail.com> * fix lint Signed-off-by: Roman <ixrock@gmail.com> * removed unused rules from webpack's config (renderer) Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
0ae4dfbeab
commit
368e2d9a00
44 files changed
+817
-520
No files matched your search
@@ -22,7 +22,7 @@
|
||||
import "./upgrade-chart.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observable, reaction, makeObservable } from "mobx";
|
||||
import { action, makeObservable, observable, reaction } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { DockTab } from "./dock.store";
|
||||
@@ -86,9 +86,15 @@ export class UpgradeChart extends React.Component<Props> {
|
||||
this.version = this.versions[0];
|
||||
}
|
||||
|
||||
onChange = (value: string, error?: string) => {
|
||||
@action
|
||||
onChange = (value: string) => {
|
||||
this.error = "";
|
||||
upgradeChartStore.values.setData(this.tabId, value);
|
||||
this.error = error;
|
||||
};
|
||||
|
||||
@action
|
||||
onError = (error: Error | string) => {
|
||||
this.error = error.toString();
|
||||
};
|
||||
|
||||
upgrade = async () => {
|
||||
@@ -118,7 +124,7 @@ export class UpgradeChart extends React.Component<Props> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { tabId, release, value, error, onChange, upgrade, versions, version } = this;
|
||||
const { tabId, release, value, error, onChange, onError, upgrade, versions, version } = this;
|
||||
const { className } = this.props;
|
||||
|
||||
if (!release || upgradeChartStore.isLoading() || !version) {
|
||||
@@ -157,6 +163,7 @@ export class UpgradeChart extends React.Component<Props> {
|
||||
tabId={tabId}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
onError={onError}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user