diff --git a/WORKLOG.md b/WORKLOG.md
index 5af518fa..da05e3ac 100644
--- a/WORKLOG.md
+++ b/WORKLOG.md
@@ -10,6 +10,9 @@
* treats
* constructs jiggle when clicked
* background colour changes depending on time of day
+ * hit animation wobble
+ * combat text scale + translate
+ * susbcriber gold name in instance
* bot game grind
* stress test
diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less
index 747c36ca..cd773c0d 100644
--- a/client/assets/styles/styles.less
+++ b/client/assets/styles/styles.less
@@ -67,6 +67,7 @@ hr {
color: #222;
margin: 1.5em 0;
width: 100%;
+ border-top: 1px solid #222;
}
figure {
@@ -287,4 +288,13 @@ header {
nav {
display: none;
+}
+
+ul {
+ margin-bottom: 1em;
+ list-style: inside;
+}
+
+li {
+ margin-bottom: 0.5em;
}
\ No newline at end of file
diff --git a/client/src/components/account.page.jsx b/client/src/components/account.page.jsx
index 6b945876..c8b7563a 100644
--- a/client/src/components/account.page.jsx
+++ b/client/src/components/account.page.jsx
@@ -1,7 +1,7 @@
const { connect } = require('preact-redux');
const preact = require('preact');
-const Team = require('./team');
+const Collection = require('./collection');
const Header = require('./header');
const AccountManagement = require('./account.management');
@@ -26,8 +26,8 @@ function Account(args) {
return (
);
}
diff --git a/client/src/components/account.management.jsx b/client/src/components/account.top.jsx
similarity index 100%
rename from client/src/components/account.management.jsx
rename to client/src/components/account.top.jsx
diff --git a/client/src/components/collection.jsx b/client/src/components/collection.jsx
new file mode 100644
index 00000000..c6441803
--- /dev/null
+++ b/client/src/components/collection.jsx
@@ -0,0 +1,89 @@
+const preact = require('preact');
+const { connect } = require('preact-redux');
+
+const actions = require('./../actions');
+const { COLOURS } = require('./../utils');
+const { ConstructAvatar } = require('./construct');
+
+const addState = connect(
+ function receiveState(state) {
+ const { ws, constructs, teamPage, teamSelect } = state;
+
+ function sendConstructSpawn(name) {
+ return ws.sendMtxConstructSpawn(name);
+ }
+
+ return {
+ constructs,
+ teamPage,
+ teamSelect,
+ };
+ },
+ function receiveDispatch(dispatch) {
+ function setTeam(constructIds) {
+ dispatch(actions.setTeamSelect(constructIds));
+ }
+
+ return {
+ setTeam,
+ };
+ }
+);
+
+function Collection(args) {
+ const {
+ constructs,
+ teamPage,
+ teamSelect,
+ setTeam,
+ } = args;
+
+ if (!constructs) return
;
+
+ // redux limitation + suggested workaround
+ // so much for dumb components
+ function selectConstruct(id) {
+ // remove
+ const i = teamSelect.findIndex(sid => sid === id);
+ if (i > -1) {
+ teamSelect[i] = null;
+ return setTeam(teamSelect);
+ }
+
+ // window insert
+ const insert = teamSelect.findIndex(j => j === null);
+ if (insert === -1) return setTeam([id, null, null]);
+ teamSelect[insert] = id;
+ return setTeam(teamSelect);
+ }
+ console.log(constructs.length);
+ const dispConstructs = constructs.length >= ((teamPage + 1) * 6)
+ ? constructs.slice(teamPage * 6, (teamPage + 1) * 6)
+ : constructs.slice(teamPage * 6, constructs.length);
+
+ const constructPanels = dispConstructs.map(construct => {
+ const colour = teamSelect.indexOf(construct.id);
+ const selected = colour > -1;
+
+ const borderColour = selected ? COLOURS[colour] : '#000000';
+
+ return (
+ selectConstruct(construct.id)} >
+
+
{construct.name}
+
+ );
+ });
+
+ return (
+
+ );
+}
+
+module.exports = addState(Collection);
diff --git a/client/src/components/header.jsx b/client/src/components/header.jsx
index 8248e9ac..7c776ff8 100644
--- a/client/src/components/header.jsx
+++ b/client/src/components/header.jsx
@@ -2,19 +2,13 @@ const { connect } = require('preact-redux');
const preact = require('preact');
const actions = require('../actions');
-const AccountStatus = require('./account.status');
const addState = connect(
function receiveState(state) {
const {
ws,
account,
- instances,
- team,
nav,
- ping,
-
- game,
} = state;
function sendInstanceState(instance) {
@@ -28,11 +22,8 @@ const addState = connect(
return {
account,
- instances,
- team,
- game,
- ping,
nav,
+
sendInstanceState,
sendAccountStates,
};
@@ -53,29 +44,19 @@ const addState = connect(
return dispatch(actions.setNav(place));
}
- function hideNav() {
- return dispatch(actions.setShowNav(false));
- }
-
return {
setNav,
- hideNav,
};
}
);
-function Nav(args) {
+function Header(args) {
const {
account,
- game,
- team,
nav,
sendAccountStates,
- sendInstanceState,
-
setNav,
- hideNav,
} = args;
if (!account) return false;
@@ -84,12 +65,6 @@ function Nav(args) {
return setNav(p);
}
- function joinInstance(i) {
- sendInstanceState(i);
- if (game) navTo('transition');
- return true;
- }
-
function accountClick() {
sendAccountStates();
navTo('account');
@@ -104,8 +79,8 @@ function Nav(args) {
MNML