« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/things/album/Album.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/data/things/album/Album.js b/src/data/things/album/Album.js
index b89770aa..4f3dd770 100644
--- a/src/data/things/album/Album.js
+++ b/src/data/things/album/Album.js
@@ -285,7 +285,20 @@ export class Album extends Thing {
     showAlbumInTracksWithoutArtists: flag(V(false)),
     showTrackSectionInNavBar: flag(V(false)),
     showArtistsInTrackList: flag(V(true)),
-    hideDuration: flag(V(false)),
+
+    hideDuration: [
+      exposeUpdateValueOrContinue({
+        validate: input.value(isBoolean),
+      }),
+
+      {
+        dependencies: ['style'],
+        compute: ({style}) =>
+          (style === 'in-game vgm'
+            ? true
+            : false),
+      },
+    ],
 
     // > Update & expose - General metadata