diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5e990..457bb69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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). -## [Unreleased] +## [0.2.0] - 2019-05-23 ### Added diff --git a/bin/www b/bin/www index 53f34d5..57ec0e5 100644 --- a/bin/www +++ b/bin/www @@ -6,7 +6,6 @@ const appInit = require('../app'); const debug = require('debug')('whooshy:server'); -const http = require('http'); const yaml = require('js-yaml'); const fsx = require('fs-extra'); diff --git a/public/javascripts/bingo-web.js b/public/javascripts/bingo-web.js index 9d74d08..5d54fed 100644 --- a/public/javascripts/bingo-web.js +++ b/public/javascripts/bingo-web.js @@ -318,6 +318,8 @@ class ChatInput { this.element.value = message.getAttribute('msg-raw'); this.editId = Number(message.getAttribute('msg-id')); + let chatContent = document.querySelector('#chat-content'); + chatContent.scrollTop = message.offsetTop; } else { this.setNormal(); } @@ -331,6 +333,8 @@ class ChatInput { if (lastMessage) lastMessage.classList.remove('selected'); this.editId = null; + let chatContent = document.querySelector('#chat-content'); + chatContent.scrollTop = chatContent.scrollHeight; } } } @@ -881,12 +885,10 @@ window.addEventListener("unhandledrejection", function (promiseRejectionEvent) { // prevent ctrl + s window.addEventListener("keydown", async (e) => { - if (e.which === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { - if (document.querySelector('#input-bingo-words')) { - e.preventDefault(); - let gridSize = document.querySelector('#input-grid-size').value || 3; - await statusWrap(async () => await BingoGraphqlHelper.setLobbySettings(getLobbyWords(), gridSize)); - } + if (e.which === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey) && document.querySelector('#input-bingo-words')) { + e.preventDefault(); + let gridSize = document.querySelector('#input-grid-size').value || 3; + await statusWrap(async () => await BingoGraphqlHelper.setLobbySettings(getLobbyWords(), gridSize)); } if ([40, 38, 27].includes(e.which) && e.target === document.querySelector('#chat-Input')) { e.preventDefault(); diff --git a/routes/bingo.js b/routes/bingo.js index ae4b7b7..978bfe7 100644 --- a/routes/bingo.js +++ b/routes/bingo.js @@ -1520,7 +1520,7 @@ async function resolvePlayer(playerWrapper, lobbyId) { /** * Resolves a fieldWrapper object * @param fieldWrapper - * @returns {Promise<{submitted: (Object.submitted|*), column: *, bingo: boolean, row: (Object.grid_row|number|*)}>} + * @returns {Promise<{submitted: (Object.submitted|*), column: *, bingo: boolean, row: (*)}>} */ async function resolveGridField(fieldWrapper) { return { diff --git a/routes/changelog.js b/routes/changelog.js index 849a59e..fc0dc93 100644 --- a/routes/changelog.js +++ b/routes/changelog.js @@ -1,7 +1,6 @@ const express = require('express'), router = express.Router(), globals = require('../lib/globals'), - fsx = require('fs-extra'), mdEmoji = require('markdown-it-emoji'), md = require('markdown-it')() .use(mdEmoji);