Commit Graph

158 Commits

Author SHA1 Message Date
kernelkind
2fb2940d56 accounts: make fallback pk non optional
Note: this commit alone is *incorrect* and will cause crashes.
It is part of a greater plan to upgrade accounts. It was done this
way to break commits to smaller, more digestable chunks

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:06 -04:00
kernelkind
4914c637ce move FALLBACK_PUBKEY
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:03 -04:00
kernelkind
320dedc8bd add RelayDefaults
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:00 -04:00
kernelkind
41e141d9a9 move aux code to bottom
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:40:56 -04:00
kernelkind
e8d833bf89 accounts: move mute stuff to own module
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:40:52 -04:00
kernelkind
10ed593b6d accounts: move relay stuff to own file
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:40:44 -04:00
kernelkind
e91684a7d5 accounts: move accounts to own module
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:40:39 -04:00
kernelkind
e29ea35ee5 remove duplicate UnknownIds initialization
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:40:33 -04:00
Fernando López Guevara
c6dbb0e856 fix(content): handle case where notes are not loaded 2025-06-24 09:15:52 -07:00
kernelkind
87b4b5fc70 add preview flag to NoteAction
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-06-22 16:03:09 -04:00
kernelkind
a77fe6ca00 unknowns: use unowned noteid instead of owned
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-06-18 14:39:05 -04:00
William Casarin
e87b6f1905 chrome: collapsible side panel
This implements the initial logic that makes the side panel collapsible.

Since we don't have a proper hamburger control, we do the same thing we
do on iOS for now.
2025-06-05 12:01:55 -07:00
William Casarin
163abe891a Merge remote-tracking branch 'pr/862' 2025-05-19 15:25:56 -07:00
kernelkind
5598cc8ba0 use CustomZapView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:41:48 -04:00
kernelkind
68b5c32e7f method to get current default zap amount
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:30:21 -04:00
kernelkind
54c0fdb563 don't show zap button if no wallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:29:43 -04:00
kernelkind
98cb082fb4 hotfix: can login again
adds fallback pubkey as account and selects it when there are
no accounts

closes: https://github.com/damus-io/notedeck/issues/855

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-16 15:50:31 -04:00
William Casarin
86d2a9e2e7 clippy: fix lint related to iterator
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will
needlessly iterate the entire iterator
   --> crates/notedeck/src/urls.rs:262:43
    |
262 |             if let Some(file_name) = path.last() {
    |                                           ^^^^^^ help: try: `next_back()`
    |

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-14 09:56:06 -07:00
kernelkind
b2abe495ca implement blurring
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:57:57 -04:00
kernelkind
640bf742c0 add one shot error message
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:57:51 -04:00
kernelkind
def9de0dc0 images: make promise payload optional to take easily
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:56:38 -04:00
kernelkind
d204db4b29 images: make MediaCache hold MediaCacheType
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:56:34 -04:00
kernelkind
7f01f3623d add TexturesCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:56:29 -04:00
kernelkind
a29277d263 propagate JobsCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:55:53 -04:00
kernelkind
e6212e5d17 note: remove unnecessary derive macros from NoteAction
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:54:38 -04:00
kernelkind
5cdf3698d2 introduce & use JobPool
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:54:23 -04:00
William Casarin
6bbc20471a dave: include anonymous user identifier in api call
- don't include users pubkey

This could be used to associate requests with real users,
rendering the anonymized user_id pointless

TODO: Implement a new tool call that lets dave ask for your pubkey

Fixes: #834
Fixes: #836
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 19:33:33 -07:00
William Casarin
5bae19fe00 mention: show username instead of display_name
Fixes: #833
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 17:23:08 -07:00
kernelkind
c456432015 ui: show default zap amount in wallet view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
fcec3b4c8e accounts: check if selected account has wallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
e6d9de2b99 wallet: helper method to get current wallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
9013a2e067 propagate DefaultZapState to wallet ui
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
f16e63cf3b use ZapWallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
61943aa6c7 introduce ZapWallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
4b608cef5f add default zap
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
015e7790d0 move WalletState to UI
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
9e21518e4b Wallet token parser shouldn't parse all
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
200ef58912 UserAccount use builder pattern
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04:00
kernelkind
5bddf83655 extend ZapAction
going to need amounts for configurable zaps

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:20 -04:00
kernelkind
0adaafd523 remove unnecessary #[allow(dead_code)]
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:50:57 -04:00
William Casarin
e8a1233174 dave: bubble note actions to chrome
This allows chrome to pass note actions to other apps
2025-04-22 18:42:12 -07:00
William Casarin
e4658df847 name: display_name before name in NostrName
This is technically more currect. name is more of a username for
tagging.
2025-04-22 10:47:14 -07:00
William Casarin
ba4198eeec enostr: rename to_bech to npub
a bit more clear as to what this is
2025-04-22 10:46:51 -07:00
William Casarin
5f6a69b4b3 docs: add notedeck docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:21:45 -07:00
William Casarin
8af80d7d10 ui: move note and profile rendering to notedeck_ui
We want to render notes in other apps like dave, so lets move
our note rendering to notedeck_ui. We rework NoteAction so it doesn't
have anything specific to notedeck_columns

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 12:34:43 -07:00
kernelkind
bd78be1659 move error out of AnyZapState
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-16 13:34:51 -04:00
kernelkind
2a2c177300 Fix flaky test_zap_event
Closes: #808
Co-authored-by: William Casarin <jb55@jb55.com>
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-15 08:42:05 -07:00
William Casarin
50dec5b5d5 context: implement note broadcasting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:43 -07:00
William Casarin
e6676a202a log: changed urlcache log to debug
its more of a debug log

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:24 -07:00
William Casarin
418e08541d notedeck: include frame history
for debugging.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:22 -07:00