sleepytaco преди 3 години
родител
ревизия
8f48addfe6
променени са 3 файла, в които са добавени 26 реда и са изтрити 6 реда
  1. 17 2
      apps/main/templates/view_playlist.html
  2. 5 1
      apps/main/views.py
  3. 4 3
      apps/users/templates/settings.html

+ 17 - 2
apps/main/templates/view_playlist.html

@@ -11,9 +11,15 @@
         {% if not_imported_LL %}
             <div hx-get="/import/liked-videos-playlist" hx-trigger="load" hx-swap="outerHTML">
             <div class="alert alert-dismissible fade show" role="alert" style="background-color: cadetblue">
-                <div class="d-flex justify-content-center mt-4 mb-3 ms-2" id="loading-sign" >
+                <div class="d-flex justify-content-center flex-column mt-4 mb-3 ms-2" id="loading-sign" >
+                    <div class="d-flex justify-content-center">
                     <img src="/static/svg-loaders/spinning-circles.svg" width="40" height="40">
-                    <h5 class="mt-2 ms-2 text-black">Importing your Liked Videos playlist into UnTube, do not refresh this page!</h5>
+                    <h5 class="mt-2 ms-2 text-black">Importing your Liked Videos playlist into UnTube, do not refresh this page!
+                        </h5>
+                    </div>
+                    <div class="d-flex justify-content-center mt-1">
+                        <h6>(this might take a while if you have more than 700 liked videos!)</h6>
+                    </div>
                 </div>
             </div>
         </div>
@@ -396,7 +402,16 @@
                             {% if not playlist.confirm_before_deleting %}
                                 <h5>Note: You have set confirm before deleting to False. Buttons below will take effect immediately when clicked.</h5>
                                 <hr>
+                            {% else %}
+                                {% if playlist.has_unavailable_videos %}
+                                    <h5>Note: Clicking on delete unavailable videos button will take immediate effect. All videos labelled unavailable in this playlist will be deleted from your YouTube playlist.</h5>
+                                {% endif %}
+                                {% if playlist.has_duplicate_videos %}
+                                    <h5>Note: Clicking on delete duplicate videos button will take immediate effect. All videos labelled duplicate in this playlist will be deleted from your YouTube playlist.</h5>
+                                {% endif %}
+                                <hr>
                             {% endif %}
+
                         </div>
                         <div class="d-flex justify-content-start">
                             <div class="btn-group me-2">

+ 5 - 1
apps/main/views.py

@@ -478,11 +478,15 @@ def delete_videos(request, playlist_id, command):
             hx_vals = ""
             delete_text = f"{num_vids} videos"
 
+        if playlist_id == "LL":
+            extra_text += "Since you're deleting from your Liked Videos playlist, the selected videos will also be unliked from YouTube. "
+
         url = f"/playlist/{playlist_id}/delete-videos/confirmed"
+
         return HttpResponse(
             f"""
                 <div hx-ext="class-tools">
-                <div classes="add visually-hidden:4s">
+                <div classes="add visually-hidden:30s">
                     <h5>
                     Are you sure you want to delete {delete_text} from your YouTube playlist?{extra_text}This cannot be undone.</h5>
                     <button hx-post="{url}" hx-include="[id='video-checkboxes']" {hx_vals} hx-target="#delete-videos-confirm-box" type="button" class="btn btn-outline-danger btn-sm">Confirm</button>

+ 4 - 3
apps/users/templates/settings.html

@@ -8,8 +8,9 @@
 <div class="main-body" style="padding: 15px">
 
       <div class="row g-5">
-        <div class="col-md-4 mb-3">
-          <div class="card bg-dark text-white">
+        <div class="col-md-4 mb-3 d-flex justify-content-center">
+          <h1><span style="border-bottom: 3px #a35a5a dashed;">User Settings</span></h1>
+          <div class="card bg-dark text-white visually-hidden">
             <div class="card-body">
                 <!--
               <div class="d-flex flex-column align-items-center text-center">
@@ -117,7 +118,7 @@
 
                         <div class="mb-3 form-check form-switch">
                         <input class="form-check-input" name="auto refresh playlists" type="checkbox" id="flexSwitchCheckDefault">
-                        <label class="form-check-label" for="flexSwitchCheckDefault">Automatically refresh playlists on visit (this can abruptly refresh the page)</label>
+                        <label class="form-check-label" for="flexSwitchCheckDefault">Automatically check for playlist updates on visit</label>
                         </div>
 
                         <div class="mb-3 form-check form-switch">