diff --git a/WORKLOG.md b/WORKLOG.md index 2c7a7056..1da7877d 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -33,7 +33,6 @@ * rename costs 1cr * invader set -* start with 3 constructs w/ random names * new construct costs 5cr @@ -56,10 +55,10 @@ do not allow vbox actions for finished instances *SERVER* +* push events ## SOON -* push events * iconography * icons change with % * find new icons for colours / life @@ -76,9 +75,6 @@ do not allow vbox actions for finished instances * mnml tv -* flavour text - * chat wheel trash talk - * KO animations and trash talk * the *real* authentication endpoint hit /auth with un/pw or token diff --git a/client/assets/styles/styles.css b/client/assets/styles/styles.css index 5eae445b..6ca8dca7 100644 --- a/client/assets/styles/styles.css +++ b/client/assets/styles/styles.css @@ -399,6 +399,7 @@ header { .menu-construct .controls { display: flex; + justify-content: flex-end; } .menu-construct .controls h2 { @@ -408,9 +409,8 @@ header { .menu-construct .controls button { color: #444; flex: 0; - margin: 0; + margin: 0 1em 0 0; border: none; - padding: 0.25em; } .menu-construct .controls button:hover, .menu-construct .controls button:active { @@ -454,6 +454,31 @@ header { opacity: 0 } +.inventory { + display: flex; + flex-flow: row wrap; +} + +.inventory h2 { + flex: 1 0 100%; +} + +.inventory figure { + flex: 0 0 10%; + display: flex; + flex-flow: column; + margin: 0.5em 1em; +} + +/* heading included */ +.inventory figure:nth-child(3) { + margin-right: 2em; +} + +.inventory figure div { + +} + .menu-instances { display: flex; flex-flow: column; diff --git a/client/src/actions.jsx b/client/src/actions.jsx index 58a30438..5dded5df 100644 --- a/client/src/actions.jsx +++ b/client/src/actions.jsx @@ -1,6 +1,6 @@ export const setAccount = value => ({ type: 'SET_ACCOUNT', value }); export const setConstructs = value => ({ type: 'SET_CONSTRUCTS', value }); -export const setConstructDeleteId = value => ({ type: 'SET_CONSTRUCT_DELETE_ID', value }); +export const setConstructEditId = value => ({ type: 'SET_CONSTRUCT_EDIT_ID', value }); export const setItemInfo = value => ({ type: 'SET_ITEM_INFO', value }); export const setSkip = value => ({ type: 'SET_SKIP', value }); export const setVboxHighlight = value => ({ type: 'SET_VBOX_HIGHLIGHT', value }); diff --git a/client/src/components/list.jsx b/client/src/components/list.jsx index 60b9034c..45712ef4 100644 --- a/client/src/components/list.jsx +++ b/client/src/components/list.jsx @@ -37,6 +37,16 @@ const addState = connect( instanceList, }; }, + + function receiveDispatch(dispatch) { + function editConstruct(id) { + dispatch(actions.setConstructEditId(id)); + } + + return { + editConstruct, + }; + } ); function List(args) { @@ -48,20 +58,16 @@ function List(args) { sendInstanceJoin, sendInstanceList, instanceList, + + editConstruct, } = args; function listElements() { if (!instanceList) return
...
; const instancePanels = instanceList.map(instance => { - const player = instance.players.find(p => p.id === account.id); - const scoreText = player - ? `${player.wins} : ${player.losses}` - : ''; - function instanceClick() { - if (!player) return sendInstanceJoin(instance); - return sendInstanceState(instance); + return sendInstanceJoin(instance); } return ( @@ -69,21 +75,16 @@ function List(args) { class="right" onClick={instanceClick} > {instance.name} - {instance.players.length} / {instance.max_players} - {scoreText} ); }); return (