« get me outta code hell

client, search: name detail - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-06-05 17:50:03 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-06-05 17:50:03 -0300
commit352e6a46756a53793ee24350e50b4d5b429a206d (patch)
treed4e06977bb28be3e3af7c98cbad55bb5d6f948bd /src/static/js/client
parent0b39ab1a265070e6498939d0a08191946af6af81 (diff)
client, search: name detail
Diffstat (limited to 'src/static/js/client')
-rw-r--r--src/static/js/client/sidebar-search.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js
index 1102624b..61a33c0d 100644
--- a/src/static/js/client/sidebar-search.js
+++ b/src/static/js/client/sidebar-search.js
@@ -1261,11 +1261,19 @@ function generateSidebarSearchResult(result, results) {
 }
 
 function getSearchResultName(result) {
-  return (
+  const name =
     result.data.name ??
-    result.data.primaryName ??
-    null
-  );
+    result.data.primaryName;
+
+  if (!name) {
+    return null;
+  }
+
+  if (result.data.nameDetail) {
+    return `${name} (${result.data.nameDetail})`;
+  }
+
+  return name;
 }
 
 function getSearchResultImageSource(result) {