From ddec77d8d3d304f61e86946ca73be6f23b11163e Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Fri, 31 Jan 2020 02:00:49 +0100 Subject: [PATCH] TODO: board+moves in same div fixed width centered, chat modal (any screen size) --- TODO | 6 ++ client/src/components/MoveList.vue | 95 ------------------------------ server/TODO | 4 -- 3 files changed, 6 insertions(+), 99 deletions(-) delete mode 100644 server/TODO diff --git a/TODO b/TODO index 95431640..d8ba4f0f 100644 --- a/TODO +++ b/TODO @@ -43,3 +43,9 @@ http://www.quadibloc.com/chess/ch0401.htm Inspiration for refactor: https://github.com/triestpa/Vue-Chess/blob/master/src/components/chessboard/chessboard.js https://github.com/gustaYo/vue-chess + +Server: +Later: use http2 +https://webapplog.com/http2-node/ +https://www.npmjs.com/package/spdy +Express 5? diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 1e19a2bd..1bb44367 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -59,98 +59,3 @@ export default { td.highlight-lm background-color: plum </style> - -<!-- Old render method: - render(h) { - if (this.moves.length == 0) - return; - let tableContent = []; - let moveCounter = 0; - let tableRow = undefined; - let moveCells = undefined; - let curCellContent = ""; - for (let i=0; i<this.moves.length; i++) - { - if (this.moves[i].color == "w") - { - if (i == 0 || i>0 && this.moves[i-1].color=="b") - { - if (!!tableRow) - { - tableRow.children = moveCells; - tableContent.push(tableRow); - } - moveCells = [ - h( - "td", - { domProps: { innerHTML: (++moveCounter) + "." } } - ) - ]; - tableRow = h( - "tr", - { } - ); - curCellContent = ""; - } - } - curCellContent += this.moves[i].notation; - if (i < this.moves.length-1 && this.moves[i+1].color == this.moves[i].color) - curCellContent += ","; - else //color change - { - moveCells.push( - h( - "td", - { - domProps: { innerHTML: curCellContent }, - on: { click: () => this.gotoMove(i) }, - "class": { "highlight-lm": this.cursor == i }, - } - ) - ); - curCellContent = ""; - } - } - // Complete last row, which might not be full: - if (moveCells.length-1 == 1) - { - moveCells.push( - h( - "td", - { domProps: { innerHTML: "" } } - ) - ); - } - tableRow.children = moveCells; - tableContent.push(tableRow); - const scoreDiv = h("div", - { - id: "scoreInfo", - style: { - display: this.score!="*" ? "block" : "none", - }, - }, - [ - h("p", this.score), - h("p", this.message), - ] - ); - const movesTable = h( - "div", - { }, - [ - scoreDiv, - h( - "table", - { - "class": { - "moves-list": true, - }, - }, - tableContent - ) - ] - ); - return movesTable; - }, ---> diff --git a/server/TODO b/server/TODO deleted file mode 100644 index bd5d7309..00000000 --- a/server/TODO +++ /dev/null @@ -1,4 +0,0 @@ -Later: use http2 -https://webapplog.com/http2-node/ -https://www.npmjs.com/package/spdy -Express 5? -- 2.44.0