New logo, updates changelog, some code improvements.
This commit is contained in:
25
webview/src/components/App.tsx
Normal file
25
webview/src/components/App.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import * as React from "react";
|
||||
import { hotComponent } from "../hotComponent";
|
||||
import { GUI } from "./GUI";
|
||||
import { Model } from "../model/Model";
|
||||
|
||||
@hotComponent(module)
|
||||
export class App extends React.Component {
|
||||
private readonly model = new Model();
|
||||
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
|
||||
if (this.model.runningMode !== "webView") {
|
||||
if (this.model.theme === "light") {
|
||||
require("../vscode-light.scss");
|
||||
} else {
|
||||
require("../vscode-dark.scss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return <GUI model={this.model} />;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,9 @@ import { VisualizationView, Theme } from "@hediet/visualization-core";
|
||||
export class Visualizer extends React.Component<{ model: Model }> {
|
||||
render() {
|
||||
return (
|
||||
<div className="component-Visualizer">{this.renderContent()}</div>
|
||||
<div style={{ width: "100%", height: "100%", overflow: "hidden" }}>
|
||||
{this.renderContent()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,7 +38,11 @@ export class Visualizer extends React.Component<{ model: Model }> {
|
||||
}
|
||||
return (
|
||||
<VisualizationView
|
||||
theme={Theme.light}
|
||||
theme={
|
||||
this.props.model.theme === "dark"
|
||||
? Theme.dark
|
||||
: Theme.light
|
||||
}
|
||||
visualization={vis.visualization}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user