From adf3cacdf2c6426a7eb7ea5fc500082992f357aa Mon Sep 17 00:00:00 2001 From: Qube Date: Thu, 19 Jul 2018 20:12:57 +0700 Subject: Add evidence and mainmenu --- webAO/ui.js | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'webAO/ui.js') diff --git a/webAO/ui.js b/webAO/ui.js index f5c3f3a..ca235ff 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -35,22 +35,34 @@ var config = { type: "column", content: [ { - type: "stack", - height: 60, - content: [ - { - type: "component", - title: "Server chat", - componentName: "template", - componentState: { id: "ooc" } - }, - { - type: "component", - title: "Log", - componentName: "template", - componentState: { id: "log" } - } - ] + type: "row", + height: 65, + content: [ + { + type: "stack", + content: [ + { + type: "component", + title: "Main", + componentName: "template", + componentState: { id: "mainmenu" } + }, + { + type: "component", + title: "Log", + componentName: "template", + componentState: { id: "log" } + } + ] + }, + { + type: "component", + title: "Server chat", + width: 30, + componentName: "template", + componentState: { id: "ooc" } + } + ] }, { type: "row", -- cgit From 1e55e05fc9ca04437abf7823e3ab50c131529bf0 Mon Sep 17 00:00:00 2001 From: Qube Date: Fri, 20 Jul 2018 20:57:37 +0700 Subject: Add witness testinomy, cross examination, call mod function + Fix animation sequence more reliable (using gify API to calculate animation duration) + Resign interface to gain more space. --- webAO/ui.js | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) (limited to 'webAO/ui.js') diff --git a/webAO/ui.js b/webAO/ui.js index ca235ff..56e0dcd 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -21,14 +21,7 @@ var config = { componentName: "template", title: "Game", componentState: { id: "client_wrapper" } - }, - { - type: "component", - title: "Miscellaneous", - height: 5, - componentName: "template", - componentState: { id: "misc" } - }, + } ] }, { @@ -56,40 +49,23 @@ var config = { ] }, { - type: "component", - title: "Server chat", + type: "component", + title: "Music", width: 30, - componentName: "template", - componentState: { id: "ooc" } - } + componentName: "template", + componentState: { id: "music" } + } ] }, { type: "row", content: [ { - type: "component", - title: "Music", - componentName: "template", - componentState: { id: "music" } - }, - { - type: "stack", - content: [ - { - type: "component", - title: "Settings", - componentName: "template", - componentState: { id: "client_settings" } - }, - { - type: "component", - title: "About", - componentName: "template", - componentState: { id: "about" } - } - ] - } + type: "component", + title: "Server chat", + componentName: "template", + componentState: { id: "ooc" } + } ] } ] -- cgit From 2f18d565cb06de3826aee13fd07356adf29d9cbc Mon Sep 17 00:00:00 2001 From: gameboyprinter Date: Mon, 20 Aug 2018 18:46:00 -0500 Subject: refactor part 1 --- webAO/ui.js | 93 +++++++++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 46 deletions(-) (limited to 'webAO/ui.js') diff --git a/webAO/ui.js b/webAO/ui.js index 56e0dcd..557ca4a 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -8,65 +8,66 @@ var config = { dimensions: { minItemHeight: 40 }, - content: [ - { + content: [{ type: "row", - content: [ - { + content: [{ type: "column", width: 40, - content: [ - { - type: "component", - componentName: "template", - title: "Game", - componentState: { id: "client_wrapper" } + content: [{ + type: "component", + componentName: "template", + title: "Game", + componentState: { + id: "client_wrapper" } - ] + }] }, { type: "column", - content: [ - { + content: [{ type: "row", - height: 65, - content: [ - { - type: "stack", - content: [ - { - type: "component", - title: "Main", - componentName: "template", - componentState: { id: "mainmenu" } - }, - { - type: "component", - title: "Log", - componentName: "template", - componentState: { id: "log" } - } - ] - }, - { + height: 65, + content: [{ + type: "stack", + content: [{ + type: "component", + title: "Main", + componentName: "template", + componentState: { + id: "mainmenu" + } + }, + { + type: "component", + title: "Log", + componentName: "template", + componentState: { + id: "log" + } + } + ] + }, + { type: "component", title: "Music", - width: 30, + width: 30, componentName: "template", - componentState: { id: "music" } - } - ] + componentState: { + id: "music" + } + } + ] }, { type: "row", - content: [ - { - type: "component", - title: "Server chat", - componentName: "template", - componentState: { id: "ooc" } - } - ] + content: [{ + type: "component", + title: "Server chat", + componentName: "template", + componentState: { + id: "ooc" + } + }] } ] } @@ -75,7 +76,7 @@ var config = { }; var golden = new GoldenLayout(config); -golden.registerComponent("template", function(container, componentState) { +golden.registerComponent("template", function (container, componentState) { let template = document.querySelector(`#${componentState.id}`); container.getElement().html(template.content); // TODO: support multiple locales -- cgit From 8818ba99f804b1b1845a4757d67cc32d552956e1 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 8 Sep 2018 19:02:32 -0500 Subject: Continue major cleanup and style fixes --- webAO/ui.js | 133 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 61 insertions(+), 72 deletions(-) (limited to 'webAO/ui.js') diff --git a/webAO/ui.js b/webAO/ui.js index 557ca4a..4aace2d 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -1,85 +1,74 @@ +/* eslint indent: ["error", 2] */ + import GoldenLayout from "./golden/js/goldenlayout.js"; var config = { - settings: { - showPopoutIcon: false, - showCloseIcon: false - }, - dimensions: { - minItemHeight: 40 - }, + settings: { + showPopoutIcon: false, + showCloseIcon: false + }, + dimensions: { + minItemHeight: 40 + }, + content: [{ + type: "row", content: [{ + type: "column", + width: 40, + content: [{ + type: "component", + componentName: "template", + title: "Game", + componentState: { id: "client_wrapper" } + }] + }, + { + type: "column", + content: [{ type: "row", + height: 65, content: [{ - type: "column", - width: 40, - content: [{ - type: "component", - componentName: "template", - title: "Game", - componentState: { - id: "client_wrapper" - } - }] - }, - { - type: "column", - content: [{ - type: "row", - height: 65, - content: [{ - type: "stack", - content: [{ - type: "component", - title: "Main", - componentName: "template", - componentState: { - id: "mainmenu" - } - }, - { - type: "component", - title: "Log", - componentName: "template", - componentState: { - id: "log" - } - } - ] - }, - { - type: "component", - title: "Music", - width: 30, - componentName: "template", - componentState: { - id: "music" - } - } - ] - }, - { - type: "row", - content: [{ - type: "component", - title: "Server chat", - componentName: "template", - componentState: { - id: "ooc" - } - }] - } - ] - } - ] + type: "stack", + content: [{ + type: "component", + title: "Main", + componentName: "template", + componentState: { id: "mainmenu" } + }, + { + type: "component", + title: "Log", + componentName: "template", + componentState: { id: "log" } + }] + }, + { + type: "component", + title: "Music", + width: 30, + componentName: "template", + componentState: { id: "music" } + }] + }, + { + type: "row", + content: [{ + type: "component", + title: "Server chat", + componentName: "template", + componentState: { id: "ooc" } + }] + }] }] + }] }; var golden = new GoldenLayout(config); golden.registerComponent("template", function (container, componentState) { - let 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")); + let 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 -- cgit