« get me outta code hell

search, client: art tag results - 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:
author(quasar) nebula <qznebula@protonmail.com>2024-06-01 20:08:16 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-01 20:08:16 -0300
commitf704e76e8632071154a955ae17a0f5dee78a6b12 (patch)
tree814d8b339caae5e371a04479d00a12c8b606de70 /src/static/js
parent2660bbcc3b5364cd8e495ce17754ca7edef7f5d1 (diff)
search, client: art tag results
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 b7b19d7f..733e4586 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -277,6 +277,7 @@ const getLinkHref = (type, directory) => rebase(`${type}/${directory}`);
 */
 
 const openAlbum = d => rebase(`album/${d}`);
+const openArtTag = d => rebase(`tag/${d}`);
 const openArtist = d => rebase(`artist/${d}`);
 const openFlash = d => rebase(`flash/${d}`);
 const openGroup = d => rebase(`group/${d}`);
@@ -3789,6 +3790,7 @@ const sidebarSearchInfo = initInfo('sidebarSearchInfo', {
   albumResultKindString: null,
   artistResultKindString: null,
   groupResultKindString: null,
+  tagResultKindString: null,
 
   state: {
     sidebarColumnShownForSearch: null,
@@ -3884,6 +3886,9 @@ function getSidebarSearchReferences() {
 
   info.groupResultKindString =
     findString('group-result-kind');
+
+  info.tagResultKindString =
+    findString('art-tag-result-kind');
 }
 
 function addSidebarSearchInternalListeners() {
@@ -4397,6 +4402,16 @@ function generateSidebarSearchResult(result) {
       break;
     }
 
+    case 'tag': {
+      preparedSlots.href =
+        openArtTag(result.directory);
+
+      preparedSlots.kindString =
+        info.tagResultKindString;
+
+      break;
+    }
+
     case 'track': {
       preparedSlots.href =
         openTrack(result.directory);