Release cleanup

- code cleanup and release declaration
pull/15/head
Trivernis 6 years ago
parent c91712d367
commit 2e31a513d3

@ -4,8 +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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [0.1.0] - 2019-05-19
### Added ### Added

@ -15,8 +15,8 @@ const createError = require('http-errors'),
settings = globals.settings, settings = globals.settings,
indexRouter = require('./routes/index'), indexRouter = require('./routes/index'),
usersRouter = require('./routes/users'), //usersRouter = require('./routes/users'),
riddleRouter = require('./routes/riddle'), //riddleRouter = require('./routes/riddle'),
changelogRouter = require('./routes/changelog'), changelogRouter = require('./routes/changelog'),
bingoRouter = require('./routes/bingo'); bingoRouter = require('./routes/bingo');

@ -15,9 +15,8 @@ let settings = {};
try { try {
settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml')); settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml'));
if (fsx.existsSync('config.yaml')) { if (fsx.existsSync('config.yaml'))
Object.assign(settings, yaml.safeLoad(fsx.readFileSync('config.yaml'))); Object.assign(settings, yaml.safeLoad(fsx.readFileSync('config.yaml')));
}
} catch (err) { } catch (err) {
console.error(err); console.error(err);
} }
@ -58,14 +57,12 @@ function normalizePort(val) {
if (isNaN(port)) if (isNaN(port))
// named pipe // named pipe
{
return val; return val;
}
if (port >= 0) if (port >= 0)
// port number // port number
{
return port; return port;
}
return false; return false;
} }
@ -74,9 +71,8 @@ function normalizePort(val) {
*/ */
function onError(error) { function onError(error) {
if (error.syscall !== 'listen') { if (error.syscall !== 'listen')
throw error; throw error;
}
let bind = typeof port === 'string' let bind = typeof port === 'string'
? 'Pipe ' + port ? 'Pipe ' + port

@ -356,10 +356,9 @@ async function startRound() {
*/ */
function getLobbyWords() { function getLobbyWords() {
let textinput = document.querySelector('#input-bingo-words'); let textinput = document.querySelector('#input-bingo-words');
let words = textinput.value.replace(/[<>]/g, '').split('\n').filter((el) => { return textinput.value.replace(/[<>]/g, '').split('\n').filter((el) => {
return (!!el && el.length > 0); // remove empty strings and non-types from word array return (!!el && el.length > 0); // remove empty strings and non-types from word array
}); });
return words;
} }
/** /**
@ -549,14 +548,13 @@ function addChatMessage(messageObject, player) {
msgSpan.setAttribute('class', 'chatMessage'); msgSpan.setAttribute('class', 'chatMessage');
msgSpan.setAttribute('msg-type', messageObject.type); msgSpan.setAttribute('msg-type', messageObject.type);
msgSpan.setAttribute('msg-id', messageObject.id); msgSpan.setAttribute('msg-id', messageObject.id);
if (messageObject.type === "USER") { if (messageObject.type === "USER")
msgSpan.innerHTML = ` msgSpan.innerHTML = `
<span class="chatUsername">${messageObject.author.username}:</span> <span class="chatUsername">${messageObject.author.username}:</span>
<span class="chatMessageContent">${messageObject.htmlContent}</span>`; <span class="chatMessageContent">${messageObject.htmlContent}</span>`;
} else { else
msgSpan.innerHTML = ` msgSpan.innerHTML = `
<span class="chatMessageContent ${messageObject.type}">${messageObject.htmlContent}</span>`; <span class="chatMessageContent ${messageObject.type}">${messageObject.htmlContent}</span>`;
}
if (messageObject.author && messageObject.author.id !== player) if (messageObject.author && messageObject.author.id !== player)
spawnNotification(messageObject.content, messageObject.author.username); spawnNotification(messageObject.content, messageObject.author.username);
@ -567,7 +565,8 @@ function addChatMessage(messageObject, player) {
/** /**
* Adds a player to the player view * Adds a player to the player view
* @param player * @param player {Object} - player as returned by graphql
* @param options {Object} - meta information
*/ */
function addPlayer(player, options) { function addPlayer(player, options) {
let playerContainer = document.createElement('div'); let playerContainer = document.createElement('div');

@ -80,7 +80,7 @@
height: calc(100% - 3rem) height: calc(100% - 3rem)
width: calc(100% - 2px) width: calc(100% - 2px)
overflow-y: auto overflow-y: auto
overflow-x: hide overflow-x: hidden
border: 1px solid $inactive border: 1px solid $inactive
box-shadow: inset 0 0 1rem $primary box-shadow: inset 0 0 1rem $primary
#chat-input #chat-input

Loading…
Cancel
Save