From 2ece8e9975933c7f4a8db2a7291b01018c4c9b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Thu, 30 Apr 2020 12:48:36 +0200 Subject: [PATCH] Make layout configurable in client, fixes #227 --- app/public/config/config.example.js | 15 ++++++++------- app/src/reducers/room.js | 11 +++++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/public/config/config.example.js b/app/public/config/config.example.js index 371d399..cf2703d 100644 --- a/app/public/config/config.example.js +++ b/app/public/config/config.example.js @@ -42,17 +42,18 @@ var config = { tcp : true }, - lastN : 4, - mobileLastN : 1, + defaultLayout : 'democratic', // democratic, filmstrip + lastN : 4, + mobileLastN : 1, // Highest number of speakers user can select - maxLastN : 5, + maxLastN : 5, // If truthy, users can NOT change number of speakers visible - lockLastN : false, - background : 'images/background.jpg', + lockLastN : false, + background : 'images/background.jpg', // Add file and uncomment for adding logo to appbar // logo : 'images/logo.svg', - title : 'Multiparty meeting', - theme : + title : 'Multiparty meeting', + theme : { palette : { diff --git a/app/src/reducers/room.js b/app/src/reducers/room.js index 6340b40..54c4011 100644 --- a/app/src/reducers/room.js +++ b/app/src/reducers/room.js @@ -1,19 +1,22 @@ const initialState = { name : '', - state : 'new', // new/connecting/connected/disconnected/closed, + // new/connecting/connected/disconnected/closed, + state : 'new', locked : false, inLobby : false, signInRequired : false, - accessCode : '', // access code to the room if locked and joinByAccessCode == true - joinByAccessCode : true, // if true: accessCode is a possibility to open the room + // access code to the room if locked and joinByAccessCode == true + accessCode : '', + // if true: accessCode is a possibility to open the room + joinByAccessCode : true, activeSpeakerId : null, torrentSupport : false, showSettings : false, fullScreenConsumer : null, // ConsumerID windowConsumer : null, // ConsumerID toolbarsVisible : true, - mode : 'democratic', + mode : window.config.defaultLayout || 'democratic', selectedPeerId : null, spotlights : [], settingsOpen : false,