« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/homepage-layout.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/homepage-layout.js')
-rw-r--r--src/data/things/homepage-layout.js45
1 files changed, 42 insertions, 3 deletions
diff --git a/src/data/things/homepage-layout.js b/src/data/things/homepage-layout.js
index 82bad2d3..2456ca95 100644
--- a/src/data/things/homepage-layout.js
+++ b/src/data/things/homepage-layout.js
@@ -17,7 +17,7 @@ import {
   validateReference,
 } from '#validators';
 
-import {exposeDependency} from '#composite/control-flow';
+import {exposeConstant, exposeDependency} from '#composite/control-flow';
 import {withResolvedReference} from '#composite/wiki-data';
 
 import {
@@ -47,6 +47,14 @@ export class HomepageLayout extends Thing {
     sections: thingList({
       class: input.value(HomepageLayoutSection),
     }),
+
+    // Expose only
+
+    isHomepageLayout: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
   });
 
   static [Thing.yamlDocumentSpec] = {
@@ -63,7 +71,6 @@ export class HomepageLayout extends Thing {
     thingConstructors: {
       HomepageLayout,
       HomepageLayoutSection,
-      HomepageLayoutAlbumsRow,
     },
   }) => ({
     title: `Process homepage layout file`,
@@ -157,6 +164,14 @@ export class HomepageLayoutSection extends Thing {
     rows: thingList({
       class: input.value(HomepageLayoutRow),
     }),
+
+    // Expose only
+
+    isHomepageLayoutSection: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
   });
 
   static [Thing.yamlDocumentSpec] = {
@@ -183,6 +198,12 @@ export class HomepageLayoutRow extends Thing {
 
     // Expose only
 
+    isHomepageLayoutRow: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
+
     type: {
       flags: {expose: true},
 
@@ -234,6 +255,12 @@ export class HomepageLayoutActionsRow extends HomepageLayoutRow {
 
     // Expose only
 
+    isHomepageLayoutActionsRow: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
+
     type: {
       flags: {expose: true},
       expose: {compute: () => 'actions'},
@@ -250,7 +277,7 @@ export class HomepageLayoutActionsRow extends HomepageLayoutRow {
 export class HomepageLayoutAlbumCarouselRow extends HomepageLayoutRow {
   static [Thing.friendlyName] = `Homepage Album Carousel Row`;
 
-  static [Thing.getPropertyDescriptors] = (opts, {Album, Group} = opts) => ({
+  static [Thing.getPropertyDescriptors] = (opts, {Album} = opts) => ({
     ...HomepageLayoutRow[Thing.getPropertyDescriptors](opts),
 
     // Update & expose
@@ -262,6 +289,12 @@ export class HomepageLayoutAlbumCarouselRow extends HomepageLayoutRow {
 
     // Expose only
 
+    isHomepageLayoutAlbumCarouselRow: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
+
     type: {
       flags: {expose: true},
       expose: {compute: () => 'album carousel'},
@@ -322,6 +355,12 @@ export class HomepageLayoutAlbumGridRow extends HomepageLayoutRow {
 
     // Expose only
 
+    isHomepageLayoutAlbumGridRow: [
+      exposeConstant({
+        value: input.value(true),
+      }),
+    ],
+
     type: {
       flags: {expose: true},
       expose: {compute: () => 'album grid'},