« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index c734a74..5a8e0ad 100644
--- a/ui.js
+++ b/ui.js
@@ -343,6 +343,7 @@ class AppElement extends FocusElement {
           {divider: true},
           playingTrack && {element: this.playingControl},
           {element: this.loopingControl},
+          {element: this.loopQueueControl},
           {element: this.pauseNextControl},
           {element: this.autoDJControl},
           {element: this.volumeSlider},
@@ -398,6 +399,12 @@ class AppElement extends FocusElement {
       getEnabled: () => this.config.canControlPlayback
     })
 
+    this.loopQueueControl = new ToggleControl('Loop queue when it ends?', {
+      setValue: val => this.SQP.setLoopQueueAtEnd(val),
+      getValue: () => this.SQP.loopQueueAtEnd,
+      getEnabled: () => this.config.canControlPlayback
+    })
+
     this.volumeSlider = new SliderElement('Volume', {
       setValue: val => this.SQP.setVolume(val),
       getValue: () => this.SQP.player.volume,