mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 12:53:18 +00:00
deploy: bfd9d79412
This commit is contained in:
1 parent
154d17f941
commit
8694270986
2 files changed
+5
-5
No files matched your search
@@ -891,7 +891,7 @@ window.addEventListener('scroll',changeHeaderBg);
|
||||
<p>SimpleX Directory is also available as a <a href="https://smp4.simplex.im/a#lXUjJW5vHYQzoLYgmi8GbxkGP41_kjefFvBrdwg-0Ok" target="_blank">SimpleX chat bot</a>.</p>
|
||||
<p>Read about <a href="/docs/directory.html">how to add</a> your community.</p>
|
||||
<div class="search-container">
|
||||
<input id="search">
|
||||
<input id="search" autocomplete="off">
|
||||
<div id="top-pagination" class="pagination">
|
||||
<button class="text-btn live">Active</button>
|
||||
<button class="text-btn new">New</button>
|
||||
|
||||
+4
-4
@@ -22,11 +22,11 @@ async function initDirectory() {
|
||||
allEntries = listing.entries
|
||||
renderEntries('top', bySortPriority, topBtn)
|
||||
searchInput.addEventListener('input', (e) => renderEntries('top', bySortPriority, topBtn, e.target.value.trim()));
|
||||
liveBtn.addEventListener('click', () => renderEntries('live', byActiveAtDesc, liveBtn, ''));
|
||||
newBtn.addEventListener('click', () => renderEntries('new', byCreatedAtDesc, newBtn, ''));
|
||||
topBtn.addEventListener('click', () => renderEntries('top', bySortPriority, topBtn, ''));
|
||||
liveBtn.addEventListener('click', () => renderEntries('live', byActiveAtDesc, liveBtn));
|
||||
newBtn.addEventListener('click', () => renderEntries('new', byCreatedAtDesc, newBtn));
|
||||
topBtn.addEventListener('click', () => renderEntries('top', bySortPriority, topBtn));
|
||||
|
||||
function renderEntries(mode, comparator, btn, search) {
|
||||
function renderEntries(mode, comparator, btn, search = '') {
|
||||
if (currentSortMode === mode && search == currentSearch) return;
|
||||
currentSortMode = mode;
|
||||
if (location.hash) location.hash = '';
|
||||
|
||||
Reference in new issue
Block a user