« get me outta code hell

Format groups differently - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-06-01 08:52:39 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-01 08:52:39 -0300
commitf5ed889304279111a2a90552f24ea5740b425954 (patch)
tree4f3a696647574419571edd04408490fb19b8155b
parent7ca9a6a4002990e8c8e38d039a0bed9bf5b3a488 (diff)
Format groups differently
-rw-r--r--ui.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 5541d81..cbffb99 100644
--- a/ui.js
+++ b/ui.js
@@ -323,6 +323,11 @@ class GrouplikeItemElement extends Button {
     }
 
     writable.write(ansi.moveCursor(this.absTop, this.absLeft))
+
+    if (isGroup(this.item)) {
+      writable.write(ansi.setAttributes([ansi.C_BLUE, ansi.A_BRIGHT]))
+    }
+
     this.drawX = this.x
     this.writeStatus(writable)
     writable.write(this.item.name.slice(0, this.w - this.drawX))
@@ -341,7 +346,9 @@ class GrouplikeItemElement extends Button {
     const record = this.recordStore.getRecord(this.item)
 
     writable.write(' ')
-    if (record.downloading) {
+    if (isGroup(this.item)) {
+      writable.write('G')
+    } else if (record.downloading) {
       writable.write(braille[Math.floor(Date.now() / 250) % 6])
     } else if (record.playing) {
       writable.write('\u25B6')