Commit Graph

44 Commits

Author SHA1 Message Date
kernelkind
f452a9010b nav: move action processing to own method
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-22 20:33:10 -04:00
kernelkind
5598cc8ba0 use CustomZapView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:41:48 -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
929099c15f propagate Images to actionbar
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:57:48 -04:00
kernelkind
e7c3755a08 pass NoteAction by value instead of reference
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:57:45 -04:00
kernelkind
a29277d263 propagate JobsCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:55:53 -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
015e7790d0 move WalletState to UI
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-23 13:53:32 -04: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
William Casarin
50dec5b5d5 context: implement note broadcasting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:43 -07:00
kernelkind
cfbd601196 note zap button
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
kernelkind
5917bc16fd propagate current account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
kernelkind
18ea05db0a use Zaps
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
kernelkind
ebec367809 wallet route
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
kernelkind
ad90a9565a canonize UserAccount
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-22 00:06:49 -04:00
jglad
318f96e37e #507 add right click paste in search
Signed-off-by: Jakub Gladysz <jakub.gladysz@protonmail.com>
2025-03-21 21:49:45 +01:00
kernelkind
a9f473e3c9 introduce NoteContext
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-08 14:57:32 -05:00
William Casarin
d85c6043b7 search: auto-focus search field on navigate
I'm going to add a search changelog on this commit since I forgot
to do so previously.

Fixes: https://linear.app/damus/issue/DECK-538/auto-focus-search-field-on-search-view
Changelog-Added: Added fulltext search ui
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 16:02:35 -08:00
kernelkind
e2be2ddd58 fix context selection responses
closes: https://github.com/damus-io/notedeck/issues/574

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-07 18:04:12 -05:00
William Casarin
1953496019 search: hook up nav actions
Fixes: https://linear.app/damus/issue/DECK-537/hook-up-search-query-view-responses
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 13:24:52 -08:00
William Casarin
c2545d17e7 route: add Search route and hook up SearchView
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 13:24:52 -08:00
William Casarin
873b0e0dcc nav: ocd updates
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 12:58:42 -08:00
William Casarin
4365839242 Revert driller
This reverts commit cec49c83bd.

Revert "update NoteContentsDriller to NoteContext"

This reverts commit 65bd6a65f9.

Revert "introduce the driller"

This reverts commit 95d618e7fe.
2025-03-07 12:53:34 -08:00
William Casarin
cec49c83bd fix formatting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 12:36:26 -08:00
William Casarin
65bd6a65f9 update NoteContentsDriller to NoteContext
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 12:30:53 -08:00
kernelkind
95d618e7fe introduce the driller
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-07 12:07:24 -05:00
William Casarin
660b7cc8b7 feat: add --no-media flag to disable media display
- Introduced a new "no_media" boolean in ColumnsArgs to capture the
  --no-media flag.

- Updated NoteOptions to include a setting for hiding media, configured
  from parsed arguments.

- Refactored Damus to consolidate note options (textmode, scramble, and
  no-media) into a single NoteOptions field.

- Modified navigation UI rendering to pass the unified note_options.

This change allows users to disable media display via the --no-media flag.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-22 14:39:33 -08:00
William Casarin
bd352f76d4 feat: add scramble flag for development text scrambling
This commit introduces a new scramble option to help reduce distractions
during development by scrambling text using rot13. When enabled via the
new `--scramble` flag, text displayed in various views is transformed,
making it easier to focus on layout and behavior without reading the
actual content.

App & Args Updates

  - Added a `scramble: bool` field to the main application state (in `app.rs`).

  - Extended argument parsing (in `args.rs`) to recognize the `--scramble` flag.

NoteOptions Enhancement

  - Introduced a new bit flag `scramble_text` in `NoteOptions` with
    corresponding setter/getter methods.

UI Adjustments

  - Propagated the scramble flag through note rendering functions across
    navigation, timeline, and note view modules.

  - Updated several UI components (e.g., in `nav.rs`, `route.rs`, and
    `contents.rs`) to accept and apply the new note options.

Rot13 Implementation

  - Implemented a helper function (`rot13`) to scramble text
    conditionally when the scramble option is enabled.

