« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js')
-rw-r--r--src/static/js/client.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index 5b762c49..ceaec460 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -197,6 +197,7 @@ const getLinkHref = (type, directory) => rebase(`${type}/${directory}`);
 const openAlbum = d => rebase(`album/${d}`);
 const openArtist = d => rebase(`artist/${d}`);
 const openFlash = d => rebase(`flash/${d}`);
+const openGroup = d => rebase(`group/${d}`);
 const openTrack = d => rebase(`track/${d}`);
 
 // TODO: This should also use urlSpec.
@@ -3590,6 +3591,7 @@ const sidebarSearchInfo = initInfo('sidebarSearchInfo', {
   endSearchString: null,
 
   artistResultKindString: null,
+  groupResultKindString: null,
 
   state: {
     stoppedTypingTimeout: null,
@@ -3632,6 +3634,9 @@ function getSidebarSearchReferences() {
 
   info.artistResultKindString =
     findString('artist-result-kind');
+
+  info.groupResultKindString =
+    findString('group-result-kind');
 }
 
 function mutateSidebarSearchContent() {
@@ -3849,6 +3854,16 @@ function generateSidebarSearchResult(result) {
       break;
     }
 
+    case 'group': {
+      preparedSlots.href =
+        openGroup(result.directory);
+
+      preparedSlots.kindString =
+        info.groupResultKindString;
+
+      break;
+    }
+
     case 'flash': {
       preparedSlots.href =
         openFlash(result.directory);