« get me outta code hell

Merge branch 'preview' of github.com:hsmusic/hsmusic-wiki into preview - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-01-15 22:06:41 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-01-15 22:06:41 -0400
commitf8a38da3d747a15bd25e2759b819c1b83aaf0ba1 (patch)
treefc1b24bb02a6eabd610a022ae7cd6b72f5d1ad84 /src/page
parent8494805e994dd165cc8426723e799f06c8cbefcf (diff)
parent62dbb79342927cb1fe19651e33fcc27bc2804f6e (diff)
Merge branch 'preview' of github.com:hsmusic/hsmusic-wiki into preview
Diffstat (limited to 'src/page')
-rw-r--r--src/page/album.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/page/album.js b/src/page/album.js
index 1fc74520..906c02ea 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -50,10 +50,10 @@ export function write(album, {wikiData}) {
   const hasAdditionalFiles = !empty(album.additionalFiles);
   const albumDuration = getTotalDuration(album.tracks);
 
-  const displayTrackGroups =
-    album.trackGroups &&
-      (album.trackGroups.length > 1 ||
-        !album.trackGroups[0].isDefaultTrackGroup);
+  const displayTrackSections =
+    album.trackSections &&
+      (album.trackSections.length > 1 ||
+        !album.trackSections[0].isDefaultTrackSection);
 
   const listTag = getAlbumListTag(album);
 
@@ -107,10 +107,10 @@ export function write(album, {wikiData}) {
       wallpaperArtistContribs: serializeContribs(album.wallpaperArtistContribs),
       bannerArtistContribs: serializeContribs(album.bannerArtistContribs),
       groups: serializeGroupsForAlbum(album),
-      trackGroups: album.trackGroups?.map((trackGroup) => ({
-        name: trackGroup.name,
-        color: trackGroup.color,
-        tracks: trackGroup.tracks.map((track) => track.directory),
+      trackSections: album.trackSections?.map((section) => ({
+        name: section.name,
+        color: section.color,
+        tracks: section.tracks.map((track) => track.directory),
       })),
       tracks: album.tracks.map((track) => ({
         link: serializeLink(track),
@@ -300,10 +300,10 @@ export function write(album, {wikiData}) {
                   ),
                 })),
 
-            displayTrackGroups &&
+            displayTrackSections &&
               html.tag('dl',
                 {class: 'album-group-list'},
-                album.trackGroups.flatMap(({
+                album.trackSections.flatMap(({
                   name,
                   startIndex,
                   tracks,
@@ -322,7 +322,7 @@ export function write(album, {wikiData}) {
                       tracks.map(trackToListItem))),
                 ])),
 
-            !displayTrackGroups &&
+            !displayTrackSections &&
               html.tag(listTag,
                 album.tracks.map(trackToListItem)),
 
@@ -515,7 +515,7 @@ export function generateAlbumSidebar(album, currentTrack, {
 
   const listTag = getAlbumListTag(album);
 
-  const {trackGroups} = album;
+  const {trackSections} = album;
 
   const trackToListItem = (track) =>
     html.tag('li',
@@ -524,19 +524,19 @@ export function generateAlbumSidebar(album, currentTrack, {
         track: link.track(track),
       }));
 
-  const nameOrDefault = (isDefaultTrackGroup, name) =>
-    isDefaultTrackGroup
-      ? language.$('albumSidebar.trackList.fallbackGroupName')
+  const nameOrDefault = (isDefaultTrackSection, name) =>
+    isDefaultTrackSection
+      ? language.$('albumSidebar.trackList.fallbackSectionName')
       : name;
 
   const trackListPart = [
     html.tag('h1', link.album(album)),
-    ...trackGroups.map(({name, color, startIndex, tracks, isDefaultTrackGroup}) => {
+    ...trackSections.map(({name, color, startIndex, tracks, isDefaultTrackSection}) => {
       const groupName =
         html.tag('span',
           {class: 'group-name'},
           nameOrDefault(
-            isDefaultTrackGroup,
+            isDefaultTrackSection,
             name
           ));
       return html.tag('details',