diff --git a/README.md b/README.md index c5881e3d2..e2833eb05 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,8 @@ This is my personal Photobooth fork with some extras on top (more information ca - Standalone Gallery ([localhost/gallery.php](http://localhost/gallery.php)). - Slideshow via Gallery or standalone Gallery (under [localhost/slideshow](http://localhost/slideshow)). - Settings can be changed via Admin Panel (under [localhost/admin](http://localhost/admin)): - - Multi-language support: - - German - - English - - Spanish - - French - - Greek + - Multi-language support + - [Translate on Crowdin](https://crowdin.com/project/photobooth) - Login to protect Admin Panel and/or Start page can be enabled. - Gallery: - Order pictures in gallery ascending oder descending by picture age. @@ -65,6 +61,7 @@ This is my personal Photobooth fork with some extras on top (more information ca - access login via [localhost/login](http://localhost/login) instead [localhost/login.php](http://localhost/login.php) - offline manual with settings explained under [localhost/manual](http://localhost/manual) ([andi34/photobooth#59](https://github.com/andi34/photobooth/pull/59)) - offline FAQ under [localhost/manual/faq.html](http://localhost/manual/faq.html) + - disk usage page, access via admin panel or at [localhost/admin/diskusage.php](http://localhost/admin/diskusage.php) - fix windows compatibility - fix check for image filter - performance improvement ([andreknieriem/photobooth#226](https://github.com/andreknieriem/photobooth/pull/226)) @@ -94,10 +91,47 @@ This is my personal Photobooth fork with some extras on top (more information ca - Preview/Stream from device cam as background on start page ([andi34/photobooth#58](https://github.com/andi34/photobooth/pull/58)) - Allow using a stream from URL at countdown for preview - Allow to rotate preview from URL - - Show button bar inside gallery on bottom or on top of the image - Auto reload Photobooth on error while taking a photo - Allow to change permissons on picture - qrHelp: define WiFi SSID used on QR via admin panel + - Updated [PhotoSwipe Gallery](https://github.com/andi34/PhotoSwipe) + - Show button bar inside gallery on bottom or on top of the image + - allow to adjust PhotoSwipe Gallery config via Adminpanel, also allow to use some PhotoSwipe functions and make more PhotoSwipe settings available (settings explained inside the manual): + - Mouse click on image should close the gallery (enable/disable) + - Close gallery if clicked outside of the image (enable/disable) + - Close picture on page scroll (enable/disable) + - Close gallery when dragging vertically and when image is not zoomed (enable/disable) + - Show image counter (enable/disable) + - Show PhotoSwipe fullscreen button (enable/disable) + - Show PhotoSwipe zoom button (enable/disable) + - PhotoSwipe history module (enable/disable) + - Pinch to close gallery (enable/disable) + - Toggle visibility of controls/buttons by tap (enable/disable) + - allow to adjust PhotoSwipe background opacity (0-1) + - Loop images (enable/disable) + - Slide transition effect (enable/disable) + - Swiping to change slides (enable/disable) + - gallery: button to delete an image, enable by default + - Remote Buzzer Server based on io sockets + - Enables a GPIO pin connected hardware button / buzzer for a setup where the display / screen is connected via WLAN / network to the photobooth webserver (e.g. iPad) + - Choose thumbnail size: + - XS = max 360px + - S = max 540px + - M = max 900px + - L = max 1080px + - XL = max 1260px" + - Advanced printing functions [#109](https://github.com/andi34/photobooth/pull/109): + - Auto print function + - allow to delay auto print + - allow to adjust time "Started printing! Please wait..." is visible + - allow to trigger print via defined key + - options to show the print button independent (e.g. can be only visible on gallery) + - Advanced collage options [#108](https://github.com/andi34/photobooth/pull/108): + - Choose collage layout: + - 2x2 + - 2x4 + - 2x4 + background image + - Collage: apply frame once after taking or to every picture of the collage ## :camera: Screenshots @@ -133,10 +167,6 @@ If you like my work and like to keep me motivated you can buy me a coconut water [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/andreasblaesius) -### :information_source: Donators Early Access - -Donators who donated 5€ or more get early access to new features/options i am adding (please leave a message at donation telling your email address). - ### :mortar_board: Tutorial [Raspberry Pi Weddingphotobooth (german)](https://www.andrerinas.de/tutorials/raspberry-pi-einen-dslr-weddingphotobooth-erstellen.html) diff --git a/api/applyEffects.php b/api/applyEffects.php index 09d9ae86f..3d59cfdb2 100644 --- a/api/applyEffects.php +++ b/api/applyEffects.php @@ -22,7 +22,9 @@ $filename_thumb = $config['foldersAbs']['thumbs'] . DIRECTORY_SEPARATOR . $file; $frame_path = __DIR__ . DIRECTORY_SEPARATOR .$config['take_frame_path']; $collage_frame_path = __DIR__ . DIRECTORY_SEPARATOR .$config['take_collage_frame_path']; +$collage_background = __DIR__ . DIRECTORY_SEPARATOR .$config['collage_background']; $picture_permissions = $config['picture_permissions']; +$thumb_size = substr($config['thumb_size'], 0, -2); if (isset($_POST['isCollage']) && $_POST['isCollage'] === 'true') { $collageBasename = substr($filename_tmp, 0, -4); @@ -32,7 +34,7 @@ $collageSrcImagePaths[] = $collageBasename . '-' . $i . '.jpg'; } - if (!createCollage($collageSrcImagePaths, $filename_tmp, $config['take_collage_frame'], $collage_frame_path)) { + if (!createCollage($collageSrcImagePaths, $filename_tmp, $config['take_collage_frame'], $config['take_collage_frame_always'], $collage_frame_path, $collage_background)) { die(json_encode([ 'error' => 'Could not create collage' ])); @@ -115,7 +117,7 @@ } // image scale, create thumbnail -$thumbResource = resizeImage($imageResource, 500, 500); +$thumbResource = resizeImage($imageResource, $thumb_size, $thumb_size); imagejpeg($thumbResource, $filename_thumb, $config['jpeg_quality_thumb']); imagedestroy($thumbResource); diff --git a/api/deletePhoto.php b/api/deletePhoto.php index 5fa88b9c5..52f375c5f 100644 --- a/api/deletePhoto.php +++ b/api/deletePhoto.php @@ -13,6 +13,8 @@ $file = $_POST['file']; $filePath = $config['foldersAbs']['images'] . DIRECTORY_SEPARATOR . $file; $filePathThumb = $config['foldersAbs']['thumbs'] . DIRECTORY_SEPARATOR . $file; +$filePathKeying = $config['foldersAbs']['keying'] . DIRECTORY_SEPARATOR . $file; +$filePathTmp = $config['foldersAbs']['tmp'] . DIRECTORY_SEPARATOR . $file; // Only jpg/jpeg are supported $imginfo = getimagesize($filePath); @@ -29,6 +31,26 @@ ])); } +if ($config['chroma_keying']) { + if (is_readable($filePathKeying)) { + if (!unlink ($filePathKeying)) { + die(json_encode([ + 'error' => 'Could not delete keying file', + ])); + } + } +} + +if ($config['keep_images']) { + if (is_readable($filePathTmp)) { + if (!unlink ($filePathTmp)) { + die(json_encode([ + 'error' => 'Could not delete tmp file', + ])); + } + } +} + deleteImageFromDB($file); echo json_encode([ diff --git a/api/download.php b/api/download.php index 69d57dbba..2a94c17e2 100644 --- a/api/download.php +++ b/api/download.php @@ -1,9 +1,18 @@ - + diff --git a/config/config.inc.php b/config/config.inc.php index dac810f72..8e82879ad 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -8,16 +8,10 @@ $config['show_error_messages'] = true; $config['auto_reload_on_error'] = true; $config['pictureRotation'] = '0'; -$config['use_print'] = false; $config['use_qr'] = true; $config['use_download'] = true; +$config['download_thumbs'] = false; $config['use_slideshow'] = true; -$config['print_qrcode'] = false; -$config['print_frame'] = false; -$config['print_frame_path'] = '../resources/img/frames/frame.png'; -$config['crop_onprint'] = false; -$config['crop_width'] = '1000'; -$config['crop_height'] = '500'; $config['use_mail'] = false; // mail data needs to be configured $config['show_fork'] = true; $config['previewFromCam'] = false; // experimental see https://github.com/andreknieriem/photobooth/pull/30 @@ -38,6 +32,7 @@ $config['collage_cntdwn_time'] = '3'; // control countdown timer between collage pictures $config['cheese_time'] = '1000'; // control time for cheeeeese! $config['keep_images'] = true; +$config['thumb_size'] = '540px'; $config['image_preview_before_processing'] = true; $config['preserve_exif_data'] = false; $config['use_filter'] = true; @@ -50,7 +45,10 @@ $config['take_frame'] = false; $config['take_frame_path'] = '../resources/img/frames/frame.png'; $config['take_collage_frame'] = false; +$config['take_collage_frame_always'] = false; $config['take_collage_frame_path'] = '../resources/img/frames/frame.png'; +$config['collage_layout'] = '2x2'; // possible values are '2x2' or '2x4' +$config['collage_background'] = '../resources/img/frames/DefaultCollageBackground.png'; $config['chroma_keying'] = false; $config['use_collage'] = true; $config['continuous_collage'] = true; @@ -69,9 +67,10 @@ // use for example https://keycode.info to get the key code $config['photo_key'] = null; $config['collage_key'] = null; +$config['print_key'] = null; // LANGUAGE -// possible values: de, el, en, es, fr +// possible values: de, el, en, es, fr, pl $config['language'] = 'en'; // StartScreen @@ -150,6 +149,19 @@ $config['slideshow_randomPicture'] = true; $config['slideshow_use_thumbs'] = false; +// PRINT +$config['use_print_result'] = false; +$config['use_print_gallery'] = false; +$config['use_print_chromakeying'] = false; +$config['auto_print'] = false; +$config['auto_print_delay'] = '1000'; +$config['printing_time'] = '5000'; +$config['print_qrcode'] = false; +$config['print_frame'] = false; +$config['print_frame_path'] = '../resources/img/frames/frame.png'; +$config['crop_onprint'] = false; +$config['crop_width'] = '1000'; +$config['crop_height'] = '500'; // TEXT ON PRINT $config['is_textonprint'] = false; $config['textonprint']['line1'] = 'line 1'; diff --git a/index.php b/index.php index ca7cb7598..233292268 100644 --- a/index.php +++ b/index.php @@ -162,7 +162,7 @@ - + diff --git a/lib/collage.php b/lib/collage.php index 50cd6de3b..97c2ac5c9 100644 --- a/lib/collage.php +++ b/lib/collage.php @@ -1,41 +1,167 @@ 'EL', 'en' => 'EN', 'es' => 'ES', - 'fr' => 'FR' + 'fr' => 'FR', + 'pl' => 'PL' ], 'value' => $config['language'] ], @@ -44,6 +45,19 @@ 'name' => 'keep_images', 'value' => $config['keep_images'] ], + 'thumb_size' => [ + 'type' => 'select', + 'name' => 'thumb_size', + 'placeholder' => $defaultConfig['thumb_size'], + 'options' => [ + '360px' => 'XS', + '540px' => 'S', + '900px' => 'M', + '1080px' => 'L', + '1260px' => 'XL' + ], + 'value' => $config['thumb_size'] + ], 'show_error_messages' => [ 'type' => 'checkbox', 'name' => 'show_error_messages', @@ -77,11 +91,6 @@ 'placeholder' => '0644', 'value' => $config['picture_permissions'] ], - 'use_print' => [ - 'type' => 'checkbox', - 'name' => 'use_print', - 'value' => $config['use_print'] - ], 'use_qr' => [ 'type' => 'checkbox', 'name' => 'use_qr', @@ -104,6 +113,11 @@ 'name' => 'use_download', 'value' => $config['use_download'] ], + 'download_thumbs' => [ + 'type' => 'checkbox', + 'name' => 'download_thumbs', + 'value' => $config['download_thumbs'] + ], 'use_slideshow' => [ 'type' => 'checkbox', 'name' => 'use_slideshow', @@ -231,12 +245,34 @@ 'name' => 'take_collage_frame', 'value' => $config['take_collage_frame'] ], + 'take_collage_frame_always' => [ + 'type' => 'checkbox', + 'name' => 'take_collage_frame_always', + 'value' => $config['take_collage_frame_always'] + ], 'take_collage_frame_path' => [ 'type' => 'input', 'placeholder' => $defaultConfig['take_collage_frame_path'], 'name' => 'take_collage_frame_path', 'value' => htmlentities($config['take_collage_frame_path']) ], + 'collage_layout' => [ + 'type' => 'select', + 'name' => 'collage_layout', + 'placeholder' => $defaultConfig['collage_layout'], + 'options' => [ + '2x2' => '2x2', + '2x4' => '2x4', + '2x4BI' => '2x4 + background image' + ], + 'value' => $config['collage_layout'] + ], + 'collage_background' => [ + 'type' => 'input', + 'name' => 'collage_background', + 'placeholder' => $defaultConfig['collage_background'], + 'value' => $config['collage_background'] + ], 'collage_cntdwn_time' => [ 'type' => 'range', 'name' => 'collage_cntdwn_time', @@ -516,6 +552,12 @@ ] ], 'folders' => [ + 'data' => [ + 'type' => 'input', + 'placeholder' => $defaultConfig['folders']['data'], + 'name' => 'folders[data]', + 'value' => $config['folders']['data'] + ], 'images' => [ 'type' => 'input', 'placeholder' => $defaultConfig['folders']['images'], @@ -551,12 +593,6 @@ 'placeholder' => $defaultConfig['folders']['tmp'], 'name' => 'folders[tmp]', 'value' => $config['folders']['tmp'] - ], - 'data' => [ - 'type' => 'input', - 'placeholder' => $defaultConfig['folders']['data'], - 'name' => 'folders[data]', - 'value' => $config['folders']['data'] ] ], 'event' => [ @@ -601,6 +637,52 @@ ] ], 'print' => [ + 'use_print_result' => [ + 'type' => 'checkbox', + 'name' => 'use_print_result', + 'value' => $config['use_print_result'] + ], + 'use_print_gallery' => [ + 'type' => 'checkbox', + 'name' => 'use_print_gallery', + 'value' => $config['use_print_gallery'] + ], + 'use_print_chromakeying' => [ + 'type' => 'checkbox', + 'name' => 'use_print_chromakeying', + 'value' => $config['use_print_chromakeying'] + ], + 'auto_print' => [ + 'type' => 'checkbox', + 'name' => 'auto_print', + 'value' => $config['auto_print'] + ], + 'auto_print_delay' => [ + 'type' => 'range', + 'placeholder' => $defaultConfig['auto_print_delay'], + 'name' => 'auto_print_delay', + 'value' => $config['auto_print_delay'], + 'range_min' => 250, + 'range_max' => 10000, + 'range_step' => 250, + 'unit' => 'milliseconds' + ], + 'printing_time' => [ + 'type' => 'range', + 'placeholder' => $defaultConfig['printing_time'], + 'name' => 'printing_time', + 'value' => $config['printing_time'], + 'range_min' => 250, + 'range_max' => 20000, + 'range_step' => 250, + 'unit' => 'milliseconds' + ], + 'print_key' => [ + 'type' => 'input', + 'name' => 'print_key', + 'placeholder' => '', + 'value' => $config['print_key'] + ], 'print_qrcode' => [ 'type' => 'checkbox', 'name' => 'print_qrcode', diff --git a/package.json b/package.json index a4f0a125f..3e052d6e2 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,6 @@ "eslint-plugin-node": "^11.1.0", "git-tag-version": "^1.3.1", "gulp-babel": "^8.0.0", - "prettier": "^2.1.1" + "prettier": "^2.1.2" } } diff --git a/resources/img/frames/DefaultCollageBackground.png b/resources/img/frames/DefaultCollageBackground.png new file mode 100644 index 000000000..c04271293 Binary files /dev/null and b/resources/img/frames/DefaultCollageBackground.png differ diff --git a/resources/lang/de.json b/resources/lang/de.json index 6f9d22b02..57138064f 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -3,6 +3,7 @@ "admin_panel": "Admin Panel", "allow_delete": "Löschen des Bildes erlauben", "allow_delete_from_gallery": "Löschen von Bildern aus der Galerie zulassen", + "auto_print": "Bild unmittelbar nach der Aufnahme drucken", "auto_reload": "Photobooth wird automatisch neu geladen...", "auto_reload_on_error": "Photobooth bei Fehler automatisch neu laden", "available_version": "Verfügbare Version", @@ -10,7 +11,7 @@ "busyCollage": "Collage wird verarbeitet ...", "check_version": "Version überprüfen", "cheese": "Cheeeeeeeese!", - "cheeseCollage": "Cheeeeeeeese Collageeeeeeeeee!", + "cheeseCollage": "Cheeeeeeeese Collageeeeeeeeeee!", "chroma_keying": "Chroma-Keying erlauben", "close": "Schließen", "commands": "Befehle", @@ -25,9 +26,12 @@ "cups_button": "CUPS Taste anzeigen", "current_version": "Aktuelle Version", "default_imagefilter": "Bildfilter auswählen", + "degrees": "°", "delete": "Löschen", "dev": "Entwicklungs-Modus", "disk_usage": "Festplattenbelegung", + "dot": ".", + "download_thumbs": "Thumbnails zum Herunterladen verwenden", "error": "Es ist ein Fehler aufgetreten, bitte versuche es erneut!", "event": "Veranstaltungen", "event_symbol": "Symbol", @@ -54,8 +58,10 @@ "general_camera_mode": "Kamerabildmodus", "general_cheese_time": "Cheeeeeeeese!-Timer:", "general_cntdwn_time": "Countdown Timer:", + "general_collage_background": "Pfad zum Hintergrund für die Collage \"2x4 + background image\"", "general_collage_cntdwn_time": "Collage-Countdown Timer:", "general_collage_key": "Tastencode welcher eine Collage auslöst", + "general_collage_layout": "Collage Layout wählen:", "general_db_file": "Name der Datenbankdatei", "general_default_imagefilter": "Standardbildfilter", "general_disabled_filters": "Deaktivierte Bildfilter", @@ -71,12 +77,13 @@ "general_start_screen_title": "Startbildschirm (Titel)", "general_take_collage_frame_path": "Rahmen", "general_take_frame_path": "Rahmen", + "general_thumb_size": "Thumbnailgröße", "general_time_to_live": "Bildanzeige nach Aufnahme:", "general_videoHeight": "Gerätekamera Bildhöhe", "general_videoWidth": "Gerätekamera Bildbreite", "general_webserver_ip": "IP-Adresse des Photobooth Webservers", "general_wifi_ssid": "Wireless-Netzwerkname (SSID) für den Zugriff auf die Photobooth", - "home": "Home", + "home": "Startseite", "image_preview_before_processing": "Bild laden bevor Filter berechnet werden", "insertMail": "Gebe deine E-Mail-Adresse ein, um das Foto zugesendet zu bekommen.", "is_event": "Veranstaltung", @@ -110,6 +117,7 @@ "mail_username": "Benutzername des E-Mail Accounts", "manual_allow_delete": "Wenn diese Option aktiviert ist, können Bilder direkt nach der Aufnahme auf der Ergebnisseite gelöscht werden.", "manual_allow_delete_from_gallery": "Wenn diese Option aktiviert ist, können Bilder jederzeit aus der Galerie heraus gelöscht werden.", + "manual_auto_print": "Wenn aktiviert, wird das Bild sofort ausgedruckt, nachdem es aufgenommen wurde.", "manual_auto_reload_on_error": "Wenn beim Aufnehmen eines Bildes ein Fehler auftritt, wird die Photobooth nach 5 Sekunden automatisch neu geladen.", "manual_chroma_keying": "Wenn diese Option aktiviert ist, können Sie für Ihre Bilder über die Galerie auf Chromakeying zugreifen.", "manual_commands_exiftool_cmd": "EXIFtool-Befehlszeile, die nach dem Aufnehmen eines Bildes ausgeführt wird. Die Option \"EXIF-Daten beibehalten\" muss aktiviert sein.", @@ -122,6 +130,7 @@ "manual_crop_onprint": "Wenn diese Option aktiviert ist, werden Bilder beim Drucken auf die angegebene Höhe und Breite zugeschnitten (px).", "manual_cups_button": "Schaltfläche zum einfachen Zugriff auf CUPS (Common Unix Printing System) auf der Startseite anzeigen.", "manual_dev": "Aktiviert den Entwicklungsmodus. Beispielbilder werden verwendet anstatt ein Bild aufzunehmen.", + "manual_download_thumbs": "Wenn aktiviert, werden Thumbnails beim Download verwendet (falls vorhanden) statt dem Bild in voller Größe.", "manual_event_symbol": "Wählen Sie ein Symbol, welches zwischen dem eingegebenen Text angezeigt wird.", "manual_event_textLeft": "Geben Sie den Text ein, der auf der linken Seite des ausgewählten Symbols sichtbar ist.", "manual_event_textRight": "Geben Sie den Text ein, der auf der rechten Seite des ausgewählten Symbols sichtbar ist.", @@ -140,8 +149,10 @@ "manual_general_camera_mode": "Wählen Sie den Kameramodus Ihrer Gerätekamera (Kamera mit Blick nach vorne oder hinten).", "manual_general_cheese_time": "Legen Sie eine Zeit fest zur Anzeige von \"Cheeeeeeeese!\" nach dem Countdown.", "manual_general_cntdwn_time": "Legen Sie Ihre Countdown-Zeit fest.", + "manual_general_collage_background": "Geben Sie den Pfad des Hintergrunds ein, der für die Collage im Collage Layout \"2x4 + background image\" verwendet wird.", "manual_general_collage_cntdwn_time": "Legen Sie Ihre Countdown-Zeit fest, welche zwischen den Bildern für eine Collage verwendet wird.", "manual_general_collage_key": "Geben Sie die Keyl-ID an, welche zum Erstellen einer Collage verwendet werden soll (z.B. 13 ist die Eingabetaste). Verwenden Sie beispielsweise https://keycode.info, um die Key-ID herauszufinden.", + "manual_general_collage_layout": "Wählen Sie zwischen den 2x2 und 2x4 Bilder Layouts für die Collage.", "manual_general_db_file": "Name der Datenbankdatei.", "manual_general_default_imagefilter": "Wählen Sie einen Bildfilter, der standardmäßig nach der Aufnahme angewendet wird.", "manual_general_disabled_filters": "Wählen Sie Filter aus, die aus den verfügbaren Bildfiltern entfernt werden.", @@ -157,6 +168,7 @@ "manual_general_start_screen_title": "Geben Sie den auf der Startseite sichtbaren Titel ein.", "manual_general_take_collage_frame_path": "Geben Sie den Pfad des Rahmens ein, der nach der Aufnahme auf Ihre Collage angewendet wird.", "manual_general_take_frame_path": "Geben Sie den Pfad des Rahmens ein, der nach der Aufnahme auf Ihr Bild angewendet wird.", + "manual_general_thumb_size": "Thumbnail-Größe auswählen: XS = max 360px, S = max 540px, M = max 900px, L = max 1080px, XL = max 1260px", "manual_general_time_to_live": "Definieren Sie die Zeit in Millisekunden, die Ihr Bild nach der Aufnahme auf dem Ergebnisbildschirm sichtbar ist.", "manual_general_videoHeight": "Geben Sie einen Wert ein, der als Höhe für die Vorschau der Gerätekamera verwendet wird.", "manual_general_videoWidth": "Geben Sie einen Wert ein, der als Breite für die Vorschau der Gerätekamera verwendet wird.", @@ -190,6 +202,7 @@ "manual_previewCamTakesPic": "Wenn diese Option aktiviert ist, wird ein Bild von der Gerätekamera aufgenommen, anstatt den Befehl \"Bild aufnehmen\" auszuführen. Bitte beachten Sie, dass die Auflösung des Bildes von der angegebenen Höhe und Breite abhängt, da dies wie ein Screenshot aufgenommen wird.", "manual_previewFromCam": "Wenn diese Option aktiviert ist, wird während des Countdown eine Vorschau aus Ihrer Gerätekamera angezeigt. Bei der Vorschau durch die \"Gerätekamera\" wird immer die Kamera des Geräts verwendet, auf dem die Photobooth in einem Browser geöffnet wird (z. B. wird auf einem Tablet immer die Tablet-Kamera angezeigt, während auf einem Smartphone stattdessen immer die Smartphone-Kamera angezeigt wird)! Ein sicherer Ursprung oder eine Ausnahme ist zwingend erforderlich! Wie Sie eine Ausnahme definieren finden Sie hier.", "manual_previewFromIPCam": "Wenn diese Option aktiviert ist, wird während des Countdown eine Vorschau aus definierter URL angezeigt. Stellen Sie sicher, dass ein Stream verfügbar ist, den Sie verwenden können (z. B. von Ihrer Webcam, Smartphone-Kamera oder Raspberry Pi-Kamera).", + "manual_print_auto_print_delay": "Geben Sie die Zeit in Millisekunden an, um die der automatische Druck des Bildes verzögert wird.", "manual_print_crop_height": "Geben Sie einen Wert für die Höhe ein, die für das Bild verwendet wird, wenn \"Bild bei Ausdruck zurechtschneiden\" aktiviert ist.", "manual_print_crop_width": "Geben Sie einen Wert für die Breite ein, die für das Bild verwendet wird, wenn \"Bild bei Ausdruck zurechtschneiden\" aktiviert ist.", "manual_print_font_path": "Geben Sie den Pfad zu der Schriftart ein, mit der Text auf Ihr Bild gedruckt wird.", @@ -202,6 +215,8 @@ "manual_print_linespace": "Geben Sie den zu verwendenden Zeilenabstand ein, wenn Text auf Ihr Bild gedruckt wird.", "manual_print_locationx": "X-Koordinaten des Textes beim Drucken von Text auf Ihr Bild.", "manual_print_locationy": "Y-Koordinaten des Textes beim Drucken von Text auf Ihr Bild.", + "manual_print_print_key": "Geben Sie die Keyl-ID an, welche zum Drucken eines Fotos verwendet werden soll (z.B. 13 ist die Eingabetaste). Verwenden Sie beispielsweise https://keycode.info, um die Key-ID herauszufinden.", + "manual_print_printing_time": "Geben Sie in Millisekunden an, wie lange \"Druckauftrag gestartet! Bitte warten....\" angezeigt wird, nachdem ein Druckauftrag gestartet wurde.", "manual_print_qrcode": "Wenn diese Option aktiviert ist, wird beim Drucken ein QR-Code auf die rechte Seite des Bildes gedruckt.", "manual_print_rotation": "Geben Sie einen Wert ein um den ein Bild beim Drucken gedreht wird.", "manual_protect_admin": "Wenn diese Option aktiviert ist, kann auf das Admin-Panel nur zugegriffen werden, wenn ein Benutzername und ein Passwort eingegeben werden.", @@ -239,13 +254,16 @@ "manual_slideshow_pictureTime": "Geben Sie in Millisekunden an, wie lange ein Bild während der Standalone-Diashow angezeigt wird.", "manual_slideshow_refreshTime": "Die Standalone-Diashow wird nach eingegebenen Sekunden neu geladen.", "manual_take_collage_frame": "Wenn diese Option aktiviert ist, wird nach der Aufnahme ein definierter Rahmen auf Ihre Collage angewendet.", + "manual_take_collage_frame_always": "Wenn aktiviert, wird der definierte Rahmen auf jedes Bild Ihrer Collage angewendet, anstatt einmal nach der Aufnahme der Collage. \"Foto-Collage mit Rahmen aufnehmen\" muss aktiviert sein.", "manual_take_frame": "Wenn diese Option aktiviert ist, wird nach der Aufnahme ein definierter Rahmen auf Ihr Bild angewendet.", "manual_toggle_fs_button": "Wenn diese Option aktiviert ist, wird dem Startbildschirm eine Schaltfläche zum Umschalten des Vollbildmodus hinzugefügt.", "manual_use_collage": "Wenn diese Option aktiviert ist, kann der Benutzer eine Collage aufnehmen. Eine Collage besteht aus 4 Bildern. Optional können Sie eine Collage mit oder ohne Unterbrechung aufnehmen.", "manual_use_download": "Wenn diese Option aktiviert ist, ist für jedes Bild in der Galerie eine Download-Schaltfläche sichtbar.", "manual_use_filter": "Wenn diese Option aktiviert ist, kann der Benutzer nach dem Aufnehmen eines Bildes einen Bildfilter auswählen.", "manual_use_mail": "Wenn diese Option aktiviert ist, ist für jedes Bild in der Galerie eine E-Mail-Schaltfläche sichtbar. Abhängig von Ihren Einstellungen können Sie Bilder direkt per E-Mail senden oder die eingegebene E-Mail-Adresse in einer Datenbank sammeln.", - "manual_use_print": "Wenn diese Option aktiviert ist, wird eine Druckschaltfläche auf dem Ergebnisbildschirm, der Galerie und der Chromakeying-Seite angezeigt.", + "manual_use_print_chromakeying": "Wenn aktiviert, ist auf der Chromakey-Seite eine Druck-Schaltfläche sichtbar.", + "manual_use_print_gallery": "Wenn aktiviert, wird eine Druck-Schaltfläche in der Galerie angezeigt.", + "manual_use_print_result": "Wenn aktiviert, wird eine Druck-Schaltfläche auf der Ergebnisseite angezeigt.", "manual_use_qr": "Wenn diese Option aktiviert ist, wird eine QR-Schaltfläche auf dem Ergebnisbildschirm und in der Galerie angezeigt. Der Benutzer kann beim Scannen des QR-Codes ein Bild herunterladen. Wenn Sie über \"localhost\", \"127.0.0.1\" auf Photobooth zugreifen oder Photobooth in einem Unterordner installiert haben, definieren Sie bitte die IP-Adresse des Photobooth-Webservers, damit der QR-Code funktioniert.
Beispiel, wenn auf Photobooth direkt zugegriffen werden kann: 192.168.0.50
.
Beispiel, wenn Photobooth in einem Unterordner installiert ist: 192.168.0.50/photobooth
.
Example if Photobooth can be accessed directly: 192.168.0.50
.
Example if Photobooth is installed inside a subfolder: 192.168.0.50/photobooth
.
Por ejemplo, si Photobooth se puede acceder directamente: 192.168.0.50
.
Por ejemplo, si Photobooth está instalado dentro de una subcarpeta: 192.168.0.50/photobooth
.
Przykład: url(../img/bg_bluegray.jpg)
Jeśli brakuje języka lub chcesz pomóc w ulepszeniu tłumaczeń, odwiedź \"Jak zaktualizować lub dodać tłumaczenie? Instrukcja na WIKI Photobooth.
", + "manual_general_photo_key": "Określ identyfikator klawisza, aby użyć go do zrobienia zdjęcia (np. 13 jest klawiszem enter). Przykładowo użyj https://keycode.info, aby uzyskać identyfikator klawisza.", + "manual_general_pictureRotation": "Wprowadź wartość, która ustawi stopnie obrotu obrazu po jego wykonaniu.", + "manual_general_picture_permissions": "Zmień uprawnienia zdjęć poleceniem \"chmod\". Zmień tę wartość tylko, jeśli znasz uprawnienia plików w Linux/Unix.", + "manual_general_polaroid_rotation": "Wprowadź wartość, która ustawi stopnie obrotu obrazu po jego wykonaniu z efektem polaroid.", + "manual_general_start_screen_subtitle": "Wprowadź podtytuł widoczny na stronie startowej.", + "manual_general_start_screen_title": "Wprowadź tytuł widoczny na stronie startowej", + "manual_general_take_collage_frame_path": "Wprowadź ścieżkę ramki, która zostanie zastosowana do Twojego kolażu po jego użyciu.", + "manual_general_take_frame_path": "Wprowadź ścieżkę ramki, która zostanie zastosowana do zdjęcia po jego wykonaniu.", + "manual_general_thumb_size": "Wybierz rozmiar miniatury: XS = max 360px, S = max 540px, M = max 900px, L = max 1080px, XL = max 1260px", + "manual_general_time_to_live": "Wprowadź wartość w milisekundach. Ta wartość definiuje czas, w którym obraz jest widoczny na ekranie wyników po wykonaniu zdjęcia.", + "manual_general_videoHeight": "Wprowadź wartość, która jest używana jako wysokość do podglądu przez kamerę urządzenia.", + "manual_general_videoWidth": "Wprowadź wartość, która jest używana jako szerokość dla podglądu przez kamerę urządzenia.", + "manual_general_webserver_ip": "Proszę zdefiniować adres IP serwera WWW Fotobudki, aby kod QR działał w przypadku uzyskania dostępu do Fotobudki przez \"localhost\", \"127.0.0.1\" lub jeśli masz zainstalowaną fotobudkę w podfolderze.Przykład, jeśli Fotobudka jest dostępna bezpośrednio: 192.168.0.50
.
Przykład, jeśli Fotobudka jest zainstalowana w podfolderze: 192.168.0.50/photobooth
tmp
i domyślnie io_server.log",
+ "manual_remotebuzzer_nodebin": "Ścieżka do pliku wykonywalnego dla node.js - przykład /usr/bin/node",
+ "manual_remotebuzzer_port": "Port TCP serwera - przykład 14711",
+ "manual_user_interface_font_size": "Wprowadź domyślny rozmiar czcionki używany dla interfejsu Fotobudki.",
+ "milliseconds": "milisekundy",
+ "newCollage": "Nowy kolaż",
+ "newPhoto": "Nowy obraz",
+ "newest_first": "Pokaż najpierw najnowsze obrazy",
+ "nextPhoto": "Następny obraz",
+ "path": "Ścieżka:",
+ "percent": "%",
+ "polaroid_effect": "Efekt polaroid",
+ "previewCamBackground": "Użyj strumienia z kamery urządzenia jako tła",
+ "previewCamFlipHorizontal": "Odwróć obraz z kamery urządzenia w poziomie",
+ "previewCamTakesPic": "Kamerka urządzenia robi zdjęcie",
+ "previewFromCam": "Zobacz podgląd z kamery urządzenia",
+ "previewFromIPCam": "Podgląd z adresu URL",
+ "print": "Drukuj",
+ "print_auto_print_delay": "Opóźnienie automatycznego drukowania obrazu",
+ "print_crop_height": "Nowa wysokość przy wydruku (px)",
+ "print_crop_width": "Nowa szerokość przy wydruku (px)",
+ "print_font_path": "Czcionka",
+ "print_fontsize": "Rozmiar czcionki",
+ "print_frame": "Drukuj ramkę na obrazku",
+ "print_frame_path": "Ramka",
+ "print_line1": "Tekst dla wiersza 1",
+ "print_line2": "Tekst dla wiersza 2",
+ "print_line3": "Tekst dla wiersza 3",
+ "print_linespace": "Odstępy między wierszami",
+ "print_locationx": "Współrzędna X",
+ "print_locationy": "Współrzędna Y",
+ "print_print_key": "Kod klawisza, który wyzwala drukowanie",
+ "print_printing_time": "Czas drukowania",
+ "print_qrcode": "Kod QR na obrazku podczas druku",
+ "print_rotation": "Obrót tekstu",
+ "printing": "Rozpoczęto drukowanie! Proszę czekać...",
+ "protect_admin": "Chroń panel administratora",
+ "protect_index": "Chroń ekran startowy",
+ "pswp_animateTransitions": "Zmiana obrazów z efektem przejścia slajdu",
+ "pswp_clickToCloseNonZoomable": "Kliknięcie myszy na obrazek powinno zamknąć galerię",
+ "pswp_closeOnOutsideClick": "Zamknij galerię, jeśli kliknięto na zewnątrz obrazu",
+ "pswp_closeOnScroll": "Zamknij obraz przy przewijaniu strony",
+ "pswp_closeOnVerticalDrag": "Zamknij galerię podczas przeciągania pionowo i gdy obraz nie jest powiększony",
+ "pswp_counterEl": "Pokaż licznik zdjęć",
+ "pswp_preventSwiping": "Wyłącz gesty przesuwania palcem",
+ "pswp_tapToToggleControls": "Przełącz widoczność sterowania/przycisków poprzez dotknięcie",
+ "qr": "Kod QR",
+ "qrHelp": "Aby pobrać zdjęcie na swój smartfon, połącz się z WiFi:",
+ "randomPicture": "Pokaż losowe zdjęcia",
+ "really_delete": "Naprawdę usunąć wszystkie zdjęcia? Tej operacji nie można cofnąć!",
+ "really_delete_image": "zostanie usunięte! Tej operacji nie można cofnąć! Naprawdę usunąć zdjęcie?",
+ "reload": "Przeładuj Stronę",
+ "remotebuzzer": "Serwer Zdalnego Buzera",
+ "remotebuzzer_collagetime": "Przytrzymaj przycisk x sekund, aby wyzwolić kolaż",
+ "remotebuzzer_enabled": "Jeśli włączone, upewnij się, że poprawnie ustawiono adres IP serwera WWW Fotobudki (sekcja \"Ogólne\")",
+ "remotebuzzer_logfile": "Plik dziennika",
+ "remotebuzzer_nodebin": "Ścieżka wykonywalna Node.js",
+ "remotebuzzer_pin": "Raspberry Pi PIN",
+ "remotebuzzer_port": "Port serwera",
+ "remove_config": "Usuń konfigurację osobistą (my.config.inc.php)",
+ "remove_images": "Usuń obrazki",
+ "remove_mailtxt": "Usuń bazę danych adresów e-mail",
+ "reset": "Reset",
+ "rounded_corners": "Zaokrąglone narożniki",
+ "save": "Zapisz",
+ "saveerror": "Błąd",
+ "saving": "Zapisuję",
+ "scrollbar": "Pokaż pasek przewijania w galerii",
+ "seconds": "sekunda(y)",
+ "selectFilter": "Filtr obrazu",
+ "send": "Wyślij",
+ "sendAllMail": "Wyślij mi link do wszystkich zdjęć w ciągu najbliższych kilku dni",
+ "send_all_later": "Aktywuj pole wyboru, aby dodać wprowadzony adres do pliku (na przykład, aby wysłać wiadomość z wszystkimi zdjęciami później)",
+ "show_date": "Pokaż datę poniżej zdjęć w galerii (działa tylko wtedy, gdy używane są zdjęcia dateformat)",
+ "show_error_messages": "Pokaż komunikaty błędów",
+ "show_faq": "Otwórz FAQ",
+ "show_gallery": "Pokaż galerię",
+ "show_manual": "Otwórz Instrukcję",
+ "show_wiki": "Otwórz Wiki (wymagane połączenie internetowe)",
+ "success": "Zapisano poprawnie",
+ "symbol": "Wybierz symbol",
+ "takeCollage": "Zrób kolaż!",
+ "takePhoto": "Zrób zdjęcie!",
+ "take_collage_frame": "Zrób kolaż z ramką",
+ "take_collage_frame_always": "Zastosuj ramkę do każdego zdjęcia kolażu",
+ "take_frame": "Zrób zdjęcie z ramką",
+ "toggleFullscreen": "Przełącz na pełny ekran",
+ "toggle_fs_button": "Pokaż przycisk, aby włączyć tryb pełnoekranowy",
+ "update_available": "Dostępna jest aktualizacja.",
+ "use_button": "Użyj Buzera aby zrobić zdjęcie",
+ "use_collage": "Zezwalaj na kolaż zdjęć",
+ "use_download": "Zezwól na pobieranie",
+ "use_filter": "Zezwól na filtry obrazu",
+ "use_mail": "Użyj E-Mail",
+ "use_print_chromakeying": "Zezwalaj na drukowanie z chromakeying",
+ "use_print_gallery": "Zezwól na drukowanie z galerii",
+ "use_print_result": "Zezwalaj na drukowanie na stronie wyników",
+ "use_qr": "Użyj kodów QR",
+ "use_slideshow": "Zezwalaj na pokaz slajdów w galerii",
+ "use_thumbs": "Użyj miniatur do pokazu slajdów",
+ "user_interface": "Interfejs użytkownika",
+ "user_interface_background_admin": "Ścieżka obrazu tła panelu administracyjnego",
+ "user_interface_background_chroma": "Ścieżka obrazu tła chromakeying",
+ "user_interface_background_image": "Ścieżka obrazu tła",
+ "user_interface_colors_background_countdown": "Kolor tła dla odliczania",
+ "user_interface_colors_border": "Kolor obramowania",
+ "user_interface_colors_box": "Kolor pola",
+ "user_interface_colors_button_font": "Kolor czcionki przycisków",
+ "user_interface_colors_cheese": "Uśmiech!-Kolor",
+ "user_interface_colors_countdown": "Kolor czasu odliczania",
+ "user_interface_colors_font": "Kolor czcionki",
+ "user_interface_colors_gallery_button": "Kolor przycisku galerii",
+ "user_interface_colors_panel": "Kolor panelu administratora i logowania",
+ "user_interface_colors_primary": "Kolor podstawowy",
+ "user_interface_colors_secondary": "Kolor Dodatkowy",
+ "user_interface_colors_start_font": "Kolor czcionki ekranu startowego",
+ "user_interface_font_size": "Domyślny rozmiar czcionki",
+ "using_latest_version": "Używasz najnowszej dostępnej wersji Fotobudki."
+}
diff --git a/scripts/pack-build.js b/scripts/pack-build.js
index 0070d2454..3b77ddb16 100644
--- a/scripts/pack-build.js
+++ b/scripts/pack-build.js
@@ -69,8 +69,7 @@ function createArchive(fileName, archive) {
archive.file('phpinfo.php');
archive.file('README.md');
archive.file('update-booth.sh');
- archive.file('node_modules/@andreasremdt/simple-translator/LICENSE');
- archive.file('node_modules/@andreasremdt/simple-translator/dist/umd/translator.min.js');
+ archive.directory('node_modules/@andreasremdt/simple-translator/');
archive.directory('node_modules/font-awesome/');
archive.file('node_modules/github-markdown-css/github-markdown.css');
archive.file('node_modules/github-markdown-css/license');
diff --git a/src/js/chromakeying.js b/src/js/chromakeying.js
index 05dc71c53..8633d01c5 100644
--- a/src/js/chromakeying.js
+++ b/src/js/chromakeying.js
@@ -4,6 +4,7 @@ let mainImage;
let mainImageWidth;
let mainImageHeight;
let backgroundImage;
+let isPrinting = false;
function greenToTransparency(imageIn, imageOut) {
for (let y = 0; y < imageIn.getHeight(); y++) {
@@ -132,47 +133,58 @@ function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) {
function printImage(filename, cb) {
const errormsg = i18n('error');
- setTimeout(function () {
- $.ajax({
- method: 'GET',
- url: 'api/print.php',
- data: {
- filename: filename
- },
- success: (data) => {
- console.log('Picture processed: ', data);
-
- if (data.error) {
- console.log('An error occurred: ', data.error);
+ if (isPrinting) {
+ console.log('Printing already: ' + isPrinting);
+ } else {
+ isPrinting = true;
+ setTimeout(function () {
+ $.ajax({
+ method: 'GET',
+ url: 'api/print.php',
+ data: {
+ filename: filename
+ },
+ success: (data) => {
+ console.log('Picture processed: ', data);
+
+ if (data.error) {
+ console.log('An error occurred: ', data.error);
+ $('#print_mesg').empty();
+ $('#print_mesg').html(
+ '' + data.error + ''
+ );
+ }
+
+ setTimeout(function () {
+ $('#print_mesg').removeClass('modal--show');
+ if (data.error) {
+ $('#print_mesg').empty();
+ $('#print_mesg').html(
+ '' + i18n('printing') + ''
+ );
+ }
+ cb();
+ isPrinting = false;
+ }, config.printing_time);
+ },
+ error: (jqXHR, textStatus) => {
+ console.log('An error occurred: ', textStatus);
$('#print_mesg').empty();
$('#print_mesg').html(
- '' + data.error + ''
+ '' + errormsg + ''
);
- }
- setTimeout(function () {
- $('#print_mesg').removeClass('modal--show');
- if (data.error) {
+ setTimeout(function () {
+ $('#print_mesg').removeClass('modal--show');
$('#print_mesg').empty();
$('#print_mesg').html('' + i18n('printing') + '');
- }
- cb();
- }, 5000);
- },
- error: (jqXHR, textStatus) => {
- console.log('An error occurred: ', textStatus);
- $('#print_mesg').empty();
- $('#print_mesg').html('' + errormsg + '');
-
- setTimeout(function () {
- $('#print_mesg').removeClass('modal--show');
- $('#print_mesg').empty();
- $('#print_mesg').html('' + i18n('printing') + '');
- cb();
- }, 5000);
- }
- });
- }, 1000);
+ cb();
+ isPrinting = false;
+ }, 5000);
+ }
+ });
+ }, 1000);
+ }
}
function saveImage(cb) {
@@ -234,6 +246,16 @@ function closeHandler(ev) {
}
}
+$(document).on('keyup', function (ev) {
+ if (config.use_print_chromakeying && config.print_key && parseInt(config.print_key, 10) === ev.keyCode) {
+ if (isPrinting) {
+ console.log('Printing already in progress!');
+ } else {
+ $('#print-btn').trigger('click');
+ }
+ }
+});
+
$(document).ready(function () {
$('#save-btn').on('click', saveImageHandler);
$('#print-btn').on('click', printImageHandler);
diff --git a/src/js/core.js b/src/js/core.js
index 8ad51fa95..98ff92998 100644
--- a/src/js/core.js
+++ b/src/js/core.js
@@ -22,6 +22,7 @@ const photoBooth = (function () {
videoSensor = document.querySelector('#video--sensor');
let timeOut,
+ isPrinting = false,
takingPic = false,
nextCollageNumber = 0,
currentCollageFile = '',
@@ -478,6 +479,13 @@ const photoBooth = (function () {
});
});
+ // If autoprint is activated the picture will immediately printed after taken.
+ if (config.auto_print) {
+ setTimeout(function () {
+ api.printImage(filename);
+ }, config.auto_print_delay);
+ }
+
resultPage
.find('.deletebtn')
.off('click')
@@ -610,54 +618,63 @@ const photoBooth = (function () {
};
api.printImage = function (imageSrc, cb) {
- modal.open('#print_mesg');
const errormsg = i18n('error');
- setTimeout(function () {
- $.ajax({
- method: 'GET',
- url: 'api/print.php',
- data: {
- filename: imageSrc
- },
- success: (data) => {
- console.log('Picture processed: ', data);
-
- if (data.error) {
- console.log('An error occurred: ', data.error);
+ if (isPrinting) {
+ console.log('Printing already: ' + isPrinting);
+ } else {
+ modal.open('#print_mesg');
+ isPrinting = true;
+ setTimeout(function () {
+ $.ajax({
+ method: 'GET',
+ url: 'api/print.php',
+ data: {
+ filename: imageSrc
+ },
+ success: (data) => {
+ console.log('Picture processed: ', data);
+
+ if (data.error) {
+ console.log('An error occurred: ', data.error);
+ $('#print_mesg').empty();
+ $('#print_mesg').html(
+ '' + data.error + ''
+ );
+ }
+
+ setTimeout(function () {
+ modal.close('#print_mesg');
+ if (data.error) {
+ $('#print_mesg').empty();
+ $('#print_mesg').html(
+ '' + i18n('printing') + ''
+ );
+ }
+ cb();
+ isPrinting = false;
+ }, config.printing_time);
+ },
+ error: (jqXHR, textStatus) => {
+ console.log('An error occurred: ', textStatus);
$('#print_mesg').empty();
$('#print_mesg').html(
- '' + data.error + ''
+ '' + errormsg + ''
);
- }
- setTimeout(function () {
- modal.close('#print_mesg');
- if (data.error) {
+ setTimeout(function () {
+ modal.close('#print_mesg');
$('#print_mesg').empty();
$('#print_mesg').html(
'' + i18n('printing') + ''
);
- }
- cb();
- }, 5000);
- },
- error: (jqXHR, textStatus) => {
- console.log('An error occurred: ', textStatus);
- $('#print_mesg').empty();
- $('#print_mesg').html(
- '' + errormsg + ''
- );
-
- setTimeout(function () {
- modal.close('#print_mesg');
- $('#print_mesg').empty();
- $('#print_mesg').html('' + i18n('printing') + '');
- cb();
- }, 5000);
- }
- });
- }, 1000);
+ cb();
+ isPrinting = false;
+ }, 5000);
+ }
+ });
+ }, 1000);
+ }
};
api.deleteImage = function (imageName, cb) {
@@ -882,6 +899,15 @@ const photoBooth = (function () {
console.log('Taking photo already in progress!');
}
}
+
+ if (config.use_print_result && config.print_key && parseInt(config.print_key, 10) === ev.keyCode) {
+ if (isPrinting) {
+ console.log('Printing already in progress!');
+ } else {
+ $('.printbtn').trigger('click');
+ $('.printbtn').blur();
+ }
+ }
});
// clear Timeout to not reset the gallery, if you clicked anywhere
diff --git a/src/js/i18n-sub.js b/src/js/i18n-sub.js
index b2ff6a451..564b52e0b 100644
--- a/src/js/i18n-sub.js
+++ b/src/js/i18n-sub.js
@@ -8,6 +8,12 @@ const translator = new Translator({
debug: config.dev
});
-translator.fetch(['de', 'en', 'es', 'el', 'fr']).then(() => {
- translator.translatePageTo(config.language);
+translator.fetch('en').then(() => {
+ translator.translatePageTo();
});
+
+if (config.language !== 'en') {
+ translator.fetch(config.language).then(() => {
+ translator.translatePageTo(config.language);
+ });
+}
diff --git a/src/js/i18n.js b/src/js/i18n.js
index e1fda9380..188ef0262 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -8,6 +8,12 @@ const translator = new Translator({
debug: config.dev
});
-translator.fetch(['de', 'en', 'es', 'el', 'fr']).then(() => {
- translator.translatePageTo(config.language);
+translator.fetch('en').then(() => {
+ translator.translatePageTo();
});
+
+if (config.language !== 'en') {
+ translator.fetch(config.language).then(() => {
+ translator.translatePageTo(config.language);
+ });
+}
diff --git a/src/js/photoinit.js b/src/js/photoinit.js
index 9f452dc6d..291163ab4 100644
--- a/src/js/photoinit.js
+++ b/src/js/photoinit.js
@@ -4,7 +4,8 @@
function initPhotoSwipeFromDOM(gallerySelector) {
let gallery,
ssRunning = false,
- ssOnce = false;
+ ssOnce = false,
+ isPrinting = false;
const ssDelay = config.gallery_pictureTime,
ssButtonClass = '.pswp__button--playpause';
@@ -145,11 +146,17 @@ function initPhotoSwipeFromDOM(gallerySelector) {
});
gallery.listen('afterChange', function () {
+ const img = gallery.currItem.src.split('\\').pop().split('/').pop();
+
if (config.dev) {
- const img = gallery.currItem.src.split('\\').pop().split('/').pop();
console.log('Current image: ' + img);
}
+ $('.pswp__button--custom-download').attr({
+ href: 'api/download.php?image=' + img,
+ download: img
+ });
+
if (ssRunning && ssOnce) {
ssOnce = false;
setTimeout(gotoNextSlide, ssDelay);
@@ -230,11 +237,17 @@ function initPhotoSwipeFromDOM(gallerySelector) {
e.preventDefault();
e.stopPropagation();
- const img = gallery.currItem.src.split('\\').pop().split('/').pop();
+ if (isPrinting) {
+ console.log('Printing already in progress!');
+ } else {
+ isPrinting = true;
+ const img = gallery.currItem.src.split('\\').pop().split('/').pop();
- photoBooth.printImage(img, () => {
- gallery.close();
- });
+ photoBooth.printImage(img, () => {
+ gallery.close();
+ isPrinting = false;
+ });
+ }
});
// Close Gallery while Taking a Picture or Collage
@@ -296,4 +309,14 @@ function initPhotoSwipeFromDOM(gallerySelector) {
}
$(gallerySelector).on('click', onThumbnailClick);
+
+ $(document).on('keyup', function (ev) {
+ if (config.use_print_gallery && config.print_key && parseInt(config.print_key, 10) === ev.keyCode) {
+ if (isPrinting) {
+ console.log('Printing already in progress!');
+ } else if ($('#gallery').hasClass('gallery--open') && typeof gallery !== 'undefined') {
+ $('.pswp__button--print').trigger('click');
+ }
+ }
+ });
}
diff --git a/src/sass/photoswipe-bottom.scss b/src/sass/photoswipe-bottom.scss
index c3f199eab..e57e08928 100644
--- a/src/sass/photoswipe-bottom.scss
+++ b/src/sass/photoswipe-bottom.scss
@@ -4,6 +4,7 @@
.pswp__button--print,
.pswp__button--print-chroma-keying,
.pswp__button--download,
+.pswp__button--custom-download,
.pswp__button--mail,
.pswp__button--playpause,
.pswp__button--share,
@@ -60,6 +61,7 @@
.pswp__button--print,
.pswp__button--print-chroma-keying,
.pswp__button--download,
+ .pswp__button--custom-download,
.pswp__button--mail,
.pswp__button--playpause,
.pswp__button--share,
diff --git a/src/sass/vendor/_photoswipe.scss b/src/sass/vendor/_photoswipe.scss
index 35e0be950..cf8597b5f 100644
--- a/src/sass/vendor/_photoswipe.scss
+++ b/src/sass/vendor/_photoswipe.scss
@@ -3,6 +3,7 @@
.pswp__button--print,
.pswp__button--print-chroma-keying,
.pswp__button--download,
+.pswp__button--custom-download,
.pswp__button--mail,
.pswp__button--playpause,
.pswp__button--share,
diff --git a/template/pswp.template.php b/template/pswp.template.php
index 96eb88c0f..8764e2a47 100644
--- a/template/pswp.template.php
+++ b/template/pswp.template.php
@@ -33,7 +33,7 @@
-
+
@@ -41,8 +41,9 @@
-
-
+
+
+
diff --git a/yarn.lock b/yarn.lock
index 86b740c86..7bb09d7e4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3957,10 +3957,10 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
-prettier@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6"
- integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==
+prettier@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
+ integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
pretty-hrtime@^1.0.0:
version "1.0.3"