From 72f5aafcbb4de53eadef3cd7603856b37ac9cc49 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 7 Mar 2024 12:13:13 -0400 Subject: data: Contribution.date (stub) --- src/data/things/contribution.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit 1.3.0-6-gf8a5