« get me outta code hell

content: linkFlashSide: link to first act instead - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-02-04 13:09:41 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-02-04 13:19:52 -0400
commit2a55763b91a33605238c25bec237788bd1c91b52 (patch)
treec95e04927dffa00caa860a3d9811bbb3891523a7 /src/content
parent98ce55f34340e7efe11ef2bbcdec41775ca21aef (diff)
content: linkFlashSide: link to first act instead
AKA the "jump act". This is analogous to what clicking on a
flash act (on the flash index page) used to do.
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/linkFlashSide.js29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/content/dependencies/linkFlashSide.js b/src/content/dependencies/linkFlashSide.js
index c5085e1a..b77ca65a 100644
--- a/src/content/dependencies/linkFlashSide.js
+++ b/src/content/dependencies/linkFlashSide.js
@@ -1,37 +1,22 @@
 export default {
-  contentDependencies: [
-    'generateColorStyleAttribute',
-    'linkStationaryIndex',
-  ],
+  contentDependencies: ['linkFlashAct'],
 
-  query: (flashSide) => ({
-    jumpAct:
-      flashSide.acts[0],
-  }),
-
-  relations: (relation, _query, flashSide) => ({
+  relations: (relation, flashSide) => ({
     link:
-      relation(
-        'linkStationaryIndex',
-        'localized.flashIndex',
-        'flashIndex.title'),
-
-    colorStyle:
-      relation('generateColorStyleAttribute', flashSide.color ?? null),
+      relation('linkFlashAct', flashSide.acts[0]),
   }),
 
-  data: (query, flashSide) => ({
+  data: (flashSide) => ({
     name:
       flashSide.name,
 
-    jumpActDirectory:
-      query.jumpAct.directory,
+    color:
+      flashSide.color,
   }),
 
   generate: (data, relations) =>
     relations.link.slots({
       content: data.name,
-      hash: data.jumpActDirectory,
-      attributes: [relations.colorStyle],
+      color: data.color,
     }),
 };