Skip to content

Commit

Permalink
task: reintroduce option to disable shutter (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott authored Oct 30, 2023
1 parent 5963d2b commit e7f6c39
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,10 @@ const photoBooth = (function () {
.post(config.foldersPublic.api + '/capture.php', data)
.done(async (result) => {
api.cheese.destroy();
await api.shutter.start();
await api.shutter.stop();
if (config.ui.shutter_animation) {
await api.shutter.start();
await api.shutter.stop();
}
endTime = new Date().getTime();
totalTime = endTime - startTime;
photoboothTools.console.log('Took ' + data.style, result);
Expand Down
1 change: 1 addition & 0 deletions config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
$config['ui']['style'] = 'modern_squared';
// possible button values: "rounded", "modern", "modern_squared", "custom"
$config['ui']['button'] = 'modern_squared';
$config['ui']['shutter_animation'] = true;
// possible image values:
// - ''
// - '/resources/img/cheese/camera_up.png'
Expand Down
6 changes: 6 additions & 0 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,12 @@
],
'value' => $config['ui']['button'],
],
'ui_shutter_animation' => [
'view' => 'basic',
'type' => 'checkbox',
'name' => 'ui[shutter_animation]',
'value' => $config['ui']['shutter_animation'],
],
'ui_shutter_cheese_img' => [
'view' => 'advanced',
'type' => 'select',
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@
"manual:userinterface:ui_decore_lines": "Wenn aktiviert, werden Linien auf der Startseite angezeigt.",
"manual:userinterface:ui_font_size": "Geben Sie die Standardschriftgröße für die Photobooth-Oberfläche ein.",
"manual:userinterface:ui_result_buttons": "Wenn aktiviert, werden die Nachbearbeitungs-Schaltflächen auf dem Ergebnisbildschirm sichtbar. Wenn deaktiviert, wird die gesamte Schaltflächenleiste ausgeblendet.",
"manual:userinterface:ui_shutter_animation": "Wenn aktiviert, wird während der Aufnahme eines Fotos eine Verschlussanimation angezeigt.",
"manual:userinterface:ui_shutter_cheese_img": "Wenn die Verschlussanimation aktiviert, wird ein Bild anstatt des Texts angezeigt. Das Bild bleibt sichtbar, bis das Foto von der Kamera übertragen wurde.",
"manual:userinterface:ui_style": "Wählen Sie einen Startseitenstil. Um einen eigenen Startseitenstil zu verwenden, erstellen und verwenden Sie \"/template/custom.template.php\" und \"/resources/css/custom_style.css\", falls eine dieser Dateien nicht lesbar ist, wird auf den Standard-Startseitenstil zurückgegriffen.",
"manual:version:check_version": "Dies prüft online über das Github Projektarchiv auf die neueste Photobooth-Version.",
Expand Down Expand Up @@ -805,6 +806,7 @@
"userinterface:ui_decore_lines": "Dekorationslinien anzeigen",
"userinterface:ui_font_size": "Standardschriftgröße",
"userinterface:ui_result_buttons": "Schaltflächenleiste auf Ergebnisbildschirm anzeigen",
"userinterface:ui_shutter_animation": "Verschlussanimation",
"userinterface:ui_shutter_cheese_img": "\"Cheese\"-Bild",
"userinterface:ui_style": "Stil",
"using_latest_version": "Photobooth ist auf dem aktuellen Stand.",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@
"manual:userinterface:ui_decore_lines": "If enabled, decorate lines will be visible on start page.",
"manual:userinterface:ui_font_size": "Enter the default font size used for the Photobooth interface.",
"manual:userinterface:ui_result_buttons": "If enabled, post-processing buttons will be visible on the on result screen. If disabled the whole button bar will be hidden.",
"manual:userinterface:ui_shutter_animation": "If enabled, a shutter animation will be visible while taking a picture.",
"manual:userinterface:ui_shutter_cheese_img": "If shutter animation is enabled and this is not none the UI will display an image instead of the shutter text. The image stays visible until the photo is received from the camera.",
"manual:userinterface:ui_style": "Choose a start page styling. To use custom styling please create and use \"/template/custom.template.php\" and \"/resources/css/custom_style.css\", if one of these files is not readable we will fallback to default theme.",
"manual:version:check_version": "This will check online against the Github repository for the latest Photobooth version.",
Expand Down Expand Up @@ -964,6 +965,7 @@
"userinterface:ui_decore_lines": "Show decorate lines",
"userinterface:ui_font_size": "Default font size",
"userinterface:ui_result_buttons": "Show button bar on result screen",
"userinterface:ui_shutter_animation": "Shutter animation",
"userinterface:ui_shutter_cheese_img": "Cheese image",
"userinterface:ui_style": "Styling",
"using_latest_version": "You are using the latest version of photobooth.",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@
"manual:userinterface:ui_decore_lines": "Si está activado, las líneas de decoración serán visibles en la página de inicio.",
"manual:userinterface:ui_font_size": "Introduzca el tamaño de fuente predeterminado utilizado para la interfaz Photobooth.",
"manual:userinterface:ui_result_buttons": "Si está activado, los botones de post-procesamiento serán visibles en la pantalla de resultados. Si está desactivado, la barra de botones se ocultará.",
"manual:userinterface:ui_shutter_animation": "Si está activado, una animación de obturación será visible mientras toma una foto.",
"manual:userinterface:ui_shutter_cheese_img": "Si la animación del obturador está activada y no es ninguna, la interfaz de usuario mostrará una imagen en lugar del texto del obturador. La imagen permanece visible hasta que la foto sea recibida de la cámara.",
"manual:userinterface:ui_style": "Elige una página de inicio. Para usar un estilo personalizado, por favor crea y usa \"/template/custom.template.php\" y \"/resources/css/custom_style.css\", si uno de estos archivos no es legible, recurriremos al tema por defecto.",
"manual:version:check_version": "Esto comprobará en línea contra el repositorio de Github para ver la última versión de Photooth.",
Expand Down Expand Up @@ -962,6 +963,7 @@
"userinterface:ui_decore_lines": "Mostrar líneas de decoración",
"userinterface:ui_font_size": "Tamaño de fuente predeterminado",
"userinterface:ui_result_buttons": "Mostrar barra de botones en la pantalla de resultado",
"userinterface:ui_shutter_animation": "Animación de apagado",
"userinterface:ui_shutter_cheese_img": "Imagen de \"Patata\"",
"userinterface:ui_style": "Estilo",
"using_latest_version": "Estás utilizando la última versión de photobooth",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@
"manual:userinterface:ui_decore_lines": "Si activé, les lignes de décoration seront visibles sur la page de démarrage.",
"manual:userinterface:ui_font_size": "Entrez la taille de police par défaut utilisée pour l'interface Photobooth.",
"manual:userinterface:ui_result_buttons": "Si activé, les boutons de post-traitement seront visibles sur l'écran de résultat. Si désactivé, la barre de boutons entière sera masquée.",
"manual:userinterface:ui_shutter_animation": "Si activé, une animation d'obturateur sera visible lors de la prise d'une photo.",
"manual:userinterface:ui_shutter_cheese_img": "Si l'animation de l'obturateur est activée et ce champ n'est pas vide, l'interface utilisateur affichera une image au lieu du texte de l'obturateur. L'image reste visible jusqu'à ce que la photo soit reçue de l'appareil photo.",
"manual:userinterface:ui_style": "Choisissez un style de page de démarrage. Pour utiliser un style personnalisé, veuillez créer et utiliser \"/template/custom.template. hp\" et \"/resources/css/custom_style.css\", si l'un de ces fichiers n'est pas lisible, nous utiliserons le thème par défaut.",
"manual:version:check_version": "Ceci vérifiera en ligne le répertoire GitHub pour la dernière version de Photobooth.",
Expand Down Expand Up @@ -878,6 +879,7 @@
"userinterface:ui_decore_lines": "Afficher les lignes décoratives",
"userinterface:ui_font_size": "Taille de police par défaut",
"userinterface:ui_result_buttons": "Afficher la barre de boutons sur l'écran de résultat",
"userinterface:ui_shutter_animation": "Animation d'obturation",
"userinterface:ui_shutter_cheese_img": "Image Cheese",
"userinterface:ui_style": "Stylisation",
"using_latest_version": "Vous utilisez la dernière version du Photobooth.",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@
"manual:userinterface:ui_decore_lines": "Se abilitata, le linee decorate saranno visibili alla pagina iniziale.",
"manual:userinterface:ui_font_size": "Inserisci la dimensione predefinita del carattere usata per l'interfaccia Photobooth.",
"manual:userinterface:ui_result_buttons": "Se abilitata, i pulsanti di post-elaborazione saranno visibili sulla schermata risultato. Se disabilitata l'intera barra dei pulsanti sarà nascosta.",
"manual:userinterface:ui_shutter_animation": "Se abilitata, un'animazione dell'otturatore sarà visibile mentre scatta una foto.",
"manual:userinterface:ui_shutter_cheese_img": "Se l'animazione dell'otturatore è abilitata e questa non è vuota, l'interfaccia utente visualizzerà un'immagine invece del testo dell'otturatore. L'immagine rimane visibile fino alla ricezione della foto dalla fotocamera.",
"manual:userinterface:ui_style": "Scegli uno stile di pagina iniziale. Per usare lo stile personalizzato, crea e usa \"/template/custom.template.php\" e \"/resources/css/custom_style.css\", se uno di questi file non è leggibile, sarà utilizzato il tema predefinito.",
"manual:version:check_version": "Questo controllerà online sul repository di Github per l'ultima versione di Photobooth.",
Expand Down Expand Up @@ -920,6 +921,7 @@
"userinterface:ui_decore_lines": "Mostra linee decorative",
"userinterface:ui_font_size": "Grandezza carattere di default",
"userinterface:ui_result_buttons": "Mostra la barra dei pulsanti sulla schermata dei risultati",
"userinterface:ui_shutter_animation": "Animazione di scatto",
"userinterface:ui_shutter_cheese_img": "Immagine Cheese",
"userinterface:ui_style": "Stile",
"using_latest_version": "Stai usando l'ultima versione di photobooth.",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@
"manual:userinterface:ui_decore_lines": "Indien ingeschakeld, zullen decoratielijnen zichtbaar zijn op de startpagina.",
"manual:userinterface:ui_font_size": "Voer de standaard lettergrootte in die wordt gebruikt voor de Photobooth-interface.",
"manual:userinterface:ui_result_buttons": "Indien ingeschakeld, worden knoppen voor nabewerking zichtbaar op het resultaatscherm. Als dit is uitgeschakeld, wordt de hele knoppenbalk verborgen.",
"manual:userinterface:ui_shutter_animation": "Indien ingeschakeld, zal een sluiteranimatie zichtbaar zijn tijdens het nemen van een foto.",
"manual:userinterface:ui_shutter_cheese_img": "Als sluiteranimatie is ingeschakeld en dit is niet 'none', dan toont de UI een afbeelding in plaats van de sluiter tekst. De afbeelding blijft zichtbaar totdat de foto is ontvangen van de camera.",
"manual:userinterface:ui_style": "Kies een startpagina-stijl. Om aangepaste stijlen te gebruiken, maak en gebruik alstublieft '/template/custom.template.php' en '/resources/css/custom_style.css'. Als een van deze bestanden niet leesbaar is, wordt teruggevallen op het standaardthema.",
"manual:version:check_version": "Dit controleert online tegen het Github-opslagplaats voor de nieuwste Photobooth-versie.",
Expand Down Expand Up @@ -964,6 +965,7 @@
"userinterface:ui_decore_lines": "Toon versierlijnen",
"userinterface:ui_font_size": "Standaard lettergrootte",
"userinterface:ui_result_buttons": "Toon knoppenbalk op resultaatscherm",
"userinterface:ui_shutter_animation": "Sluiteranimatie",
"userinterface:ui_shutter_cheese_img": "Cheese-afbeelding",
"userinterface:ui_style": "Stijl",
"using_latest_version": "Je gebruikt de nieuwste versie van Photobooth.",
Expand Down

0 comments on commit e7f6c39

Please sign in to comment.