diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-05-13 09:30:28 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-05-31 12:11:52 -0300 |
commit | 8019e8957ebd94bd53bf35002c24aa2dcdbe65c5 (patch) | |
tree | 4e1a665037f4ad62dbd5f753a86140f590ea9fdf /src/static | |
parent | 05f4385dc72df17eea850fd27b4b77d7b4f6f840 (diff) |
search, client: group results
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/js/client.js | 15 |
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); |