Commit Graph

487 Commits

Author SHA1 Message Date
kernelkind
e9c3596067 AccountManagementView
View used to add and remove accounts from the app

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-13 10:50:42 -07:00
kernelkind
93800e0d04 Add SimpleProfilePreview
Preview that only contains the pfp, display name, and username

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-13 10:50:42 -07:00
kernelkind
59818edd83 remove nostr-sdk
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
kernelkind
e04c8821d5 Add keypair & update pubkey
Keypair & FullKeypair match structs in damus ios

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
kernelkind
b8177459ab use nostr in enostr
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
William Casarin
3e1acfa9cf update version in comment because I still use this on my laptop
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-04 10:26:26 -07:00
William Casarin
30e9aa5357 nix: make android emulator optional
Tony was having issues on aarch64-linux

Changelog-Fixed: Fix nix build on aarch64-linux
2024-05-04 11:32:34 -05:00
kernelkind
aacc41e4c2 Add flag to emulate mobile during preview
Since the is_mobile check was moved to compile-time instead of runtime
in 0a6a441041, we need a way to override
the check when previewing using the 'mobile' flag.

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-04 11:32:34 -05:00
William Casarin
f9d6161500 move account_login_view to ui submodule
trying to keep all views and widgets in here
2024-05-04 11:32:34 -05:00
William Casarin
5b7b47aaf5 style: less bubbly 2024-05-04 11:32:34 -05:00
William Casarin
029bbf0e77 nix: add openssl dep for reqwest 2024-05-02 19:31:20 +02:00
kernelkind
baaa7cc05d move login logic from promise to async fns
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-02 18:51:28 +02:00
kernelkind
64904da5e8 add reqwest as dependency
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-02 18:51:28 +02:00
kernelkind
486a8c84e0 login: Add key loading & error to mobile
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-02 18:51:28 +02:00
kernelkind
b8229fb9a9 Move login business logic to LoginManager
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-02 18:51:28 +02:00
William Casarin
5396085d96 textmode: adjust name sizing so it doesn't bump the column 2024-05-02 18:51:05 +02:00
William Casarin
f3f8d4ecb4 textmode: no previews in textmore for now
Ideally these would just be angle bracket quotes or something. would be
cool.
2024-05-02 18:50:25 +02:00
William Casarin
d9f1582ee7 since filter optimization
This is an optimization that allows us to modify our network filter to
include since-information based off of our local relay. The idea is to
look at the latest note in a given view, and add that to the since
filter for the remote query.

Fixes: https://github.com/damus-io/notedeck/issues/36
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 14:06:20 -07:00
William Casarin
f4d496012b log relay subscriptions
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 14:06:20 -07:00
William Casarin
632e5b89d1 mobile: don't add hover on mobile
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 12:48:26 -07:00
William Casarin
a173e38141 slightly larger pfpfs
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 12:47:29 -07:00
William Casarin
ca58b831b6 queries: set reasonable initial query sizes
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 11:01:28 -07:00
William Casarin
0a6a441041 simplify is_mobile check
Just base it on the current compile target

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 11:00:56 -07:00
William Casarin
28e2e7edd5 Merge remote-tracking branch 'github/virtual-list' 2024-04-28 17:55:29 -07:00
William Casarin
26128c3456 use egui_virtual_list for rendering
absolutely insane performance increase

Fixes: https://github.com/damus-io/notedeck/issues/32
Suggested-by: @lucasmerlin
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-28 11:03:47 -07:00
William Casarin
69054d71ca nip10: show initial reply information on notes
Using the newly merged nip10 code, we can show replies on notes!

This is not final, and it's actually different than how we do it in
Damus iOS. Not sure if I like it yet. We will likely have to put pubkey
information back in somewhere soon.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-27 01:58:35 -07:00
William Casarin
afb0e5fe65 github: remove pages workflow
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-27 01:53:08 -07:00
William Casarin
d0cfeee79f readme: make it clear that nix is optional for non-android dev
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-26 11:11:06 -07:00
William Casarin
f12ccc69a4 add hover to profile map demo
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-24 12:49:06 -07:00
William Casarin
7ec31d0eae fun large profile grid preview
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-24 12:49:06 -07:00
William Casarin
e8168b0004 ui: add profile picture hover animation
I wanted to practice doing animation in egui, so here is a simple
profile picture hover affect. When you mouse over a profile picture, it
get slightly bigger.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-24 12:49:06 -07:00
William Casarin
61deeb03e1 note: support nprofile mentions
realized we were missing this bit

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-24 12:49:06 -07:00
William Casarin
32923abfc2 perf: profiling note content rendering
Made some small speed improvements

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-22 08:58:30 -07:00
William Casarin
c944cac810 style: realtime hover interactions
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 17:57:32 -07:00
William Casarin
1d44b08f13 ui: make pixel sizes correct, use more of the figma
I noticed the pixel sizes were off which made it harder to match the
pixel dimensions of rob's figma designs. This restores the pixel size
and adjust the font sizes so that things look somewhat ok with the
default pixel settings.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 17:45:09 -07:00
William Casarin
24633b84bb ui: introduce profile picture widget
We are starting to use profile pics in different places, let's make it a
widget. We'll also probably need to have adjustable sizes and such soon.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 16:49:49 -07:00
William Casarin
863ccd866b render_pfp: only depend on imgcache
This will allow us to build previews a bit nicer

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 16:36:14 -07:00
William Casarin
ee94f27987 profile: add about and username to profile previews
Also adjust colors to match design

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 16:28:12 -07:00
William Casarin
893fd582dc profiles: introduce DisplayNames
This is exactly the same as the DisplayName enum in Damus iOS. Due to
the various inconsistencies in `name` and `display_name` between
clients, we have to generalize DisplayName into two variants: one name
or two names.

If we have two names, we treat it in the standard way of display_name is
the real name, and `name` is the username.

If only one is set, then it is considered both the username and "real name".

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:55:47 -07:00
William Casarin
2edba9942c ui: add banners to profile previews
profile previews still need lots of work, but this was a challenge to
get an aspectRatio: fill mechanism for images which the banner takes
advantage of.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
2f6f92e62c style: set 0 duration tooltip delay
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
7f61d9aeb7 images: add aspect_fill
This is similar to SwiftUI's .aspectRatio(contentMode: .fill) so that
we can get a filling banner image

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
55111b8b25 test: update test profile with a banner
I need this to test profile preview banners

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
a408c96d91 ui: remove some old note ui comments
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
54bf2a0767 previews: remove central panel frame
This was adding padding we don't want

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 13:42:49 -07:00
William Casarin
bf7775467d readme: document previews
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 22:16:54 -07:00
William Casarin
05fe164a49 ui: add initial Profile hover previews
The idea with these is that on notedeck you can just hover your cursor
over a profile link to see the profile. I just have a stub for now, but
full design coming soon after.

Also simplify the preview system even further with a macro. In the
future I imagine we can grep every preview in the codebase, and then
include this as a string inside this macro. This is some kind of
template metaprogramming insanity but in theory it could work.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 22:00:19 -07:00
William Casarin
2d566cc637 ui: move RelayView into ui module
Trying to keep all UI stuff in there

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 21:53:47 -07:00
William Casarin
51c25b88cc timeline: use strips instead of panels
panels grow when their childs a larger than its container. strips do not
do this, which is better for timelines

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 19:55:02 -07:00
kernelkind
c4d9b5cd3c Extract the sample relay to test_data for reuse
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 17:39:21 -07:00