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

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

@ -15,9 +15,8 @@ let settings = {};
try {
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')));
}
} catch (err) {
console.error(err);
}
@ -58,14 +57,12 @@ function normalizePort(val) {
if (isNaN(port))
// named pipe
{
return val;
}
if (port >= 0)
// port number
{
return port;
}
return false;
}
@ -74,9 +71,8 @@ function normalizePort(val) {
*/
function onError(error) {
if (error.syscall !== 'listen') {
if (error.syscall !== 'listen')
throw error;
}
let bind = typeof port === 'string'
? 'Pipe ' + port

@ -356,10 +356,9 @@ async function startRound() {
*/
function getLobbyWords() {
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 words;
}
/**
@ -549,14 +548,13 @@ function addChatMessage(messageObject, player) {
msgSpan.setAttribute('class', 'chatMessage');
msgSpan.setAttribute('msg-type', messageObject.type);
msgSpan.setAttribute('msg-id', messageObject.id);
if (messageObject.type === "USER") {
if (messageObject.type === "USER")
msgSpan.innerHTML = `
<span class="chatUsername">${messageObject.author.username}:</span>
<span class="chatMessageContent">${messageObject.htmlContent}</span>`;
} else {
else
msgSpan.innerHTML = `
<span class="chatMessageContent ${messageObject.type}">${messageObject.htmlContent}</span>`;
}
if (messageObject.author && messageObject.author.id !== player)
spawnNotification(messageObject.content, messageObject.author.username);
@ -567,7 +565,8 @@ function addChatMessage(messageObject, player) {
/**
* 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) {
let playerContainer = document.createElement('div');

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

Loading…
Cancel
Save