we need to pass a few more things around but it's not that bad. This
will allow you to launch damus with --mobile for mobile testing without
recompilation.
We should be treating all ui widgets as pure functions that do not
mutate anything. This will make testing easier, as well as avoiding
shared mutable references.
Signed-off-by: William Casarin <jb55@jb55.com>
also use IdTypeMap::insert_temp instead of insert_persisted.
The whole conception of using egui memory to share state is probably
going to be changed to a more robust solution in the future.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Create a side panel UI element for desktop with three buttons for:
adding a column, settings, and account management. The account
management button is temporary pending a better design. It is the only
one that is interactable at the moment. When the user clicks it, the
global popup window will be shown and the AccountManagementView will be
presented on the window. The user can click on the X on the top right of
the window to close it.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
TimelineView is a filtered view of a timeline. We will use this for
future tab rendering. We also introduce a new "selection" concept for
selecting notes on different timeline views. This is in preparation for
vim keybindings.
Will be useful for selecting an account for the 'Add Column' view
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
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>
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>
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>