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>
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>
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>
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>
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>
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>
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>
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>
In this commit we refactor the preview mechanism, and switch to
responsive views by default.
To create a preview, your view now has to implement the Preview trait.
This is very similar to SwiftUI's preview mechanism.
Signed-off-by: William Casarin <jb55@jb55.com>
Use highlight color for 'connected' relay status. There doesn't seem to
be a better place to put it.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>