Auto-set modal filter to 'All' when Browse Templates opened from Templates tab

This commit is contained in:
thePR0M3TH3AN committed 2026-05-15 11:19:10 -04:00
1 parent 6f3c18a344
commit 937ac826f8
1 file changed
+10 -1
+10 -1
View File
@@ -5094,7 +5094,16 @@
$('designerNostrLoadBtn').addEventListener('click', openDiscDesignNostrSearch);
$('browseCommunityBtn').addEventListener('click', () => { $('nostrModal').classList.add('open'); switchModalTab('New'); });
$('browseCommunityBtn').addEventListener('click', () => {
for (const t of ['New', 'Popular', 'Mine']) {
_feedState[`filter${t}`] = 'any';
document.querySelectorAll(`.feedTypeBtn[data-tab="${t}"]`).forEach(btn => {
btn.classList.toggle('active', btn.dataset.type === 'any');
});
}
$('nostrModal').classList.add('open');
switchModalTab('New');
});
$('designerBrowseCommunityBtn').addEventListener('click', () => {
for (const t of ['New', 'Popular', 'Mine']) {
_feedState[`filter${t}`] = 'disc-design';