« get me outta code hell

data: art tags: short names - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-06 17:32:26 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-06 17:32:26 -0300
commitb1f116b28580e67a82c2d0eaea2b51fb0aee59b2 (patch)
tree7203cb0ada7f2a9543c7c33dcfccff09e0875fb3 /src/data/things
parentdc4d726d7a4e6a89d3f1e9e2af0d334472976ae3 (diff)
data: art tags: short names
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/art-tag.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/data/things/art-tag.js b/src/data/things/art-tag.js
index 9a8a75c5..75fb0f7b 100644
--- a/src/data/things/art-tag.js
+++ b/src/data/things/art-tag.js
@@ -18,6 +18,16 @@ export class ArtTag extends Thing {
     color: Thing.common.color(),
     isContentWarning: Thing.common.flag(false),
 
+    nameShort: {
+      flags: {update: true, expose: true},
+
+      expose: {
+        dependencies: ['name'],
+        transform: (value, {name}) =>
+          value ?? name.replace(/ \(.*?\)$/, ''),
+      },
+    },
+
     // Update only
 
     albumData: Thing.common.wikiData(Album),