Add contact-aware feed scope
- src/feed.rs: contact_feed + contact_pubkeys fetch the active profile's kind 3 contact list and aggregate notes only from those authors; aggregate_for + FeedBuilder accept an optional author whitelist - IPC: FeedGet accepts contacts_only, resolves the active profile npub - CLI: feed --contacts [limit] filters to the active profile's contacts - Frontend: Feed screen Everyone/My contacts toggle, scope-aware empty states, feedGet(limit, contactsOnly) threading - Tests for author filtering and the contacts scope in feed.rs and FeedScreen.test.tsx
This commit is contained in:
parent
1fd057d3e1
commit
a1445d17a8
10 changed files with 388 additions and 32 deletions
|
|
@ -202,6 +202,56 @@ a {
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
.feed-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.segmented {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 3px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.segmented-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 5px 10px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 0.12s ease,
|
||||
color 0.12s ease;
|
||||
}
|
||||
|
||||
.segmented-btn:hover:not(:disabled):not(.is-active) {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.segmented-btn.is-active {
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.segmented-btn:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
Sidebar
|
||||
------------------------------------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue