diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-07 12:13:13 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 17:26:40 -0300 |
commit | 72f5aafcbb4de53eadef3cd7603856b37ac9cc49 (patch) | |
tree | 04352f336ad511cc3c00f6b8f2d1ce13038bdaf7 /src | |
parent | cd2767972a0f10504b3a731d736a13f6e53139c0 (diff) |
data: Contribution.date (stub)
Diffstat (limited to 'src')
-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; |