From 74adf65f505075389141aff54793396ea819caa3 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Wed, 5 Aug 2020 20:00:11 +0200 Subject: [PATCH] PhotoSwipe: switch back to own fork, add as git submodule Change-Id: I9c3c9a2a78899b91b416d581af584307ce676478 --- .gitmodules | 3 +++ gallery.php | 8 ++++---- index.php | 8 ++++---- login/index.php | 2 -- package.json | 1 - scripts/pack-build.js | 2 -- update-booth.sh | 9 +++++++-- vendor/PhotoSwipe | 1 + 8 files changed, 19 insertions(+), 15 deletions(-) create mode 160000 vendor/PhotoSwipe diff --git a/.gitmodules b/.gitmodules index 38eeac3c6..a2ecc612d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,3 +8,6 @@ [submodule "vendor/rpihotspot"] path = vendor/rpihotspot url = https://github.com/andi34/rpihotspot +[submodule "vendor/PhotoSwipe"] + path = vendor/PhotoSwipe + url = https://github.com/andi34/PhotoSwipe diff --git a/gallery.php b/gallery.php index f715c8c61..d21c638df 100644 --- a/gallery.php +++ b/gallery.php @@ -30,8 +30,8 @@ - - + + @@ -85,8 +85,8 @@ - - + + diff --git a/index.php b/index.php index 2835694fd..212e9ca73 100644 --- a/index.php +++ b/index.php @@ -32,8 +32,8 @@ - - + + @@ -239,8 +239,8 @@ - - + + diff --git a/login/index.php b/login/index.php index 4c6dc9b2c..9fa23fee2 100644 --- a/login/index.php +++ b/login/index.php @@ -45,8 +45,6 @@ - - diff --git a/package.json b/package.json index 4f5748061..dd73ecc8d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "marvinj": "^1.0.0", "normalize.css": "^8.0.1", "npm-run-all": "^4.1.5", - "photoswipe": "^4.1.3", "whatwg-fetch": "^3.2.0" }, "devDependencies": { diff --git a/scripts/pack-build.js b/scripts/pack-build.js index b4a2715a0..9984cf0eb 100644 --- a/scripts/pack-build.js +++ b/scripts/pack-build.js @@ -80,8 +80,6 @@ function createArchive(fileName, archive) { archive.directory('node_modules/marvinj/marvinj/release/'); archive.file('node_modules/normalize.css/LICENSE.md'); archive.file('node_modules/normalize.css/normalize.css'); - archive.file('node_modules/photoswipe/LICENSE'); - archive.directory('node_modules/photoswipe/dist/'); archive.file('node_modules/whatwg-fetch/LICENSE'); archive.file('node_modules/whatwg-fetch/dist/fetch.umd.js'); diff --git a/update-booth.sh b/update-booth.sh index 579083bf7..578e7f8ee 100644 --- a/update-booth.sh +++ b/update-booth.sh @@ -87,7 +87,7 @@ apt dist-upgrade -y info "[Info] Checking for webserver..." for server in "${WEBSERVER[@]}"; do if [ $(dpkg-query -W -f='${Status}' ${server} 2>/dev/null | grep -c "ok installed") -eq 1 ]; then - info "[Webserver] ${server} installed" + info "[Webserver] ${server} used." if [[ ${server} == "nginx" || ${server} == "lighttpd" ]]; then info "[NOTE] You're using ${server} as your Webserver." info "[NOTE] For a no-hassle-setup Apache2 Webserver is recommend!" @@ -121,9 +121,14 @@ chown -R www-data:www-data ${booth_source} for file in "${OLDFILES[@]}"; do if [ -f "${booth_source}/${file}" ]; then - info "[Info] Deleting unused file: ${booth_source}/${file}" + info "[Info] Deleting unused file: ${booth_source}/${file}" rm "${booth_source}/${file}" fi done +if [ -d "${booth_source}/node_modules/photoswipe" ]; then + info "[Info] Deleting unused module: ${booth_source}/node_modules/photoswipe" + rm -rf ${booth_source}/node_modules/photoswipe +fi + info "[Info] Updated Photobooth" diff --git a/vendor/PhotoSwipe b/vendor/PhotoSwipe new file mode 160000 index 000000000..8f6394ec7 --- /dev/null +++ b/vendor/PhotoSwipe @@ -0,0 +1 @@ +Subproject commit 8f6394ec7c6cdebb851a42c398eaa721ae239c21