« get me outta code hell

data: CommentaryEntry.isWikiEditorCommentary, etc - 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>2025-05-01 14:59:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-05-06 12:29:05 -0300
commit9c49b349785eea14e29a489b3f78784c659316f8 (patch)
treead3432d5a661e0bd57712b538374508b6db461ed /src/data/things
parentac5e149c7220a473068536cd15e52fa0fbfaf2fe (diff)
data: CommentaryEntry.isWikiEditorCommentary, etc
Also: LyricsEntry.isWikiLyrics
Also: hasAnnotationPart
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/content.js30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/data/things/content.js b/src/data/things/content.js
index 660d7020..91da2248 100644
--- a/src/data/things/content.js
+++ b/src/data/things/content.js
@@ -15,8 +15,12 @@ import {
   withResultOfAvailabilityCheck,
 } from '#composite/control-flow';
 
-import {withAnnotationParts, withSourceText, withWebArchiveDate}
-  from '#composite/things/content';
+import {
+  hasAnnotationPart,
+  withAnnotationParts,
+  withSourceText,
+  withWebArchiveDate,
+} from '#composite/things/content';
 
 export class ContentEntry extends Thing {
   static [Thing.getPropertyDescriptors] = ({Artist}) => ({
@@ -134,6 +138,24 @@ export class ContentEntry extends Thing {
   };
 }
 
-export class CommentaryEntry extends ContentEntry {}
-export class LyricsEntry extends ContentEntry {}
+export class CommentaryEntry extends ContentEntry {
+  static [Thing.getPropertyDescriptors] = () => ({
+    // Expose only
+
+    isWikiEditorCommentary: hasAnnotationPart({
+      part: input.value('wiki editor'),
+    }),
+  });
+}
+
+export class LyricsEntry extends ContentEntry {
+  static [Thing.getPropertyDescriptors] = () => ({
+    // Expose only
+
+    isWikiLyrics: hasAnnotationPart({
+      part: input.value('wiki lyrics'),
+    }),
+  });
+}
+
 export class CreditingSourcesEntry extends ContentEntry {}