]> git.mdlowis.com Git - proto/atv.git/commitdiff
fixed queueing and tweaked css
authorMichael D. Lowis <mike@mdlowis.com>
Tue, 12 Mar 2024 02:43:47 +0000 (22:43 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Tue, 12 Mar 2024 02:43:47 +0000 (22:43 -0400)
atv/assets/admin.html
atv/assets/control.html
atv/lib/atv/channel.rb

index 719cbecdf4b0dd37e4ee0569854f4e501bd5c5e4..13ec436e04a9764ff0019f994cdf75188cc753cd 100644 (file)
         margin-right: 1em;
     }
 
+    #queueList div {
+        background-color: #A7BDC7;
+        padding: 1em;
+        margin: 0.5em;
+        text-align: left;
+    }
 
   </style>
 </head>
index 2e0f5e30477052b40940f0814b6ef62c7adcd9b0..f5657dd82c3c384bb3bb9687d91887dbba72f809 100644 (file)
         margin-right: 1em;
     }
 
+    #itemList div {
+        background-color: #A7BDC7;
+        padding: 1em;
+        margin: 0.5em;
+    }
+
+    #queueList div {
+        background-color: #A7BDC7;
+        padding: 1em;
+        margin: 0.5em;
+        text-align: left;
+    }
 
   </style>
 </head>
               <td class="item" id="nextVid">Some Other File</td>
             </tr>
         </tbody></table>
+        <div style="width: 100%; text-align: center"><h2>Queued Videos</h2></div>
+
     </section>
 
     <section class="grow">
-        <div style="width: 100%; text-align: center"><h2>Queued Videos</h2></div>
         <div id="queueList" style="width: 100%; text-align: center;">The queue is currently empty</div>
     </section>
 
@@ -194,8 +207,6 @@ const UI = (()=>{
         refreshItems();
     };
 
-
-
     const refreshQueue = ()=>{
         if (queue.length > 0) {
             queueList.innerHTML = "";
@@ -229,16 +240,26 @@ const UI = (()=>{
         itemList.innerText = "";
         for (const item in dir) {
             const el = document.createElement("div");
-            const link = document.createElement("a");
-            link.innerText = item;
-            link.href = '#';
+            el.innerText = item;
             if ('path' in dir[item]) {
-                link.onclick = ()=>{ self.enqueue(dir[item].path); };
+                el.onclick = ()=>{ self.enqueue(dir[item].path); };
             } else {
-                link.onclick = ()=>{ linkDown(item); };
+                el.onclick = ()=>{ linkDown(item); };
             }
-            el.appendChild(link);
             itemList.appendChild(el);
+
+
+
+//            const link = document.createElement("a");
+//            link.innerText = item;
+//            link.href = '#';
+//            if ('path' in dir[item]) {
+//                link.onclick = ()=>{ self.enqueue(dir[item].path); };
+//            } else {
+//                link.onclick = ()=>{ linkDown(item); };
+//            }
+//            el.appendChild(link);
+//            itemList.appendChild(el);
         }
     };
 
index 9a1842fa040bfdf67da07aabd1cffc89da78aa60..461b096acf9d49207337dae2cd10b754883b882d 100644 (file)
@@ -55,7 +55,7 @@ module ATV
     end
 
     def enqueue(path)
-      @queue << filedata[:map][path] if filedata[:map][path]
+      @queue << filedata[:items][path] if filedata[:items][path]
     end
 
     private