Commit Graph

14 Commits

Author SHA1 Message Date
William Casarin
e69a7f83ae refactor: make LoginAction a bit safer
We make LoginAction a simple wrapper around processing the unknown
action to expose too much internal logic. This allows us to have a
must_use on our LoginAction type, otherwise the SingleUnkIdAction's
must_use will be lost when returned in the login action.

Fixes: a5cdddbb2b ("user can upgrade their npub -> nsec")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 09:28:29 -08:00
kernelkind
a5cdddbb2b user can upgrade their npub -> nsec
closes https://github.com/damus-io/notedeck/issues/476

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-26 21:22:52 -05:00
William Casarin
19933c84f1 onboarding: lookup profile after accounts are added
To reduce the side effects of this change, we introduce a new UnknownId
action type:

  - SingleUnkIdAction

This can be returned from functions to signal that we need to do some
work to look for things. We add a `must_use` directive to this type
to ensure callers handle it.

Changelog-Fixed: Fix missing profiles when new accounts are added
Fixes: https://github.com/damus-io/notedeck/issues/356
2024-11-18 17:11:58 -08:00
William Casarin
36c0971fd9 Flexible routing
Another massive refactor to change the way routing works. Now any
column can route anywhere.

Also things are generally just much better and more modular via the
new struct split borrowing technique.

I didn't even try to split this into smaller commits for my sanity.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 14:50:20 -07:00
William Casarin
00091c5088 Switch to Columns
Also refactor damus app usage to only pass in things that we need in views.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-11 15:49:34 -07:00
William Casarin
4a4fb06425 split is_mobile to is_narrow and is_oled
is_mobile doesn't really make sense for android tablets. We were
overloading this variable to mean "is_narrow". What we really want is
is_oled for mobile devices and is_narrow for if its phone-like.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-06 21:54:48 -07: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
0dd33c90e7 initial navigation 2024-06-11 17:50:09 -07:00
William Casarin
31b2b5c950 initial refactor in preparation for routing
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-28 15:09:01 -07:00
kernelkind
7ebd694f11 refactor account switcher & management previews
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
88a3a2d088 move test account creation & apply to global popup
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -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
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
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