« get me outta code hell

data, content: various property & thing-type matches - 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>2024-04-10 20:24:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:26:48 -0300
commit36d72d8f910dc0b9200224236d67eec605290b56 (patch)
tree50141eca54f51fea7a733d60a0fb3c6bd409de44 /src/data/things
parent0eeb86eb198a052fbf200e07ab3aba0f75653636 (diff)
data, content: various property & thing-type matches
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) {