Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,9 @@
<script type="text/javascript" src="resources/js/i18n.js"></script>

<?php require_once('lib/services_start.php'); ?>

<script type="text/javascript">
onStandaloneGalleryView = true;
</script>
</body>
</html>
7 changes: 7 additions & 0 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,13 @@
'name' => 'remotebuzzer[userotary]',
'value' => $config['remotebuzzer']['userotary'],
],
'remotebuzzer_enable_standalonegallery' => [
'view' => 'expert',
'type' => 'checkbox',
'name' => 'remotebuzzer[enable_standalonegallery]',
'value' => $config['remotebuzzer']['enable_standalonegallery'],
],

'remotebuzzer_picturebutton' => [
'view' => 'advanced',
'type' => 'checkbox',
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@
"manual:print:textonprint_rotation": "Enter a value which is used as degrees the text gets rotated at print.",
"manual:remotebuzzer:remotebuzzer_collagebutton": "For COLLAGE connect the hardware button to GPIO20. Pull GPIO to ground for to trigger. If enabled, long-press on PICTURE button will not trigger collage.",
"manual:remotebuzzer:remotebuzzer_collagetime": "If PICTURE button pressed less than seconds here, a picture is triggered. If pressed more seconds than here, a collage is triggered. Only works if collage is enabled in the admin settings and the collage button is disbaled.",
"manual:remotebuzzer:remotebuzzer_enable_standalonegallery": "Controls whether the rotary encoder is active on the standalone gallery view.",
"manual:remotebuzzer:remotebuzzer_enabled": "This feature enables hardware button support through Raspberry GPIO pins. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.",
"manual:remotebuzzer:remotebuzzer_logfile": "In Dev-Mode server debugging information will be written to the logfile, located in the <code>tmp</code> folder and defaults to <code>io_server.log</code>.",
"manual:remotebuzzer:remotebuzzer_picturebutton": "For PICTURE connect the hardware button to GPIO21. Pull GPIO to ground for to trigger. Long-press will trigger COLLAGE, if enabled and Collage hardware button is disabled.",
Expand Down Expand Up @@ -474,6 +475,7 @@
"remotebuzzer": "Hardware Button",
"remotebuzzer:remotebuzzer_collagebutton": "Collage Button",
"remotebuzzer:remotebuzzer_collagetime": "Seconds to trigger collage",
"remotebuzzer:remotebuzzer_enable_standalonegallery": "Rotary for standalone gallery",
"remotebuzzer:remotebuzzer_enabled": "Enable Hardware Button Support",
"remotebuzzer:remotebuzzer_logfile": "Logfile",
"remotebuzzer:remotebuzzer_picturebutton": "Picture Button",
Expand Down
10 changes: 10 additions & 0 deletions src/js/remotebuzzer_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ function initRemoteBuzzerFromDOM() {
// API functions
api.init = function () {
enabled = config.remotebuzzer.userotary;
if (typeof onStandaloneGalleryView !== 'undefined') {
enabled = enabled && config.remotebuzzer.enable_standalonegallery;
if (config.dev.enabled) {
console.log(
'Rotary Controller is ',
config.remotebuzzer.enable_standalonegallery ? 'enabled' : 'disabled',
' for standalone gallery view'
);
}
}
};

api.focusSet = function (id) {
Expand Down