From 842df45022ac8d192f4be85ea5b6e3179f9e3bb1 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 7 Jul 2021 10:46:33 +0200 Subject: [PATCH] continuous collage: make time adjustable single image is visible Change-Id: I094a4cae85b08d6c86c06bdb46df9c55369bee3e --- config/config.inc.php | 1 + lib/configsetup.inc.php | 11 +++++++++++ resources/lang/en.json | 2 ++ src/js/core.js | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/config.inc.php b/config/config.inc.php index 2de027a03..41d51d1f1 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -89,6 +89,7 @@ // control countdown timer between collage pictures in seconds $config['collage']['cntdwn_time'] = '3'; $config['collage']['continuous'] = true; +$config['collage']['continuous_time'] = '5'; // possible layout values: '2x2', '2x2-2', '2x4', '2x4-2', '1+3', '1+2' $config['collage']['layout'] = '2x2-2'; // specify key id (e.g. 13 is the enter key) to use that key to take a collage (collage key) diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 01252a6aa..7a0b1d3b9 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -564,6 +564,17 @@ 'name' => 'collage[continuous]', 'value' => $config['collage']['continuous'], ], + 'collage_continuous_time' => [ + 'view' => 'basic', + 'type' => 'range', + 'name' => 'collage[continuous_time]', + 'placeholder' => $defaultConfig['collage']['continuous_time'], + 'value' => $config['collage']['continuous_time'], + 'range_min' => 1, + 'range_max' => 20, + 'range_step' => 1, + 'unit' => 'seconds', + ], 'collage_layout' => [ 'view' => 'advanced', 'type' => 'select', diff --git a/resources/lang/en.json b/resources/lang/en.json index f5e9d68ee..682bdddd8 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -27,6 +27,7 @@ "collage": "Collage", "collage:collage_cntdwn_time": "Collage-countdown timer:", "collage:collage_continuous": "Take collage without interruption", + "collage:collage_continuous_time": "Show single images on continuous collage for:", "collage:collage_enabled": "Allow photo collage", "collage:collage_frame": "Frame", "collage:collage_key": "Key code which triggers a collage", @@ -183,6 +184,7 @@ "manual:authentication:protect_manual": "If enabled, manual and FAQ can only be accessed if a username and password is entered.", "manual:collage:collage_cntdwn_time": "Set your countdown time between pictures while taking a collage.", "manual:collage:collage_continuous": "Take collage without interrupption.", + "manual:collage:collage_continuous_time": "Controll the time a picture is visible on continuous collage before the next picture is taken.", "manual:collage:collage_enabled": "If enabled, user can take a collage. A collage consists of 4 pictures. Optional you can take a collage with or without interruption.", "manual:collage:collage_frame": "Enter the path of the frame which is applied to your collage after taking it.", "manual:collage:collage_key": "Specify the key id to use that key to take a collage (e.g. 13 is the enter key). For example use https://keycode.info to find out the key id.", diff --git a/src/js/core.js b/src/js/core.js index 4ef0691fc..cc3397b98 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -497,7 +497,7 @@ const photoBooth = (function () { imageUrl = ''; $('.loaderImage').css('display', 'none'); api.thrill('collage'); - }, 5000); + }, config.collage.continuous_time * 1000); } else { currentCollageFile = ''; nextCollageNumber = 0;