aboutsummaryrefslogtreecommitdiff
path: root/src/ui.js
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2018-05-14 22:45:56 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2018-05-14 22:45:56 -0500
commitc26ac0e636a71b850fa316f5bead6ba263b55492 (patch)
treeba1472cf2380f4022f51677699ed2b18a74f9f95 /src/ui.js
parent09f3d0170b3cc1ee74a2266b595c81402ed4314c (diff)
Turn it into a node package to use GoldenLayout
Diffstat (limited to 'src/ui.js')
-rw-r--r--src/ui.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ui.js b/src/ui.js
new file mode 100644
index 0000000..ecbdb45
--- /dev/null
+++ b/src/ui.js
@@ -0,0 +1,38 @@
+import GoldenLayout from "./golden/js/goldenlayout.js";
+
+var config = {
+ settings: {
+ showPopoutIcon: false
+ },
+ content: [
+ {
+ type: "row",
+ content: [
+ {
+ type: "component",
+ componentName: "template",
+ componentState: { id: "client_wrapper" }
+ },
+ {
+ type: "column",
+ content: [
+ {
+ type: "component",
+ componentName: "template",
+ componentState: { id: "ooc" }
+ },
+ {
+ type: "component",
+ componentName: "template",
+ componentState: { id: "music" }
+ }]
+ }]
+ }]
+};
+
+var golden = new GoldenLayout(config);
+golden.registerComponent("template", function(container, componentState) {
+ container.getElement().html(document.querySelector("#" + componentState.id).content);
+});
+golden.init();
+console.log("initializing"); \ No newline at end of file