« get me outta code hell

data: WikiInfo: contributionPresets - 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>2024-03-04 20:27:24 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:00 -0300
commit75505899c70594e250bdcb582fd2f5c40a971639 (patch)
tree98556b485e13d6090875d6e1cf1fcdc20ecbf571 /src/data/things
parent7f3bd77e36839b8601b498b6d13c0a60406d9899 (diff)
data: WikiInfo: contributionPresets
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/wiki-info.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/data/things/wiki-info.js b/src/data/things/wiki-info.js
index 2a2c9986..b7b7b01c 100644
--- a/src/data/things/wiki-info.js
+++ b/src/data/things/wiki-info.js
@@ -3,7 +3,16 @@ export const WIKI_INFO_FILE = 'wiki-info.yaml';
 import {input} from '#composite';
 import find from '#find';
 import Thing from '#thing';
-import {isBoolean, isColor, isLanguageCode, isName, isURL} from '#validators';
+import {parseContributionPresets} from '#yaml';
+
+import {
+  isBoolean,
+  isColor,
+  isContributionPresetList,
+  isLanguageCode,
+  isName,
+  isURL,
+} from '#validators';
 
 import {exitWithoutDependency} from '#composite/control-flow';
 import {contentString, flag, name, referenceList, wikiData}
@@ -58,6 +67,11 @@ export class WikiInfo extends Thing {
       data: 'groupData',
     }),
 
+    contributionPresets: {
+      flags: {update: true, expose: true},
+      update: {validate: isContributionPresetList},
+    },
+
     // Feature toggles
     enableFlashesAndGames: flag(false),
     enableListings: flag(false),
@@ -105,6 +119,11 @@ export class WikiInfo extends Thing {
       'Enable News': {property: 'enableNews'},
       'Enable Art Tag UI': {property: 'enableArtTagUI'},
       'Enable Group UI': {property: 'enableGroupUI'},
+
+      'Contribution Presets': {
+        property: 'contributionPresets',
+        transform: parseContributionPresets,
+      },
     },
   };