« 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/contribution.js
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-18 22:56:05 -0300
commitedf2f46d0778b9505258cde878742b816289d1f6 (patch)
treeb8e9f0134b99cffa11946f45540607411035589b /src/data/things/contribution.js
parentcf7e1def135f925fefcde55e130c76598ab69cd4 (diff)
data, content: various property & thing-type matches
Diffstat (limited to 'src/data/things/contribution.js')
-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) {