« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/artwork.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/artwork.js')
-rw-r--r--src/data/things/artwork.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/data/things/artwork.js b/src/data/things/artwork.js
index b5d9cc66..c54bcced 100644
--- a/src/data/things/artwork.js
+++ b/src/data/things/artwork.js
@@ -25,7 +25,7 @@ import {
   parseDimensions,
 } from '#yaml';
 
-import {withPropertyFromObject} from '#composite/data';
+import {withPropertyFromList, withPropertyFromObject} from '#composite/data';
 
 import {
   exitWithoutDependency,
@@ -58,6 +58,7 @@ import {
   withArtTags,
   withAttachedArtwork,
   withContainingArtworkList,
+  withContentWarningArtTags,
   withContribsFromAttachedArtwork,
   withPropertyFromAttachedArtwork,
   withDate,
@@ -362,6 +363,27 @@ export class Artwork extends Thing {
         value: input.value([]),
       }),
     ],
+
+    contentWarningArtTags: [
+      withContentWarningArtTags(),
+
+      exposeDependency({
+        dependency: '#contentWarningArtTags',
+      }),
+    ],
+
+    contentWarnings: [
+      withContentWarningArtTags(),
+
+      withPropertyFromList({
+        list: '#contentWarningArtTags',
+        property: input.value('name'),
+      }),
+
+      exposeDependency({
+        dependency: '#contentWarningArtTags.name',
+      }),
+    ],
   });
 
   static [Thing.yamlDocumentSpec] = {