« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/contribution.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/data/things/contribution.js b/src/data/things/contribution.js
index 7b1518ab..9d6a9711 100644
--- a/src/data/things/contribution.js
+++ b/src/data/things/contribution.js
@@ -14,6 +14,8 @@ import {flag, simpleDate} from '#composite/wiki-properties';
 
 import {
   inheritFromContributionPresets,
+  thingPropertyMatches,
+  thingReferenceTypeMatches,
   withContributionArtist,
   withContributionContext,
   withMatchingContributionPresets,
@@ -121,6 +123,38 @@ export class Contribution extends Thing {
         dependency: '#value',
       }),
     ],
+
+    isArtistContribution: thingPropertyMatches({
+      value: input.value('artistContribs'),
+    }),
+
+    isContributorContribution: thingPropertyMatches({
+      value: input.value('contributorContribs'),
+    }),
+
+    isCoverArtistContribution: thingPropertyMatches({
+      value: input.value('coverArtistContribs'),
+    }),
+
+    isBannerArtistContribution: thingPropertyMatches({
+      value: input.value('bannerArtistContribs'),
+    }),
+
+    isWallpaperArtistContribution: thingPropertyMatches({
+      value: input.value('wallpaperArtistContribs'),
+    }),
+
+    isForTrack: thingReferenceTypeMatches({
+      value: input.value('track'),
+    }),
+
+    isForAlbum: thingReferenceTypeMatches({
+      value: input.value('album'),
+    }),
+
+    isForFlash: thingReferenceTypeMatches({
+      value: input.value('flash'),
+    }),
   });
 
   [inspect.custom](depth, options, inspect) {