Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions app/src/components/ExpenseDetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -829,17 +829,22 @@ export function ExpenseDetailModal({ expense: initialExpense, onClose, onDeleted
<p className="text-[14px] text-faint py-8 text-center">{t('comments.empty')}</p>
)}

<form onSubmit={handleAddComment} className="flex gap-3 items-center mt-6">
<Avatar name={user?.username ?? '?'} color={user?.color ?? 'slate'} size="lg" />
<div className="flex-1 flex items-center gap-2 rounded-xl border border-app bg-surface px-3.5 py-2">
<input
type="text"
value={commentBody}
maxLength={2000}
onChange={(e) => setCommentBody(e.target.value)}
placeholder={t('comments.placeholder')}
className="flex-1 bg-transparent text-[14px] outline-none placeholder:text-faint"
/>
{/* Input y boton en dos filas: en movil la fila unica sobrepasa el ancho */}
<form onSubmit={handleAddComment} className="mt-6 space-y-2">
<div className="flex gap-3 items-center">
<Avatar name={user?.username ?? '?'} color={user?.color ?? 'slate'} size="lg" />
<div className="flex-1 flex items-center rounded-xl border border-app bg-surface px-3.5 py-2">
<input
type="text"
value={commentBody}
maxLength={2000}
onChange={(e) => setCommentBody(e.target.value)}
placeholder={t('comments.placeholder')}
className="flex-1 bg-transparent text-[14px] outline-none placeholder:text-faint"
/>
</div>
</div>
<div className="flex justify-end">
<button
type="submit"
disabled={commentSending || !commentBody.trim()}
Expand Down
21 changes: 12 additions & 9 deletions app/src/pages/InvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,22 +358,25 @@ export default function InvitePage() {
) : (
<p className="text-[14px] text-faint py-4 text-center">{t('comments.empty')}</p>
)}
<form onSubmit={handleAddComment} className="flex gap-2 items-end">
{/* Input y boton en dos filas: en movil la fila unica sobrepasa el ancho */}
<form onSubmit={handleAddComment} className="mt-4 space-y-2">
<input
type="text"
value={commentBody}
maxLength={2000}
onChange={(e) => setCommentBody(e.target.value)}
placeholder={t('comments.placeholder')}
className="flex-1 bg-surface2 border border-app rounded-xl px-3 py-2 text-[14px] outline-none focus:border-brand placeholder:text-faint"
className="w-full bg-surface2 border border-app rounded-xl px-3 py-2 text-[14px] outline-none focus:border-brand placeholder:text-faint"
/>
<button
type="submit"
disabled={commentSending || !commentBody.trim()}
className="w-10 h-10 rounded-xl bg-brand text-brandfg flex items-center justify-center hover:brightness-110 disabled:opacity-60 shrink-0"
>
<Send className="w-4 h-4" aria-hidden="true" />
</button>
<div className="flex justify-end">
<button
type="submit"
disabled={commentSending || !commentBody.trim()}
className="w-10 h-10 rounded-xl bg-brand text-brandfg flex items-center justify-center hover:brightness-110 disabled:opacity-60 shrink-0"
>
<Send className="w-4 h-4" aria-hidden="true" />
</button>
</div>
</form>
</div>
)}
Expand Down
Loading