From 4488ae98f7644c84cfcb357d066d1075fdb76d3e Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Thu, 2 Dec 2021 14:46:34 -0500
Subject: currently playing indicator complete

---
 .../collectionLinear/CollectionLinearView.tsx      | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

(limited to 'src/client/views/collections/collectionLinear/CollectionLinearView.tsx')

diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
index 3a06df746..a0f7ceb64 100644
--- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
+++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
@@ -117,15 +117,14 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
     }
 
 
-    getDisplayDoc = (doc: Doc) => {
+    getDisplayDoc = (doc: Doc, preview: boolean = false) => {
         const nested = doc._viewType === CollectionViewType.Linear;
         const hidden = doc.hidden === true;
 
         let dref: Opt<HTMLDivElement>;
         const docXf = () => this.getTransform(dref);
         // const scalable = pair.layout.onClick || pair.layout.onDragStart;
-        doc.title == "audio recording 1" && console.log(doc);
-        return hidden ? (null) : <div className={`collectionLinearView-docBtn`} key={doc[Id]} ref={r => dref = r || undefined}
+        return hidden ? (null) : <div className={preview ? "preview" : `collectionLinearView-docBtn`} key={doc[Id]} ref={r => dref = r || undefined}
             style={{
                 pointerEvents: "all",
                 width: nested ? undefined : NumCast(doc._width),
@@ -159,7 +158,8 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
                 docRangeFilters={this.props.docRangeFilters}
                 searchFilterDocs={this.props.searchFilterDocs}
                 ContainingCollectionView={undefined}
-                ContainingCollectionDoc={undefined} />
+                ContainingCollectionDoc={undefined}
+                hideResizeHandles={true} />
         </div>;
     }
 
@@ -223,21 +223,22 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
                     </Tooltip>
 
                 </span> : null}
-                {/* TODO: add small player for single clip, dropdown sort of expandable menu for multiple clips
-                            add onclick show audio similar to follow link behavior
-                            add button to close out audio from currently playing */}
                 {AudioBox.CurrentlyPlaying && AudioBox.CurrentlyPlaying.length != 0 && StrCast(this.layoutDoc.title) === "docked buttons" ? <span className="bottomPopup-background">
                     <span className="bottomPopup-text">
-                        Currently listening to: {AudioBox.CurrentlyPlaying.map((clip) =>
-                            <span onPointerDown={() => {
+                        Currently listening to: {AudioBox.CurrentlyPlaying.map((clip, i) =>
+                            <span className="audio-title" onPointerDown={() => {
                                 DocumentManager.Instance.jumpToDocument(clip, true);
-                            }}>{clip.title}, </span>
+                            }}>{clip.title + (i == AudioBox.CurrentlyPlaying.length - 1 ? "" : ",")} </span>
                         )}
                     </span>
                 </span> : null}
 
-                {/* {AudioBox.CurrentlyPlaying && AudioBox.CurrentlyPlaying.length != 0 && StrCast(this.layoutDoc.title) === "docked buttons" ?
-                    this.getDisplayDoc(AudioBox.CurrentlyPlaying[0]) : null} */}
+                {/* THIS RENDERS AUDIOBOX FOR EACH CLIP */}
+                {/* {AudioBox.CurrentlyPlaying && AudioBox.CurrentlyPlaying.length != 0 && StrCast(this.layoutDoc.title) === "docked buttons" ? <div>
+                    <div className="currently-playing">
+                        {AudioBox.CurrentlyPlaying.map((clip) => this.getDisplayDoc(clip, true))}
+                    </div>
+                </div> : null} */}
 
             </div>
         </div>;
-- 
cgit v1.2.3-70-g09d2

