New logo, updates changelog, some code improvements.

This commit is contained in:
hediet
2020-08-14 13:45:43 +02:00
parent f09e345908
commit 7ba2428819
10 changed files with 101 additions and 48 deletions

View File

@@ -1,38 +1,9 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import "./style.scss";
import { Model } from "./model/Model";
import Components = require("./components/GUI");
import * as mobx from "mobx";
import { App } from "./components/App";
const model = new Model();
if (model.runningMode !== "webView") {
if (model.theme === "light") {
require("./vscode-light.scss");
} else {
require("./vscode-dark.scss");
}
}
function render(target: HTMLDivElement) {
const c = require("./components/GUI") as typeof Components;
ReactDOM.render(<c.GUI model={model} />, target);
}
const target = document.createElement("div");
target.className = "target";
document.body.appendChild(target);
render(target);
declare var module: {
hot?: { accept: (componentName: string, callback: () => void) => void };
};
declare var require: (name: string) => any;
if (module.hot) {
module.hot.accept("./components/GUI", () => {
render(target);
});
}
const elem = document.createElement("div");
elem.className = "react-root";
document.body.append(elem);
ReactDOM.render(<App />, elem);