progress_bar.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {% if channel_found %}
  2. {% if not done %}
  3. <div hx-target="this"
  4. hx-get="{% url 'continue' %}"
  5. hx-trigger="load"
  6. hx-swap="outerHTML">
  7. <div class="d-flex justify-content-center pt-3 pb-2 mb-3" style="background-color: cadetblue">
  8. <div class="w-50">
  9. <div class="d-flex justify-content-center">
  10. <h3>Importing playlist '{{ playlist_name }}' from YouTube</h3>
  11. </div>
  12. <div class="d-flex justify-content-center">
  13. <h3>({{ playlists_imported }}/{{ total_playlists }} playlists imported)</h3>
  14. </div>
  15. <div class="progress">
  16. <div id="pb" class="progress-bar progress-bar-striped progress-bar-animated bg-warning text-dark" style="width:{{ progress }}%" role="progressbar" aria-valuemin="0" aria-valuemax="100">{{ progress }}%</div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. {% else %}
  22. <div class="d-flex justify-content-center pt-3 pb-2 mb-3" style="background-color: #5fa075">
  23. <div class="w-50">
  24. <div class="d-flex justify-content-center">
  25. <h3>Finished importing all of your playlists from YouTube</h3>
  26. </div>
  27. <div class="d-flex justify-content-center">
  28. <h3>({{ playlists_imported }}/{{ total_playlists }} playlists imported)</h3>
  29. </div>
  30. <div class="progress">
  31. <div id="pb" class="progress-bar progress-bar-striped progress-bar-animated bg-success" style="width:{{ progress }}%" role="progressbar" aria-valuemin="0" aria-valuemax="100">{{ progress }}%</div>
  32. </div>
  33. <div class="d-flex justify-content-center">
  34. <a class="btn btn-success" href="{% url 'home' %}">Continue</a>
  35. </div>
  36. </div>
  37. </div>
  38. {% endif %}
  39. {% else %}
  40. <div hx-target="this" hx-swap="outerHTML">
  41. <div class="d-flex justify-content-center pt-3 pb-2 mb-3" style="background-color: #c9942a">
  42. <div class="w-75">
  43. <div class="d-flex justify-content-center">
  44. <h3>Uh-oh, we were not able to find any YouTube channel linked to this Google account. Please create a YouTube channel to be able to import/export playlists back and forth between YouTube and UnTube.</h3>
  45. </div>
  46. <br>
  47. <div class="d-flex justify-content-center">
  48. <div class="btn-group-lg">
  49. <button class="btn btn-lg btn-danger" hx-post="{% url 'start' %}">
  50. Retry
  51. </button>
  52. <a class="btn btn-lg btn-outline-danger" href="{% url 'log_out' %}">
  53. Log out
  54. </a>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. {% endif %}