This feature is intended for development builds only, offering a way to
obscure text content during UI tweaks and testing.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-22 14:30:38 -08:00
kernelkind
c1c4c1cc7a supply inner_rect for PostView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
William Casarin
0cc1d8a600 Switch to unified timeline cache via TimelineKinds
This is a fairly large rewrite which unifies our threads, timelines and
profiles. Now all timelines have a MultiSubscriber, and can be added
and removed to columns just like Threads and Profiles.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-05 18:30:45 -08:00
Ken Sedgwick
fe3e2dad14 add Accounts::add_advertised_relay 2025-01-21 16:03:44 -08:00
Ken Sedgwick
e436be400e add add relay GUI 2025-01-21 12:21:13 -08:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00
kernelkind
1914fafc68 integrate column moving
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-15 16:09:29 -05:00
kernelkind
1d6da3ba0d move columns ui
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-15 16:09:29 -05:00
William Casarin
212c296da5 Merge tombstone muted notes #606
Changelog-Changed: Tombstone muted notes
2025-01-04 14:16:16 -08:00
kernelkind
05ab1179e6 remove ProfileState from cache once sent
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-04 14:05:42 -05:00
kernelkind
6645d4880f integrate EditProfileView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-04 13:42:52 -05:00
Ken Sedgwick
e193e00539 Mute rendering instead of ingress
Previous approach was to keep muted content from getting inserted.

Instead, this version alters it's display.  This makes toggling mutes
on and off externally much more stable (the display changes but we
don't have to rebuild content trees)

For now muted content is collapsed to a red "Muted" tombstone w/ a reason.
2025-01-02 15:21:14 -08:00
William Casarin
475314da75 columns: navigate back when switching account
Fixes: https://github.com/damus-io/notedeck/issues/600
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-20 13:54:20 -08:00
Ken Sedgwick
0c29c89909 need mutable ndb reference to unsubscribe
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:57:06 -08:00
William Casarin
ec755493d9 Introducing Damus Notedeck: a nostr browser
This splits notedeck into:

- notedeck
- notedeck_chrome
- notedeck_columns

The `notedeck` crate is the library that `notedeck_chrome` and
`notedeck_columns`, use. It contains common functionality related to
notedeck apps such as the NoteCache, ImageCache, etc.

The `notedeck_chrome` crate is the binary and ui chrome. It is
responsible for managing themes, user accounts, signing, data paths,
nostrdb, image caches etc. It will eventually have its own ui which has
yet to be determined.  For now it just manages the browser data, which
is passed to apps via a new struct called `AppContext`.

`notedeck_columns` is our columns app, with less responsibility now that
more things are handled by `notedeck_chrome`

There is still much work left to do before this is a proper browser:

- process isolation
- sandboxing
- etc

This is the beginning of a new era! We're just getting started.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-12 20:08:55 -08:00
William Casarin
74c5f0c748 split notedeck into crates
This splits notedeck into crates, separating the browser chrome and
individual apps:

* notedeck: binary file, browser chrome
* notedeck_columns: our columns app
* enostr: same as before

We still need to do more work to cleanly separate the chrome apis
from the app apis. Soon I will create notedeck-notebook to see what
makes sense to be shared between the apps.

Some obvious ones that come to mind:

1. ImageCache

We will likely want to move this to the notedeck crate, as most apps
will want some kind of image cache. In web browsers, web pages do not
need to worry about this, so we will likely have to do something similar

2. Ndb

Since NdbRef is threadsafe and Ndb is an Arc<NdbRef>, it can be safely
copied to each app. This will simplify things. In the future we might
want to create an abstraction over this? Maybe each app shouldn't have
access to the same database... we assume the data in DBs are all public
anyways, but if we have unwrapped giftwraps that could be a problem.

3. RelayPool / Subscription Manager

The browser should probably maintain these. Then apps can use ken's
high level subscription manager api and not have to worry about
connection pool details

4. Accounts

Accounts and key management should be handled by the chrome. Apps should
only have a simple signer interface.

That's all for now, just something to think about!

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-11 11:24:29 -08:00