From 73ff02be6744255b895b548b980385a8cc938e1a Mon Sep 17 00:00:00 2001 From: Julius Date: Fri, 17 May 2019 10:30:51 +0200 Subject: [PATCH] Style fixes - fixed image and linebreaks in chat - changed ids for messages and words to bigserial --- app.js | 2 +- public/stylesheets/sass/bingo/style.sass | 7 +++++++ sql/bingo/createBingoTables.sql | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 771587b..3447de8 100644 --- a/app.js +++ b/app.js @@ -59,7 +59,7 @@ async function init() { app.use('/sass', compileSass({ root: './public/stylesheets/sass', sourceMap: true, - watchFiles: true, + watchFiles: (process.env.NODE_ENV !== 'development'), logToConsole: true })); app.use(express.static(path.join(__dirname, 'public'))); diff --git a/public/stylesheets/sass/bingo/style.sass b/public/stylesheets/sass/bingo/style.sass index 676a751..1ee72a7 100644 --- a/public/stylesheets/sass/bingo/style.sass +++ b/public/stylesheets/sass/bingo/style.sass @@ -54,6 +54,7 @@ .chatMessage display: block padding: 0.2em + word-break: break-word .INFO font-style: italic @@ -66,12 +67,18 @@ .chatUsername color: $inactive + img + width: 100% + height: auto + border-radius: 0.2em + #container-chat height: calc(100% - 2px) #chat-content height: calc(100% - 3rem) width: calc(100% - 2px) overflow-y: auto + overflow-x: hide border: 1px solid $inactive box-shadow: inset 0 0 1rem $primary #chat-input diff --git a/sql/bingo/createBingoTables.sql b/sql/bingo/createBingoTables.sql index e84d6b3..c6d7c3b 100644 --- a/sql/bingo/createBingoTables.sql +++ b/sql/bingo/createBingoTables.sql @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS bingo.lobby_players ( -- words table CREATE TABLE IF NOT EXISTS bingo.words ( - id serial UNIQUE PRIMARY KEY, + id bigserial UNIQUE PRIMARY KEY, lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE, heared integer DEFAULT 0 NOT NULL, content varchar(254) NOT NULL @@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS bingo.words ( -- messages table CREATE TABLE IF NOT EXISTS bingo.messages ( - id serial UNIQUE PRIMARY KEY, + id bigserial UNIQUE PRIMARY KEY, content varchar(255) NOT NULL, player_id integer, lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE,