Skip to content

Commit

Permalink
Fix for some data not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeue committed Sep 3, 2023
1 parent b14b746 commit 5a3dce7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homestudio-remote",
"version": "1.10.0",
"version": "1.10.1",
"description": "Homestudio for on-site production",
"main": "server.js",
"scripts": {
Expand Down
22 changes: 14 additions & 8 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function expressRoutes(expressApp) {
expressApp.use(express.json());
expressApp.use(express.static(__static));

const homeOptions = {
function getHomeOptions() {return {
systemName: config.get('systemName'),
version: version,
homestudioKey: config.get('homestudioKey'),
Expand All @@ -412,11 +412,12 @@ function expressRoutes(expressApp) {
dockerCommand: dockerCommand,
reconnectTimeoutSeconds: config.get('reconnectTimeoutSeconds'),
allowLowres: config.get('allowLowres')
}
}}

expressApp.get('/', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = false;
homeOptions.layout = config.get('defaultLayout');
homeOptions.inApp = false;
Expand All @@ -425,6 +426,7 @@ function expressRoutes(expressApp) {
expressApp.get('/config', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = true;
homeOptions.layout = "thumbnail";
homeOptions.inApp = false;
Expand All @@ -433,6 +435,7 @@ function expressRoutes(expressApp) {
expressApp.get('/advanced', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = false;
homeOptions.layout = "advanced";
homeOptions.inApp = false;
Expand All @@ -441,6 +444,7 @@ function expressRoutes(expressApp) {
expressApp.get('/basic', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = false;
homeOptions.layout = "basic";
homeOptions.inApp = false;
Expand All @@ -449,6 +453,7 @@ function expressRoutes(expressApp) {
expressApp.get('/thumbnails', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = false;
homeOptions.layout = "thumbnail";
homeOptions.inApp = false;
Expand All @@ -457,6 +462,7 @@ function expressRoutes(expressApp) {
expressApp.get('/app', (req, res) => {
logger.log('New client connected', 'A');
res.header('Content-type', 'text/html');
const homeOptions = getHomeOptions();
homeOptions.config = true;
homeOptions.layout = "thumbnail";
homeOptions.inApp = true;
Expand Down Expand Up @@ -674,17 +680,17 @@ function loadData(file) {
"colEnd": 1
},
"2": {
"rowStart": 2,
"rowEnd": 2,
"colStart": 1,
"colEnd": 1
},
"3": {
"rowStart": 1,
"rowEnd": 1,
"colStart": 2,
"colEnd": 2
},
"3": {
"rowStart": 2,
"rowEnd": 2,
"colStart": 1,
"colEnd": 1
},
"4": {
"rowStart": 2,
"rowEnd": 2,
Expand Down

0 comments on commit 5a3dce7

Please sign in to comment.