diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-06 20:19:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-06 20:19:45 +0100 |
| commit | ccbca8b9cede972480dd1ef7a73db71a99be9609 (patch) | |
| tree | e3e3c5b9232d86cf8ba18f898a90f1f2295c2b4e /webAO/ui.js | |
| parent | 8d4cd02b7cbe955f5a5ce1666fc76a51db4be5d5 (diff) | |
| parent | 59c0773e95756aa62027db7a5754e7e986ca2b19 (diff) | |
Merge pull request #94 from caleb-mabry/add-linting
Adding AirBNB Linting style
Diffstat (limited to 'webAO/ui.js')
| -rw-r--r-- | webAO/ui.js | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/webAO/ui.js b/webAO/ui.js index 7bd7ab6..9e95be9 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -1,78 +1,78 @@ /* eslint indent: ["error", 2] */ // import GoldenLayout from "./golden/js/goldenlayout.js"; -import GoldenLayout from "golden-layout"; +import GoldenLayout from 'golden-layout'; const config = { settings: { showPopoutIcon: false, - showCloseIcon: false + showCloseIcon: false, }, dimensions: { - minItemHeight: 40 + minItemHeight: 40, }, content: [{ - type: "row", + type: 'row', content: [{ - type: "column", + type: 'column', width: 40, content: [{ - type: "component", + type: 'component', isClosable: false, - componentName: "template", - title: "Game", - componentState: { id: "client_wrapper" } - }] + componentName: 'template', + title: 'Game', + componentState: { id: 'client_wrapper' }, + }], }, { - type: "column", + type: 'column', content: [{ - type: "row", + type: 'row', height: 65, content: [{ - type: "stack", + type: 'stack', content: [{ - type: "component", + type: 'component', isClosable: false, - title: "Main", - componentName: "template", - componentState: { id: "mainmenu" } + title: 'Main', + componentName: 'template', + componentState: { id: 'mainmenu' }, }, { - type: "component", + type: 'component', isClosable: false, - title: "Log", - componentName: "template", - componentState: { id: "log" } - }] + title: 'Log', + componentName: 'template', + componentState: { id: 'log' }, + }], }, { - type: "component", - title: "Music", + type: 'component', + title: 'Music', width: 30, - componentName: "template", - componentState: { id: "music" } - }] + componentName: 'template', + componentState: { id: 'music' }, + }], }, { - type: "row", + type: 'row', content: [{ - type: "component", - title: "Server chat", - componentName: "template", - componentState: { id: "ooc" } - }] - }] - }] - }] + type: 'component', + title: 'Server chat', + componentName: 'template', + componentState: { id: 'ooc' }, + }], + }], + }], + }], }; const golden = new GoldenLayout(config); -golden.registerComponent("template", function (container, componentState) { +golden.registerComponent('template', (container, componentState) => { const template = document.querySelector(`#${componentState.id}`); container.getElement().html(template.content); // TODO: support multiple locales // container.setTitle(document.querySelector(`#${componentState.id} meta[name='frame-title']`).getAttribute("content")); }); -golden.init();
\ No newline at end of file +golden.init(); |
