From f43b9f6cc3077d13c634962c38e3040ecb44ae80 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 2 Sep 2019 17:00:55 +1000 Subject: [PATCH 1/6] tabs init --- WORKLOG.md | 4 +++ bin/deploy.sh | 1 - client/assets/styles/instance.less | 2 +- client/assets/styles/menu.less | 18 ++++++++-- client/assets/styles/styles.less | 45 ++++++++++++++++-------- client/src/components/info.component.jsx | 2 ++ client/src/components/play.jsx | 19 ++++++++++ client/src/components/vbox.component.jsx | 20 +++++------ etc/telegraf/telegraf.conf | 2 +- 9 files changed, 84 insertions(+), 29 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index bc56173d..5d23e2e2 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -11,6 +11,10 @@ * constructs jiggle when clicked * background colour changes depending on time of day + * other + * skill pane bigger + * add colours and speed -> Skill > B + * bot game grind * change score to enum diff --git a/bin/deploy.sh b/bin/deploy.sh index 15778cd7..0c9362f1 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -6,7 +6,6 @@ MNML_PATH=$(realpath "$DIR/../") VERSION=$(<"$MNML_PATH/VERSION") SERVER_BIN_DIR="/usr/local/mnml/bin" - CLIENT_DIST_DIR="/var/lib/mnml/client" CLIENT_PUBLIC_DIR="/var/lib/mnml/public/current" diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index d9c5a195..21d5b885 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -3,7 +3,7 @@ .instance { overflow-x: hidden; display: grid; - grid-template-columns: 2fr minmax(min-content, 1fr); + grid-template-columns: 1fr minmax(min-content, 1fr); grid-template-rows: min-content 1fr; grid-template-areas: diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index fb919124..acb680a1 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -4,11 +4,12 @@ height: 100%; display: grid; - grid-template-rows: minmax(min-content, 2fr) 1fr; + grid-template-rows: minmax(min-content, 2fr) min-content 1fr; grid-template-columns: 1fr; grid-template-areas: "top" + "tabs" "bottom"; .top { @@ -63,7 +64,6 @@ .inventory { margin-top: 2em; grid-area: bottom; - display: grid; grid-template-columns: 1fr 1fr; @@ -87,4 +87,18 @@ flex-flow: column; } } + + .options { + grid-area: tabs; + display: flex; + flex-flow: row; + button { + border-top: 0; + border: 1px solid #222; + &:not(:last-child) { + border-right: 0; + } + flex: 1; + } + } } diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index 30b6d8e1..e678e581 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -88,8 +88,8 @@ dl { grid-template-rows: min-content 1fr min-content; grid-template-areas: "hd hd ctrl" - "nav main ctrl" - "nav main ctrl"; + "main main ctrl" + "main main ctrl"; } main { @@ -198,12 +198,6 @@ button[disabled] { */ .welcome { - .highlight { - color: black; - background: @white; - border: 1px solid @white; - } - .login { width: 50%; display: flex; @@ -213,11 +207,6 @@ button[disabled] { .options { width: 50%; - display: flex; - flex-flow: row; - button { - flex: 1; - } } h2 { @@ -262,4 +251,32 @@ figure.gray { .mobile-title { display: none; -} \ No newline at end of file +} + +.options { + display: flex; + flex-flow: row; + + button { + &.highlight { + color: @white; + box-shadow: inset 0px 5px 0px 0px @white; + border: 0; + &:first-child { + border-left: 1px solid #444; + } + + &:last-child { + border-right: 1px solid #444; + } + + } + + border: 1px solid #444; + flex: 1; + } +} + +nav { + display: none; +} diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index 547581aa..49393582 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -31,6 +31,8 @@ function InfoComponent(args) { return (

{fullInfo.item}

+

Skill > BB

+

tri 3

{infoDescription}
); diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index 7b508c70..d306d3d8 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -111,6 +111,25 @@ function Play(args) {
{constructPanels}
+

mnml.gg

+
+ + + + +
); diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 232ba9c2..a7ffdc38 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -203,7 +203,7 @@ function Vbox(args) { @@ -213,7 +213,7 @@ function Vbox(args) { return ( @@ -270,7 +270,7 @@ function Vbox(args) { // key={i} // class={`${highlighted ? 'highlight' : ''}`} // onMouseOver={(e) => vboxHover(e, value)} - // onClick={e => boundClick(e, i, highlighted) }> + // onMouseDown={e => boundClick(e, i, highlighted) }> // {convertItem(value)} // // ); @@ -311,7 +311,7 @@ function Vbox(args) { ); @@ -320,7 +320,7 @@ function Vbox(args) { return ( @@ -347,7 +347,7 @@ function Vbox(args) { class='vbox-btn' disabled={combiner.length !== 3} onMouseOver={e => hoverInfo(e, 'refine')} - onClick={() => sendVboxCombine()}> + onMouseDown={() => sendVboxCombine()}> {text} ); @@ -364,7 +364,7 @@ function Vbox(args) { return (
hoverInfo(e, 'inventory')}>
@@ -372,7 +372,7 @@ function Vbox(args) {
diff --git a/etc/telegraf/telegraf.conf b/etc/telegraf/telegraf.conf index 9d994fd3..97a108c7 100644 --- a/etc/telegraf/telegraf.conf +++ b/etc/telegraf/telegraf.conf @@ -101,7 +101,7 @@ ## urls will be written to each interval. # urls = ["unix:///var/run/influxdb.sock"] # urls = ["udp://127.0.0.1:8089"] - urls = ["http://mnml-prod-elk:8086"] + urls = ["http://mnml-prod-mn:8086"] ## The target database for metrics; will be created as needed. ## For UDP url endpoint database needs to be configured on server side. From f0a67432384ce203b591648c0d82e3790cc03177 Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 4 Sep 2019 15:15:16 +1000 Subject: [PATCH 2/6] remove title --- client/src/components/play.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index d306d3d8..ae4f16e7 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -111,7 +111,6 @@ function Play(args) {
{constructPanels}
-

mnml.gg

@@ -214,6 +216,7 @@ function Vbox(args) { @@ -251,32 +256,6 @@ function Vbox(args) { // // INVENTORY // - - // const boundTds = range(0, 9).map(i => { - // const value = vbox.bound[i]; - // if (combiner.indexOf(i) > -1) { - // return ( - // - //   - // - // ); - // } - - // const highlighted = value && vboxHighlight.includes(value); - - // return ( - // vboxHover(e, value)} - // onMouseDown={e => boundClick(e, i, highlighted) }> - // {convertItem(value)} - // - // ); - // }); - - function reclaimClick(e) { e.stopPropagation(); return setReclaiming(!reclaiming); @@ -292,6 +271,7 @@ function Vbox(args) { } function onClick(e) { + if (vboxSelecting) clearVboxSelected(); if (reclaiming) return sendVboxReclaim(i); const combinerIndex = combiner.indexOf(i); @@ -310,6 +290,7 @@ function Vbox(args) { @@ -320,6 +301,7 @@ function Vbox(args) { @@ -346,6 +328,7 @@ function Vbox(args) { class='vbox-btn' disabled={combiner.length !== 3} onMouseOver={e => hoverInfo(e, 'refine')} + onClick={e => e.stopPropagation()} onMouseDown={() => sendVboxCombine()}> {text} @@ -364,6 +347,7 @@ function Vbox(args) { return (
e.stopPropagation()} style={vboxSelecting || itemUnequip.length ? { cursor: 'pointer' } : null} onMouseOver={e => hoverInfo(e, 'inventory')}>
@@ -371,6 +355,7 @@ function Vbox(args) { From 7af81c5252d7904dac3205fca5eccd14b6d0a2a2 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 6 Sep 2019 12:13:54 +1000 Subject: [PATCH 4/6] woah --- WORKLOG.md | 3 - client/assets/styles/account.less | 3 - client/assets/styles/controls.less | 13 +- client/assets/styles/instance.less | 2 +- client/assets/styles/menu.less | 25 ++-- client/assets/styles/styles.less | 28 ++-- client/src/components/account.management.jsx | 25 ++-- client/src/components/account.page.jsx | 2 + client/src/components/game.ctrl.jsx | 8 +- client/src/components/header.jsx | 131 ++++++++++++++---- client/src/components/info.component.jsx | 14 +- client/src/components/instance.constructs.jsx | 2 +- client/src/components/instance.ctrl.jsx | 10 +- client/src/components/inventory.jsx | 29 ++-- client/src/components/main.jsx | 2 +- client/src/components/mnml.jsx | 1 - client/src/components/nav.jsx | 1 - client/src/components/play.ctrl.jsx | 57 ++++++-- client/src/components/play.jsx | 24 +--- client/src/components/shapes.jsx | 2 +- client/src/components/team.ctrl.jsx | 2 +- client/src/components/team.jsx | 4 +- server/src/img.rs | 5 +- 23 files changed, 265 insertions(+), 128 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 999f1afa..5af518fa 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -11,9 +11,6 @@ * constructs jiggle when clicked * background colour changes depending on time of day -* bug fixes - * pvp 1st round doesn't resolve until warden timer completes - * bot game grind * stress test diff --git a/client/assets/styles/account.less b/client/assets/styles/account.less index d6f43a30..74ef9e3c 100644 --- a/client/assets/styles/account.less +++ b/client/assets/styles/account.less @@ -1,9 +1,6 @@ @import 'colours.less'; .account { - margin-top: 2em; - grid-area: bottom; - display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-gap: 0 1em; diff --git a/client/assets/styles/controls.less b/client/assets/styles/controls.less index d036debc..4484d720 100644 --- a/client/assets/styles/controls.less +++ b/client/assets/styles/controls.less @@ -8,10 +8,17 @@ aside { "timer controls"; grid-template-columns: min-content 1fr; - grid-template-rows: 1fr 1fr 1fr; - grid-gap: 0.5em 0; + grid-template-rows: 1fr; - padding: 1em 1em 1em 0; + padding-left: 1em; + + .controls { + grid-area: controls; + + display: grid; + grid-auto-rows: 1fr; + grid-gap: 0.5em 0; + } // fix chrome being inconsistent table { diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 88ce7692..ee7a1898 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -1,7 +1,7 @@ @import 'colours.less'; .instance { - overflow-x: hidden; + overflow: hidden; display: grid; grid-template-columns: 1fr minmax(min-content, 1fr); grid-template-rows: min-content 1fr; diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index acb680a1..041f0263 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -4,17 +4,16 @@ height: 100%; display: grid; - grid-template-rows: minmax(min-content, 2fr) min-content 1fr; + grid-template-rows: min-content 1fr 2fr; grid-template-columns: 1fr; grid-template-areas: + "hdr" "top" - "tabs" "bottom"; .top { grid-area: top; - padding: 0 0 0.5em 2em; border-bottom: 0.1em solid #222; box-sizing: border-box; } @@ -25,9 +24,10 @@ .team { display: grid; - grid-area: top; + grid-area: bottom; grid-template-columns: repeat(auto-fill, minmax(min-content, 33%)); max-height: 100%; + margin-top: 1em; .team-select:not(:nth-child(3n)) { margin-right: 0.5em; @@ -62,8 +62,6 @@ } .inventory { - margin-top: 2em; - grid-area: bottom; display: grid; grid-template-columns: 1fr 1fr; @@ -71,6 +69,10 @@ margin-bottom: 0.5em; } + .news { + padding-right: 1em; + } + .list { letter-spacing: 0.25em; text-transform: uppercase; @@ -89,16 +91,19 @@ } .options { - grid-area: tabs; - display: flex; - flex-flow: row; + grid-area: hdr; + button { + width: 25%; border-top: 0; border: 1px solid #222; &:not(:last-child) { border-right: 0; } - flex: 1; + + &:last-child { + float: right; + } } } } diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index e678e581..747c36ca 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -84,16 +84,17 @@ dl { #mnml { display: grid; - grid-template-columns: minmax(min-content, 1fr) 8fr 1fr; - grid-template-rows: min-content 1fr min-content; + grid-template-columns: 9fr 1fr; + grid-template-rows: min-content min-content 1fr; grid-template-areas: - "hd hd ctrl" - "main main ctrl" - "main main ctrl"; + "hdr ctrl" + "main ctrl" + "main ctrl"; + + padding: 0.5em 1em; } main { - padding: 1em; grid-area: main; } @@ -253,10 +254,17 @@ figure.gray { display: none; } -.options { - display: flex; - flex-flow: row; +header { + .options { + font-size: 150%; + } + button { + height: 2em; + } +} + +.options { button { &.highlight { color: @white; @@ -279,4 +287,4 @@ figure.gray { nav { display: none; -} +} \ No newline at end of file diff --git a/client/src/components/account.management.jsx b/client/src/components/account.management.jsx index b2799138..813e6054 100644 --- a/client/src/components/account.management.jsx +++ b/client/src/components/account.management.jsx @@ -151,19 +151,9 @@ class AccountStatus extends Component { } return ( -