aboutsummaryrefslogtreecommitdiff
path: root/src/ui.js
blob: ecbdb4539948a77014adf5bab34d4027cb2332b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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");