diff --git a/app/public/static/js/gallery_carousel.js b/app/public/static/js/gallery_carousel.js new file mode 100644 index 00000000..73cdf773 --- /dev/null +++ b/app/public/static/js/gallery_carousel.js @@ -0,0 +1,13 @@ +// @author recluse4615 +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later + +"use strict"; + +const galleryCarousel = new bootstrap.Carousel(document.getElementById("galleryCarousel")); +document.querySelectorAll(".gallery-image").forEach(el => { + el.addEventListener("click", function(e) { + galleryCarousel.to(el.dataset.bsSlideTo); + e.preventDefault(); + }); +}); + diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index e29715a4..1ebc773c 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -19,6 +19,7 @@ {% block scriptextra %} + {% if current_user.is_authenticated %} {% endif %} @@ -76,6 +77,7 @@ {% elif not package.media_license.is_foss %} {% set package_warning=_("Non-free media") %} {% endif %} +
{% if not package.approved %}
@@ -248,6 +250,37 @@ {% endif %} {% if screenshots or package.check_perm(current_user, "ADD_SCREENSHOTS") or package.video_url %} + {% if screenshots %} + + {% endif %}