Release cleanup and fix

- added auto-scroll to message to edit
- fixed style issues
pull/24/head
Trivernis 6 years ago
parent db5650e329
commit b723d2aa85

@ -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

@ -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');

@ -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,13 +885,11 @@ 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')) {
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();
await onInputKeypress(e);

@ -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 {

@ -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);

Loading…
Cancel
Save