Added a button to download a video to the local device. (#137)

* Add video download button.

* Swapped <a> and <button> tags to fix theme issue.

* Download button renamed to `Download File`
This commit is contained in:
Nathan DeTar 2022-01-09 18:00:29 -08:00 committed by GitHub
parent 8410b9310f
commit edc9f3fe15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@
{% else %} {% else %}
<p>Youtube: Deactivated</p> <p>Youtube: Deactivated</p>
{% endif %} {% endif %}
<a download="" href="/media/{{ video.media_url }}"><button id="download-item">Download File</button></a>
<button onclick="deleteConfirm()" id="delete-item">Delete Video</button> <button onclick="deleteConfirm()" id="delete-item">Delete Video</button>
<div class="delete-confirm" id="delete-button"> <div class="delete-confirm" id="delete-button">
<span>Are you sure? </span><button class="danger-button" onclick="deleteVideo(this)" data-id="{{ video.youtube_id }}" data-redirect = "{{ video.channel.channel_id }}">Delete</button> <button onclick="cancelDelete()">Cancel</button> <span>Are you sure? </span><button class="danger-button" onclick="deleteVideo(this)" data-id="{{ video.youtube_id }}" data-redirect = "{{ video.channel.channel_id }}">Delete</button> <button onclick="cancelDelete()">Cancel</button>
@ -114,4 +115,4 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div> </div>
{% endblock content %} {% endblock content %}