Browse Source

Invert person and hashtag selections

master
limina1 9 months ago
parent
commit
c3edd41420
  1. 34
      src/lib/navigator/EventNetwork/Legend.svelte

34
src/lib/navigator/EventNetwork/Legend.svelte

@ -393,13 +393,33 @@
</div> </div>
{#if showPersonNodes && personAnchors.length > 0} {#if showPersonNodes && personAnchors.length > 0}
<p class="text-xs text-gray-600 dark:text-gray-400"> <div class="flex items-center justify-between mb-2">
{#if totalPersonCount > displayedPersonCount} <p class="text-xs text-gray-600 dark:text-gray-400">
Displaying {displayedPersonCount} of {totalPersonCount} people found. Click to toggle visibility: {#if totalPersonCount > displayedPersonCount}
{:else} Displaying {displayedPersonCount} of {totalPersonCount} people found:
{personAnchors.length} people found. Click to toggle visibility: {:else}
{/if} {personAnchors.length} people found:
</p> {/if}
</p>
<label class="flex items-center gap-1 cursor-pointer">
<input
type="checkbox"
onclick={() => {
// Invert selection - toggle all person nodes
const allPubkeys = personAnchors.map(person => person.pubkey);
// Process all persons
allPubkeys.forEach(pubkey => {
onPersonToggle(pubkey);
});
}}
class="w-3 h-3"
/>
<span class="text-xs">Invert Selection</span>
</label>
</div>
<div <div
class="tag-grid {personAnchors.length > 20 ? 'scrollable' : ''}" class="tag-grid {personAnchors.length > 20 ? 'scrollable' : ''}"
style="grid-template-columns: repeat(2, 1fr);" style="grid-template-columns: repeat(2, 1fr);"

Loading…
Cancel
Save