From ec54bebf55859549f868fcd10cd18966e0fa64c6 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Thu, 12 Sep 2024 09:58:43 +0530 Subject: [PATCH] feat: mobile UI fixes (#635) * fix: truncate tx description in mobile * chore: add margin to dialogs in mobile * fix: increase input font size to avoid zooming in mobiles * fix: sidebar in mobile * chore: minor ui issues * chore: responsive & layout improvements, fix ellipsis on long description in transaction list --------- Co-authored-by: Roland Bewick --- frontend/src/components/AppAvatar.tsx | 2 +- frontend/src/components/SidebarHint.tsx | 2 +- frontend/src/components/TransactionItem.tsx | 23 ++++++++++--------- .../src/components/connections/AppCard.tsx | 2 +- frontend/src/components/layouts/AppLayout.tsx | 12 +++++----- frontend/src/components/ui/alert-dialog.tsx | 20 ++++++++-------- frontend/src/components/ui/dialog.tsx | 2 +- frontend/src/components/ui/input.tsx | 2 +- frontend/src/screens/Home.tsx | 8 +++++-- frontend/src/screens/channels/Channels.tsx | 19 +++++++++++---- 10 files changed, 54 insertions(+), 38 deletions(-) diff --git a/frontend/src/components/AppAvatar.tsx b/frontend/src/components/AppAvatar.tsx index 21f4b735..399c5e82 100644 --- a/frontend/src/components/AppAvatar.tsx +++ b/frontend/src/components/AppAvatar.tsx @@ -39,7 +39,7 @@ export default function AppAvatar({ app, className }: Props) { /> )} {!image && ( - + {app.name.charAt(0)} )} diff --git a/frontend/src/components/SidebarHint.tsx b/frontend/src/components/SidebarHint.tsx index 319d8570..059ec548 100644 --- a/frontend/src/components/SidebarHint.tsx +++ b/frontend/src/components/SidebarHint.tsx @@ -84,7 +84,7 @@ function SidebarHintCard({ buttonLink, }: SidebarHintCardProps) { return ( -
+
diff --git a/frontend/src/components/TransactionItem.tsx b/frontend/src/components/TransactionItem.tsx index ccbfe3c0..7bf0041c 100644 --- a/frontend/src/components/TransactionItem.tsx +++ b/frontend/src/components/TransactionItem.tsx @@ -57,8 +57,7 @@ function TransactionItem({ tx }: Props) { }} > - {/* flex wrap is used as a last resort to stop horizontal scrollbar on mobile. */} -
+
-
-
-

- {type == "incoming" ? "Received" : "Sent"} -

-

- {dayjs(tx.settledAt).fromNow()} +

+
+

+ + {type == "incoming" ? "Received" : "Sent"} + + + {dayjs(tx.settledAt).fromNow()} +

-

+

{tx.description}

-
+

navigate(`/apps/${app.nostrPubkey}`)} > diff --git a/frontend/src/components/layouts/AppLayout.tsx b/frontend/src/components/layouts/AppLayout.tsx index 7a124e50..cd517421 100644 --- a/frontend/src/components/layouts/AppLayout.tsx +++ b/frontend/src/components/layouts/AppLayout.tsx @@ -138,7 +138,7 @@ export default function AppLayout() { function MainNavSecondary() { const { hasChannelManagement } = useInfo(); return ( -