From 0c8e9d5d1c2bd79660abad6d77d3eda9e7e01884 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 12 May 2019 17:44:43 +0000 Subject: [PATCH 1/7] Pin dependencies --- package-lock.json | 5 ----- package.json | 14 +++++++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 997d613..e5864f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2379,11 +2379,6 @@ "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz", "integrity": "sha1-m+4OmpkKljupbfaYDE/dsF37Tcw=" }, - "markdown-it-linkify-images": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/markdown-it-linkify-images/-/markdown-it-linkify-images-1.1.0.tgz", - "integrity": "sha1-xVedk4bXcgxUbPWD/glq3FmAyFk=" - }, "markdown-it-mark": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-it-mark/-/markdown-it-mark-2.0.0.tgz", diff --git a/package.json b/package.json index d93ee9d..bfa17ea 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "start": "node ./bin/www" }, "dependencies": { - "connect-pg-simple": "^5.0.0", + "connect-pg-simple": "5.0.0", "cookie-parser": "1.4.4", "debug": "4.1.1", "express": "4.16.4", @@ -18,14 +18,14 @@ "graphql-import": "0.7.1", "http-errors": "1.7.2", "js-yaml": "latest", - "markdown-it": "^8.4.2", - "markdown-it-emoji": "^1.4.0", - "markdown-it-mark": "^2.0.0", - "markdown-it-math": "^4.1.1", - "markdown-it-smartarrows": "^1.0.1", + "markdown-it": "8.4.2", + "markdown-it-emoji": "1.4.0", + "markdown-it-mark": "2.0.0", + "markdown-it-math": "4.1.1", + "markdown-it-smartarrows": "1.0.1", "morgan": "1.9.1", "node-sass": "4.12.0", - "pg": "^7.11.0", + "pg": "7.11.0", "pug": "2.0.3" } } From 7bfadab4d2251039521d7005cfaf72c065201379 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 13 May 2019 17:04:59 +0000 Subject: [PATCH 2/7] Update dependency fs-extra to v8 --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5864f9..ef2e683 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1201,9 +1201,9 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.0.1.tgz", + "integrity": "sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A==", "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", diff --git a/package.json b/package.json index bfa17ea..143016f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "express-compile-sass": "latest", "express-graphql": "0.8.0", "express-session": "latest", - "fs-extra": "7.0.1", + "fs-extra": "8.0.1", "graphql": "14.3.0", "graphql-import": "0.7.1", "http-errors": "1.7.2", From 84dbc0b4bb1ba81a3972cadeeb0f6743aea8a6be Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 17 May 2019 02:04:11 +0000 Subject: [PATCH 3/7] Update dependency express to v4.17.0 --- package-lock.json | 200 +++++++++++++++++++++++++++++----------------- package.json | 2 +- 2 files changed, 127 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5864f9..10a33ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -343,22 +343,27 @@ } }, "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "requires": { - "bytes": "3.0.0", + "bytes": "3.1.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -367,15 +372,28 @@ "ms": "2.0.0" } }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" } } } @@ -496,9 +514,9 @@ } }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", @@ -630,9 +648,12 @@ } }, "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } }, "content-type": { "version": "1.0.4", @@ -888,42 +909,47 @@ } }, "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.0.tgz", + "integrity": "sha512-1Z7/t3Z5ZnBG252gKUPyItc4xdeaA0X934ca2ewckAsVsw9EG71i++ZHZPYnus8g/s5Bty8IMpSVEuRkmwwPRQ==", "requires": { - "accepts": "~1.3.5", + "accepts": "~1.3.7", "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", "content-type": "~1.0.4", - "cookie": "0.3.1", + "cookie": "0.4.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.1.1", + "finalhandler": "~1.1.2", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", + "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -931,6 +957,21 @@ "requires": { "ms": "2.0.0" } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -1130,16 +1171,16 @@ } }, "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" }, "dependencies": { @@ -1150,6 +1191,11 @@ "requires": { "ms": "2.0.0" } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -2455,9 +2501,9 @@ } }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { "version": "1.40.0", @@ -3120,9 +3166,9 @@ "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { "version": "2.3.3", @@ -3394,9 +3440,9 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -3405,12 +3451,12 @@ "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "range-parser": "~1.2.1", + "statuses": "~1.5.0" }, "dependencies": { "debug": { @@ -3419,30 +3465,36 @@ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" + "parseurl": "~1.3.3", + "send": "0.17.1" } }, "set-blocking": { diff --git a/package.json b/package.json index bfa17ea..998081a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "connect-pg-simple": "5.0.0", "cookie-parser": "1.4.4", "debug": "4.1.1", - "express": "4.16.4", + "express": "4.17.0", "express-compile-sass": "latest", "express-graphql": "0.8.0", "express-session": "latest", From fe401152a52edce3887dcd01db92082af076b93f Mon Sep 17 00:00:00 2001 From: Trivernis Date: Mon, 20 May 2019 15:37:11 +0200 Subject: [PATCH 4/7] Bug fixes - fixed #18 preloaded info messages can't be hidden - fixed #19 no special character allowed in username --- public/javascripts/bingo-web.js | 11 ++++++----- routes/bingo.js | 2 +- views/bingo/bingo-create.pug | 1 + views/bingo/includes/bingo-chat.pug | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/javascripts/bingo-web.js b/public/javascripts/bingo-web.js index 90a8958..15c4651 100644 --- a/public/javascripts/bingo-web.js +++ b/public/javascripts/bingo-web.js @@ -45,12 +45,12 @@ function spawnNotification(body, title) { */ async function submitUsername() { let unameInput = document.querySelector('#input-username'); - let username = unameInput.value.replace(/^\s+|\s+$/g, ''); + let username = unameInput.value; - if (username.length > 1) { + if (username.length > 1 && username.length <= 30) { return await setUsername(username); } else { - showError('You need to provide a username (minimum 2 characters)!'); + showError('You need to provide a username (min. 2 characters, max. 30)!'); return false; } } @@ -61,7 +61,8 @@ async function submitUsername() { * @returns {Promise} */ async function setUsername(username) { - let uname = username.substring(0, 30).replace(/[^\w- ;[\]]/g, ''); + username = username.replace(/^\s+|\s+$/g, ''); + let uname = username.replace(/[\n\tšŸ‘‘šŸŒŸ]|^\s+|\s+$/gu, ''); if (uname.length === username.length) { let response = await postGraphqlQuery(` mutation($username:String!) { @@ -83,7 +84,7 @@ async function setUsername(username) { return false; } } else { - showError('Your username contains illegal characters.'); + showError(`Your username contains illegal characters (${username.replace(uname, '')}).`); } } diff --git a/routes/bingo.js b/routes/bingo.js index 229602a..26d195d 100644 --- a/routes/bingo.js +++ b/routes/bingo.js @@ -1496,7 +1496,7 @@ router.graphqlResolver = async (req, res) => { }, // mutations setUsername: async ({username}) => { - username = replaceTagSigns(username.substring(0, 30)).replace(/[^\w- ;[\]]/g, ''); // only allow 30 characters + username = replaceTagSigns(username.substring(0, 30)).replace(/[\n\tšŸ‘‘šŸŒŸ]|^\s+|\s+$/gu, ''); // only allow 30 characters if (username.length > 0) { let playerWrapper = new PlayerWrapper(playerId); diff --git a/views/bingo/bingo-create.pug b/views/bingo/bingo-create.pug index bb836c3..dd603e1 100644 --- a/views/bingo/bingo-create.pug +++ b/views/bingo/bingo-create.pug @@ -7,6 +7,7 @@ block content type='text' placeholder='Enter your name' value=username + maxlength=30 onkeydown='submitOnEnter(event, () => indicateStatus(submitUsername, "#username-status"))') button( id='submit-username' diff --git a/views/bingo/includes/bingo-chat.pug b/views/bingo/includes/bingo-chat.pug index 24f6ca8..3e362f1 100644 --- a/views/bingo/includes/bingo-chat.pug +++ b/views/bingo/includes/bingo-chat.pug @@ -2,7 +2,7 @@ div(id='container-chat') style(id='js-style') div(id='chat-content') for message in messages - span.chatMessage(type=message.type msg-id=message.id) + span.chatMessage(msg-type=message.type msg-id=message.id) if message.type === 'USER' span.chatUsername= `${message.username}: ` span(class=`chatMessageContent ${message.type}`)!= message.htmlContent From 5c7bf97995ed71fd71f29e772162a293acbe16f5 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Mon, 20 May 2019 15:47:06 +0200 Subject: [PATCH 5/7] Cleanup - removed refreshChat logging in browser - fixed indentation --- public/javascripts/bingo-web.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/bingo-web.js b/public/javascripts/bingo-web.js index 15c4651..3f95969 100644 --- a/public/javascripts/bingo-web.js +++ b/public/javascripts/bingo-web.js @@ -549,11 +549,12 @@ function addChatMessage(messageObject, player) { msgSpan.setAttribute('class', 'chatMessage'); msgSpan.setAttribute('msg-type', messageObject.type); msgSpan.setAttribute('msg-id', messageObject.id); + if (messageObject.type === "USER") msgSpan.innerHTML = ` ${messageObject.author.username}: ${messageObject.htmlContent}`; - else + else msgSpan.innerHTML = ` ${messageObject.htmlContent}`; @@ -622,7 +623,6 @@ async function refreshChat() { showError('Failed to refresh messages'); console.error(err); } - console.log('Refresh Chat'); } /** From d2d8ab7dc4fdfd8fd2f79510e262874ebc5134d6 Mon Sep 17 00:00:00 2001 From: Julius Date: Tue, 21 May 2019 09:51:25 +0200 Subject: [PATCH 6/7] Added release to changelog - added version tag 0.1.1 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae1e1e..1bb13f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.1] - 2019-05-21 + +## Fixed +- preloaded info messages can't be hidden (#18) +- no special character allowed in username (#19) + ## [0.1.0] - 2019-05-19 ### Added From c34fb78ecde15cbde53f084a002aa7e57db047c6 Mon Sep 17 00:00:00 2001 From: Julius Date: Tue, 21 May 2019 09:52:35 +0200 Subject: [PATCH 7/7] Fixed changelog - fixed 'fixed' headline size --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb13f6..10e5bc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.1.1] - 2019-05-21 -## Fixed +### Fixed - preloaded info messages can't be hidden (#18) - no special character allowed in username (#19)