Skip to content

Commit

Permalink
Feat: Add stickerts for tag types #1091
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 8, 2024
1 parent f2a996d commit 92f3621
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions htdocs/js/customElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function createPreGeneratedElements() {
pEl.playBtn = elCreateText('a', {"data-action": "quickPlay", "href": "#", "class": ["mi", "color-darkgrey", "me-1"], "data-title-phrase": "Quick play"}, 'play_arrow');
pEl.showSongsBtn = elCreateText('a', {"data-action": "showSongsByTag", "class": ["mi", "color-darkgrey", "me-1"], "href": "#", "data-title-phrase": "Show songs"}, 'music_note');
pEl.showAlbumsBtn = elCreateText('a', {"data-action": "showAlbumsByTag", "class": ["mi", "color-darkgrey", "me-1"], "href": "#", "data-title-phrase": "Show albums"}, 'album');
pEl.showStickersBtn = elCreateText('a', {"data-action": "showStickersByTag", "class": ["mi", "color-darkgrey", "me-1", "featStickerAdv"], "href": "#", "data-title-phrase": "Sticker"}, 'discount');

pEl.actionMenu = [
pEl.actionsBtn,
Expand All @@ -40,11 +41,13 @@ function createPreGeneratedElements() {
pEl.selectBtn
];
pEl.actionMenuBrowseDatabaseTagSongs = [
pEl.showSongsBtn
pEl.showSongsBtn,
pEl.showStickersBtn
];
pEl.actionMenuBrowseDatabaseTagSongAlbums = [
pEl.showSongsBtn,
pEl.showAlbumsBtn
pEl.showAlbumsBtn,
pEl.showStickersBtn
];
pEl.actionMenuDisc = [
pEl.actionsDiscBtn
Expand Down
6 changes: 6 additions & 0 deletions htdocs/js/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ function handleViewActionClick(event) {
elGetById('BrowseDatabaseAlbumListSearchStr').value = '';
gotoBrowse(event);
break;
case 'showStickersByTag': {
const tag = getData(event.target.parentNode.parentNode, 'tag');
const value = getData(event.target.parentNode.parentNode, 'name');
showStickerModal(value, tag);
break;
}
case 'refreshWidget':
updateHomeWidget(event.target.closest('.card'));
break;
Expand Down

0 comments on commit 92f3621

Please sign in to comment.