diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-07 12:13:13 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:03 -0300 |
commit | e0d3028aecb85f64f1e9de713d4e66caee0a0515 (patch) | |
tree | b6170697b90b659a897ce7535d27ea748ef7dfb9 | |
parent | 588868e9b0f459a25aa0ade2c4a1a9e2701f729b (diff) |
data: Contribution.date (stub)
-rw-r--r-- | src/data/things/contribution.js | 8 |
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; |