Commit Graph

901 Commits

Author SHA1 Message Date
William Casarin
ed5b1c4cf4 mention: change ?? to @???
More consistent with the other label

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 12:21:40 -08:00
William Casarin
49fe7ae5c7 ui: add show_pointer
For showing the cursor when hovering over a clickable thing. We need
this in more places.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 11:52:28 -08:00
William Casarin
482a3cb818 columns: move from Cow<'static, str> to ColumnTitle<'a>
This further deliminates our column titles to those that are simple,
and to those that require additional information from the database.

This allows us to avoid creating many transactions pointlessly if we
don't need to.

Changelog-Changed: Show usernames in user columns
2024-12-17 10:20:59 -08:00
William Casarin
47e0b0ed52 nostrdb: update to fix sub memleak 2024-12-17 09:19:35 -08:00
kernelkind
69a6bf3664 column: add individual column
A column for following a single user

Closes: https://github.com/damus-io/notedeck/pull/583
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-17 09:19:16 -08:00
kernelkind
5b4c7a6371 deps: ignore packages dir
Closes: https://github.com/damus-io/notedeck/pull/583
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-17 09:13:36 -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
Ken Sedgwick
926a3f80f4 ndb.get_notekey_by_id now returns NoteKey
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:57:04 -08:00
Ken Sedgwick
e1a55c6532 update nostrdb-rs for async stream support
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:56:48 -08:00
Ken Sedgwick
7da98b3c5c fix android build with cargo update num_enum@0.7.3
Compiling num_enum v0.7.3
error[E0463]: can't find crate for `num_enum_derive`

Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:56:45 -08:00
Ken Sedgwick
553a88d574 android: use more app top margin for android
A more refined solution would query the android environment for the
system bar height ...

Closes: https://github.com/damus-io/notedeck/pull/585
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 08:52:39 -08:00
William Casarin
18226a35ff android: fix build
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-14 01:51:56 -08:00
William Casarin
1e0228e396 Fix notes note updating in profile view
Fixes: https://github.com/damus-io/notedeck/issues/576
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-14 00:06:33 -08:00
William Casarin
e5ab8d5b9c nostrdb: update to fix profile queries
before profile queries were not working at the database level,
because there was no note_pubkey or note_pubkey_kind index. Now there
is! So profiles should be much faster to query now, and will actually
return results.

There still appears to be an issue with the profile NotesHolder which
is preventing it from updating, via the logic in poll_notes_into_view.
The original Timeline version of this function works fine, but it looks
like the NotesHolder one is broken.

Going to work on refactoring the notes holder next to fix.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 23:35:08 -08:00
William Casarin
ab829b45fc enostr: update ewebsock
This was using an ancient version of rustls, which in turn included
an old version of ring, which was the real reason of the windows
compile issues (i think)

Cc: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 11:01:09 -08:00
William Casarin
516bbb6bc6 deb: add name so package works again
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 11:01:09 -08:00
William Casarin
5fda025206 android: change apk name to Notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:45:47 -08:00
William Casarin
0302a228f8 rpm: fix rpm build
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:45:47 -08:00
William Casarin
0cb400efe3 osx: update bundle name
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:13:57 -08:00
William Casarin
6da23a1374 windows: amd64 installer
This adds windows amd64 support via a dynamic build step that configures
the inno installer for the correct architecture

Changelog-Added: Add amd64 support for Windows build
Closes: https://github.com/damus-io/notedeck/issues/506
2024-12-13 10:07:47 -08:00
William Casarin
c874606af5 tests: add --testrunner flag so that column tests dont fail on startup
We added a startup panic to prevent users from running as debug mode,
our tests are also hitting this. Add a new --testrunner flag which
skips this check. We want this separate from the --debug flag so that
the tests have a more consistent runtime environment.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:53 -08:00
William Casarin
08a5ed1076 lockfile: update
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:53 -08:00
kernelkind
13a406b9cd deps: remove reqwest
This was preventing us from building on windows amd

Closes: https://github.com/damus-io/notedeck/pull/567
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:26 -08:00
kernelkind
4bfa26fd8c Revert "move login logic from promise to async fns"
This reverts commit baaa7cc05d.

Closes: https://github.com/damus-io/notedeck/pull/567
2024-12-13 09:37:47 -08:00
William Casarin
c3bbc6b977 android: fix issues due to rearchitecture 2024-12-13 09:36:10 -08:00
Ken Sedgwick
8b80096290 android: misc fixes for android
Closes: https://github.com/damus-io/notedeck/pull/568
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 08:19:39 -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
aa14fb092d note: add copy note json
very handy
2024-12-11 16:12:25 -08:00
William Casarin
a429ff689c theme: fallback theme should be dark
this default was deeply cursed
2024-12-11 15:20:47 -08:00
kernelkind
9e67f9dc8c theme: persist across app close
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-11 16:56:14 -05:00
kernelkind
2ce845c1fc log: only show notedeck logs
Closes: https://github.com/damus-io/notedeck/pull/563
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-11 12:10:06 -08:00
William Casarin
97006d4d6f test: patch up some broken enostr tests
didn't fix them all though. apparently this test suite was
not running
2024-12-11 11:24:29 -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
William Casarin
10cbdf15f0 remove queries
not used anymore
2024-12-11 11:24:29 -08:00
William Casarin
d36487e28f caution: don't crash on unknown keyword
Fixes: 34f0c3b0ce ("serialization for DecksCache")
2024-12-11 11:24:29 -08:00
kernelkind
06c9023e30 fix edit deck bug
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-11 12:06:09 -05:00
kernelkind
c08b5a6662 ui: use text color for glyphs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:10:44 -05:00
kernelkind
e2b8f4e0cc columns.json migration integration
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:03:01 -05:00
kernelkind
dbddb3a3f2 add columns.json -> DecksCache migration
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:03:01 -05:00
kernelkind
213332ee71 allow DeckAuthor source for timeline
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:03:01 -05:00
kernelkind
0138186a00 remove unnecesary serializations
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:03:01 -05:00
kernelkind
72c44bdf2d use new serialization
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:03:01 -05:00
kernelkind
34f0c3b0ce serialization for DecksCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 15:02:57 -05:00
kernelkind
4cd3515a78 add decks UI to side panel
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 13:51:46 -05:00
kernelkind
56a8ba30f3 deck actions
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 13:51:45 -05:00
kernelkind
845a983592 new column constructor
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 13:51:18 -05:00
kernelkind
94598bedf5 introduce decks_cache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 12:59:52 -05:00
kernelkind
deb08a5a9d decks structs: remove unnecesssary unwraps
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-10 12:56:02 -05:00
kernelkind
a24bd4cc43 fix crash on AccountsView
It appears that Context::set_style doesn't keep the style changes from
the Damus constructor to the update method, but
`Context::all_styles_mut` does

Closes: https://github.com/damus-io/notedeck/issues/555
Closes: https://github.com/damus-io/notedeck/pull/560
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-09 15:31:20 -08:00
Ken Sedgwick
35138cd951 android: update to winit 0.30.5 2024-12-09 10:40:04 -08:00