« get me outta code hell

search, client: album results - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-13 09:43:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:52 -0300
commit3a1aa3d7232ba24725b1b9215c296747bb8b242c (patch)
treef67e10d5416f2a493f67d4d61f55394a15bb5d10 /src/static
parent8019e8957ebd94bd53bf35002c24aa2dcdbe65c5 (diff)
search, client: album results
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/client.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index ceaec460..dab1ea37 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -3590,6 +3590,7 @@ const sidebarSearchInfo = initInfo('sidebarSearchInfo', {
   currentResultString: null,
   endSearchString: null,
 
+  albumResultKindString: null,
   artistResultKindString: null,
   groupResultKindString: null,
 
@@ -3632,6 +3633,9 @@ function getSidebarSearchReferences() {
   info.endSearchString =
     findString('end-search');
 
+  info.albumResultKindString =
+    findString('album-result-kind');
+
   info.artistResultKindString =
     findString('artist-result-kind');
 
@@ -3844,6 +3848,16 @@ function generateSidebarSearchResult(result) {
   };
 
   switch (result.referenceType) {
+    case 'album': {
+      preparedSlots.href =
+        openAlbum(result.directory);
+
+      preparedSlots.kindString =
+        info.albumResultKindString;
+
+      break;
+    }
+
     case 'artist': {
       preparedSlots.href =
         openArtist(result.directory);