Commit Graph

464 Commits

Author SHA1 Message Date
William Casarin
a36ce31fc7 pool: increase default reconnect time to 5 seconds
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-10 16:00:38 -07:00
William Casarin
af8d7d222c Add note wide mode for reposts
This adds a 'wide' note design for note previews. This is a mode
where the note contents does not have padding at the start. This makes
notes previews a bit nicer.

Screenshot: https://cdn.jb55.com/s/84271f386d564c34.png
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-10 10:56:15 -07:00
William Casarin
61bc9d9919 refactor: rename ui::Note to ui::NoteView
Easier to jump to when using tags.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-10 09:56:16 -07:00
William Casarin
f795fe6088 docs: make note about not needing nix on ubunutu
Reported-by: Derek Ross
Fixes: https://github.com/damus-io/notedeck/issues/144
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-10 09:54:07 -07:00
William Casarin
5805df266a don't use an actual keystorage in Damus test apps
Reported-by: kernelkind <kernelkind@gmail.com>
Fixes: https://github.com/damus-io/notedeck/issues/150
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-05 07:38:58 -07:00
William Casarin
d265d48c0b fix scroll area shrinking
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-04 10:17:09 -07:00
William Casarin
239a2cb701 Switch to egui master to fix wgpu issues
There are some wgpu issues that are fixed in egui-master, so
let's switch to that.

This fixes notedeck so that it runs on both my intel graphics laptop
and amdgpu desktop.

Fixes: https://github.com/damus-io/notedeck/issues/28
Fixes: https://github.com/damus-io/notedeck/issues/42
Fixes: https://github.com/damus-io/notedeck/issues/141
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-02 17:48:18 -07:00
William Casarin
9eea457bda switch to glow for now
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-02 16:12:04 -07:00
William Casarin
724042b700 allow missing profiles in account switcher
Fixes: https://github.com/damus-io/notedeck/issues/119
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-02 10:34:42 -07:00
kernelkind
a890c9e970 select first account
closes: https://github.com/damus-io/notedeck/issues/119

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-07-02 13:12:20 -04:00
William Casarin
e9da25266a enable nip10 replies
you can now reply to notes

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 19:22:43 -07:00
William Casarin
b31bd2470b keys: actually use the keystore
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 11:13:22 -07:00
William Casarin
4c490e1436 Merge 'impl linux credential storage' #115
From PR description:

See the test_basic() test in linux_key_storage.rs. I ran it successfully
on my MacOS machine and a linux VM. The BasicFileStorage impl just
stores each Keypair as a SerializableKeypair json object with the file
name as the public key hex in ~/.notedeck_credentials. The
SerializableKeypair uses the nip49 EncryptedSecretKey, but we just use
an empty string as the password for now.

The BasicFileStorage impl works in MacOS, but it only conditionally
compiles to linux for simplicity.

pub enum KeyStorageResponse<R> {
    Waiting,
    ReceivedResult(Result<R, KeyStorageError>),
}

This is used as a response so that it's possible for the storage impl to
be async, since secret_service is async. It seems that secret_service
would allow for a more robust linux key storage impl so I went ahead and
made the API compatible with an async impl.

* kernelkind (1):
      impl linux credential storage
2024-07-01 10:49:15 -07:00
William Casarin
6f6d5f05af always have some default timeline
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 10:35:47 -07:00
William Casarin
69a8438f33 cleanup some dead code
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 07:31:43 -07:00
William Casarin
3fc73bb601 post: full available width
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 07:31:29 -07:00
William Casarin
b0881d4282 add my pubkey to the timeline query for testing
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 07:31:12 -07:00
William Casarin
2d10b20ae2 allow multiple invocations of --sec
for multi-account

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 07:02:22 -07:00
William Casarin
b7366351b6 drafts: clear post after posting
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:49:12 -07:00
William Casarin
a04df88ff6 initial note posting
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:49:12 -07:00
William Casarin
8dc829791e cli: add --sec argument to quickly add an account
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:41:32 -07:00
William Casarin
3ed09dadf0 damus: make relay pool public
we will be using this for our post view

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:39:39 -07:00
William Casarin
1810515ad2 account_manager: don't add the same pubkey more than once
If we are passing keys on the command line, let's make sure
we aren't adding duplicates when we integrate the keystore.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:39:16 -07:00
William Casarin
307b8af8f1 enostr: rename Event to Note
we will likely replace Note with nostrdb::Note in the future,
this just helps with that transition

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:38:08 -07:00
William Casarin
a16d5b3a05 env: allow private things like secret keys
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:33:22 -07:00
kernelkind
2a47a66bbb impl linux credential storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-06-28 15:27:46 -04:00
William Casarin
26c4d90be3 initial postbox for testing
not sure if we want to put this here yet, but it matches the design
and will be useful for testing

Fixes: https://github.com/damus-io/notedeck/issues/110
Suggested-by: Rob
2024-06-25 14:08:56 -05:00
William Casarin
a6856867a9 Merge remote-tracking branch 'pr/107' 2024-06-25 13:20:56 -05:00
William Casarin
8ef6534981 fixed_window: fix clippy warning
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 17:12:24 -07:00
William Casarin
1228f83e50 refactor: move fixed_window to ui
This is a ui module

Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 17:11:01 -07:00
William Casarin
b14a2bf254 popup: simplify borrow
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 17:09:07 -07:00
William Casarin
a66b467cb4 hide navigation title on global nav
Fixes: https://github.com/damus-io/notedeck/issues/109
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 16:47:35 -07:00
William Casarin
f8c8e48c26 postview: add vertical scroll
Suggested-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 16:19:06 -07:00
William Casarin
a9a07b3805 refactor: use map instead of explicit if let
We also use last instead of first, because the last route should be the
active one.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 14:55:43 -07:00
William Casarin
677c217ecd popup: increase fixed window margin
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-24 14:55:22 -07:00
kernelkind
6afb618089 reintroduce account management
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-06-23 20:04:00 -04:00
William Casarin
b7188bac25 fix some clippy warnings
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 14:12:07 -07:00
William Casarin
0b3d6f7e37 initial post reply view
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 14:01:40 -07:00
William Casarin
ac0821db79 postbox: add focus shadow from figma
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 10:14:34 -07:00
William Casarin
86b0583221 use unique id for post/reply view
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 09:58:47 -07:00
William Casarin
b0c5d2a2c5 postbox: add focused state
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 09:01:14 -07:00
William Casarin
4c1936ff70 change selection color to purple
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-21 08:56:44 -07:00
William Casarin
18d5d95ef9 fix postbox design
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-20 13:44:35 -07:00
William Casarin
bb6c68e05c clippy postbox cleanups
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-20 13:05:57 -07:00
William Casarin
395ff57edf add vertical separators between timelines
Fixes: https://github.com/damus-io/notedeck/issues/52
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-20 13:02:18 -07:00
kernelkind
98a61c0aa7 reintroduce account switcher
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-06-18 19:16:11 -04:00
William Casarin
1458498131 initial post box view
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-17 16:21:46 -07:00
William Casarin
577aa76ac7 add --light lightmode flag to previews and notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-14 11:12:16 -07:00
William Casarin
d064987e45 fix lock
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-14 10:18:18 -07:00
William Casarin
fa50b68cb3 darker quote reposts for mobile
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-14 10:18:06 -07:00