Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit 5000908

Browse files
authored
Merge branch 'dev' into feature/adminpanel-views
2 parents ff437ef + f2b36c3 commit 5000908

File tree

5 files changed

+127
-226
lines changed

5 files changed

+127
-226
lines changed

gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<link rel="stylesheet" href="node_modules/font-awesome/css/font-awesome.css" />
4242
<link rel="stylesheet" href="vendor/PhotoSwipe/dist/photoswipe.css" />
4343
<link rel="stylesheet" href="vendor/PhotoSwipe/dist/default-skin/default-skin.css" />
44-
<link rel="stylesheet" href="resources/css/style.css" />
44+
<link rel="stylesheet" href="resources/css/classic_style.css" />
4545
<?php if ($config['gallery_bottom_bar']): ?>
4646
<link rel="stylesheet" href="resources/css/photoswipe-bottom.css" />
4747
<?php endif; ?>

lib/services_start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function processIsRunning($pName, $pidFile) {
3232
print "\t<!-- Remote Buzzer Enabled --- server already started (port in use) -->\n";
3333
}
3434

35-
print "\t<script type=\"text/javascript\" src=\"node_modules/socket.io-client/dist/socket.io.slim.js\"></script>\n";
35+
print "\t<script type=\"text/javascript\" src=\"node_modules/socket.io-client/dist/socket.io.min.js\"></script>\n";
3636
}
3737

3838
if ($config['synctodrive_enabled']) {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@
5151
"npm-run-all": "^4.1.5",
5252
"rpio": "^2.1.1",
5353
"selectize": "^0.12.6",
54-
"socket.io": "^2.3.0",
55-
"socket.io-client": "^2.3.1",
54+
"socket.io": "^3.1.0",
55+
"socket.io-client": "^3.0.5",
5656
"waypoints": "^4.0.1",
5757
"whatwg-fetch": "^3.5.0"
5858
},
5959
"devDependencies": {
6060
"@babel/core": "^7.12.10",
6161
"@babel/preset-env": "^7.12.11",
6262
"@prettier/plugin-php": "^0.16.1",
63-
"archiver": "^5.1.0",
63+
"archiver": "^5.2.0",
6464
"colors": "^1.4.0",
6565
"eslint": "^7.17.0",
6666
"eslint-plugin-node": "^11.1.0",

src/js/remotebuzzer_server.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ fs.writeFile(pidFilename, myPid, function (err) {
4848
console.log(
4949
'socket.io server [',
5050
myPid,
51-
']: Requested to start on port ',
52-
config.remotebuzzer_port,
51+
']: Requested to start on http://' + config.webserver_ip + ':' + config.remotebuzzer_port,
5352
', Pin ',
5453
config.remotebuzzer_pin
5554
);
@@ -99,7 +98,12 @@ function photoboothAction(type) {
9998
}
10099
}
101100

102-
const ioServer = require('socket.io')(config.remotebuzzer_port);
101+
const ioServer = require('socket.io')(config.remotebuzzer_port, {
102+
cors: {
103+
origin: 'http://' + config.webserver_ip,
104+
methods: ['GET', 'POST']
105+
}
106+
});
103107

104108
ioServer.on('connection', function (client) {
105109
console.log('socket.io server [', myPid, ']: New client connected - ID', client.id);

0 commit comments

Comments
 (0)