« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/things/contribution.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/data/things/contribution.js b/src/data/things/contribution.js
index 5594055c..cfece5dc 100644
--- a/src/data/things/contribution.js
+++ b/src/data/things/contribution.js
@@ -9,7 +9,7 @@ import {isStringNonEmpty, isThing, validateReference} from '#validators';
 
 import {exposeDependency} from '#composite/control-flow';
 import {withResolvedReference} from '#composite/wiki-data';
-import {flag} from '#composite/wiki-properties';
+import {flag, simpleDate} from '#composite/wiki-properties';
 
 import {
   inheritFromContributionPresets,
@@ -32,6 +32,8 @@ export class Contribution extends Thing {
       update: {validate: isStringNonEmpty},
     },
 
+    date: simpleDate(),
+
     artist: [
       withContributionArtist({
         ref: input.updateValue({
@@ -105,6 +107,10 @@ export class Contribution extends Thing {
       accentParts.push(colors.green(`"${this.annotation}"`));
     }
 
+    if (this.date) {
+      accentParts.push(colors.yellow(this.date.toLocaleDateString()));
+    }
+
     let artistRef;
     if (depth >= 0) {
       let artist;