1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-29 13:38:46 +00:00
code-server-2/packages/app/common/src/app.tsx
Kyle Carberry 85d2225e0c Featureful (#31)
* Fix loading within the CLI

* Remove app

* Remove promise handle

* Add initial travis file

* Add libxkbfile dependency

* Add libxkbfile-dev

* Add build script

* Fix malformed bash statement

* Remove yarn from script

* Improve build script

* Extract upx before usage

* Only run upx if on linux

* Ensure resource directory exists

* Pack runnable binary

* Export binary with platform

* Improve build process

* Install upx before running install script

* Update typescript version before running nexe

* Add os.release() function for multi-platform support

* Update travis.yml to improve deployment

* Add on CI

* Update to v1.31.0

* Add libsecret

* Update build target

* Skip cleanup

* Fix built-in extensions

* Add basics for apps

* Create custom DNS server

* Fix forking within CLI. Fixes TS language features

* Fix filename resolve

* Fix default extensions path

* Add custom dialog

* Store workspace path

* Remove outfiles

* Cleanup

* Always authed outside of CLI

* Use location.host for client

* Remove useless app interface

* Remove debug file for building wordlist

* Use chromes tcp host

* Update patch

* Build browser app before packaging

* Replace all css containing file:// URLs, fix webviews

* Fix save

* Fix mkdir
2019-02-21 11:55:42 -06:00

34 lines
837 B
TypeScript

//@ts-ignore
import { MDCTextField } from "@material/textfield";
import { TcpHost } from "./connection";
import { StorageProvider } from "./storage";
import "material-components-web/dist/material-components-web.css";
import "./app.scss";
import "./tooltip.scss";
import * as React from "react";
import { render } from "react-dom";
import { Main } from "./containers";
export * from "./connection";
export interface App {
readonly tcp: TcpHost;
readonly storage: StorageProvider;
readonly node: HTMLElement;
}
export interface RegisteredServer {
readonly host: "coder" | "self";
readonly hostname: string;
readonly name: string;
}
export const create = async (app: App): Promise<void> => {
let servers = await app.storage.get<RegisteredServer[]>("servers");
if (!servers) {
servers = [];
}
render(<Main />, app.node);
};