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
26 changes: 13 additions & 13 deletions app/routes/_app+/recipients+/$recipientId.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ export default function RecipientRoute() {
</Link>
</div>
) : null}
<ul className="flex flex-col gap-6">
<ul className="flex flex-col gap-4 sm:gap-6">
{data.futureMessages.length ? (
data.futureMessages.map((m, index) => (
<li key={m.id} className="flex flex-col gap-4">
<li key={m.id} className="flex flex-col gap-3 sm:gap-4">
<MessageForms message={m} index={index} />
</li>
))
Expand Down Expand Up @@ -344,7 +344,7 @@ export default function RecipientRoute() {
<StatusButton
status={isCreating ? 'pending' : 'idle'}
type="submit"
className="self-end bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))] sm:self-auto"
className="w-full bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))] sm:w-auto"
>
<Icon name="check">Add to Queue</Icon>
</StatusButton>
Expand Down Expand Up @@ -391,27 +391,27 @@ function MessageForms({
: 'Message'

return (
<div className="flex flex-col gap-4 lg:flex-row">
<div className="flex flex-col gap-3 sm:gap-4 lg:flex-row lg:items-start">
<div className="flex gap-2 lg:flex-col">
<UpdateOrderForm message={message} direction="earlier" />
<UpdateOrderForm message={message} direction="later" />
</div>
<div className="flex-1 space-y-3">
<div
className={`rounded-[28px] px-6 py-5 text-[hsl(var(--palette-cream))] shadow-sm ${cardTone}`}
className={`rounded-[28px] px-4 py-4 text-[hsl(var(--palette-cream))] shadow-sm sm:px-6 sm:py-5 ${cardTone}`}
>
<div className="flex items-center justify-between gap-2 text-xs font-semibold tracking-[0.2em] text-[hsl(var(--palette-cream))] uppercase">
<div className="flex items-center gap-2">
<div className="flex flex-col gap-3 text-xs font-semibold tracking-[0.15em] text-[hsl(var(--palette-cream))] uppercase sm:flex-row sm:items-center sm:justify-between sm:tracking-[0.2em]">
<div className="flex flex-wrap items-center gap-2">
<Icon name={isPrimary ? 'check' : 'clock'} size="sm" />
<span>{headerText}</span>
</div>
<div className="flex items-center gap-2">
<div className="flex flex-wrap items-center gap-2 sm:flex-nowrap sm:justify-end">
<StatusButton
form={updateContentForm.id}
status={
updateContentFetcher.state !== 'idle' ? 'pending' : 'idle'
}
className="gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15]"
className="h-11 w-11 gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15] sm:h-10 sm:w-10"
size="icon"
variant="ghost"
type="submit"
Expand Down Expand Up @@ -491,7 +491,7 @@ function UpdateOrderForm({
variant="secondary"
size="icon"
status={fetcher.state !== 'idle' ? 'pending' : 'idle'}
className="text-muted-foreground hover:text-foreground gap-0"
className="h-11 w-11 gap-0 text-muted-foreground hover:text-foreground sm:h-10 sm:w-10"
type="submit"
name="intent"
value={updateMessageOrderActionIntent}
Expand Down Expand Up @@ -530,7 +530,7 @@ function SendNowForm({ message }: { message: Pick<FutureMessage, 'id'> }) {
<StatusButton
variant="ghost"
size="icon"
className="gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15]"
className="h-11 w-11 gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15] sm:h-10 sm:w-10"
status={fetcher.state !== 'idle' ? 'pending' : 'idle'}
type="submit"
name="intent"
Expand Down Expand Up @@ -558,8 +558,8 @@ function DeleteForm({ message }: { message: Pick<FutureMessage, 'id'> }) {
})
const dc = useDoubleCheck()
const deleteClassName = dc.doubleCheck
? 'gap-0 data-[safe-delay=true]:opacity-50'
: 'gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15] data-[safe-delay=true]:opacity-50'
? 'h-11 w-11 gap-0 data-[safe-delay=true]:opacity-50 sm:h-10 sm:w-10'
: 'h-11 w-11 gap-0 text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-cream))/0.15] data-[safe-delay=true]:opacity-50 sm:h-10 sm:w-10'

return (
<fetcher.Form method="POST" {...getFormProps(form)}>
Expand Down
12 changes: 7 additions & 5 deletions app/routes/_app+/recipients+/$recipientId.past.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Pagination({
const hasNextPage = currentPage < totalPages

return (
<div className="flex flex-col items-center gap-4 sm:flex-row sm:justify-between">
<div className="flex flex-col items-start gap-4 sm:flex-row sm:items-center sm:justify-between">
<p className="text-muted-foreground text-sm">
{totalMessages === 0
? 'No messages found'
Expand Down Expand Up @@ -196,7 +196,7 @@ export default function RecipientRoute() {
/>
</div>

<ul className={cn('flex flex-col gap-2', { 'opacity-50': isPending })}>
<ul className={cn('flex flex-col gap-3 sm:gap-4', { 'opacity-50': isPending })}>
{data.pastMessages.length === 0 ? (
<li className="text-muted-foreground py-8 text-center">
{data.searchQuery
Expand All @@ -207,12 +207,14 @@ export default function RecipientRoute() {
data.pastMessages.map((m) => (
<li
key={m.id}
className="flex flex-col justify-start gap-2 align-top lg:flex-row"
className="border-border bg-card flex flex-col justify-start gap-2 rounded-2xl border px-4 py-3 shadow-sm sm:px-5 sm:py-4 lg:flex-row lg:items-start"
>
<span className="text-muted-secondary-foreground min-w-36">
<span className="text-muted-secondary-foreground min-w-36 text-xs font-semibold tracking-[0.15em] uppercase sm:text-sm sm:tracking-[0.2em]">
{m.sentAtDisplay}
</span>
<span>{m.content}</span>
<span className="break-words text-sm sm:text-base">
{m.content}
</span>
</li>
))
)}
Expand Down
16 changes: 8 additions & 8 deletions app/routes/_app+/recipients+/$recipientId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function RecipientRoute() {
}, [currentPath])

return (
<div className="grid gap-10 lg:grid-cols-[320px_1fr]">
<div className="grid gap-8 lg:grid-cols-[320px_1fr] lg:gap-10">
<aside className="space-y-6">
<Link
to="/recipients"
Expand All @@ -105,7 +105,7 @@ export default function RecipientRoute() {
</Link>
<div className="flex flex-wrap items-start justify-between gap-4">
<div>
<h2 className="text-foreground text-3xl font-bold">
<h2 className="text-foreground text-2xl font-bold sm:text-3xl">
{data.recipient.name}
</h2>
<div className="text-muted-foreground mt-2 flex flex-wrap items-center gap-2 text-xs font-semibold tracking-[0.2em] uppercase">
Expand Down Expand Up @@ -160,13 +160,13 @@ export default function RecipientRoute() {
</SimpleTooltip>
</div>
</aside>
<section className="border-border bg-muted rounded-[32px] border px-6 py-8 shadow-sm">
<nav className="mb-6 flex flex-wrap gap-2">
<section className="border-border bg-muted min-w-0 rounded-[32px] border px-4 py-6 shadow-sm sm:px-6 sm:py-8">
<nav className="mb-6 grid grid-cols-2 gap-2 sm:flex sm:flex-wrap">
<Link
to="."
preventScrollReset
className={cn(
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex items-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.2em] uppercase transition',
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex w-full items-center justify-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.15em] uppercase transition sm:w-auto sm:justify-start sm:tracking-[0.2em]',
currentPath === '.' && 'bg-card text-foreground shadow-sm',
)}
ref={firstLinkRef}
Expand All @@ -179,7 +179,7 @@ export default function RecipientRoute() {
to="new"
preventScrollReset
className={cn(
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex items-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.2em] uppercase transition',
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex w-full items-center justify-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.15em] uppercase transition sm:w-auto sm:justify-start sm:tracking-[0.2em]',
currentPath === 'new' && 'bg-card text-foreground shadow-sm',
)}
>
Expand All @@ -191,7 +191,7 @@ export default function RecipientRoute() {
to="past"
preventScrollReset
className={cn(
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex items-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.2em] uppercase transition',
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex w-full items-center justify-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.15em] uppercase transition sm:w-auto sm:justify-start sm:tracking-[0.2em]',
currentPath === 'past' && 'bg-card text-foreground shadow-sm',
)}
>
Expand All @@ -203,7 +203,7 @@ export default function RecipientRoute() {
to="edit"
preventScrollReset
className={cn(
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex items-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.2em] uppercase transition',
'border-border text-muted-foreground hover:bg-card hover:text-foreground flex w-full items-center justify-center gap-2 rounded-full border px-4 py-2 text-xs font-semibold tracking-[0.15em] uppercase transition sm:w-auto sm:justify-start sm:tracking-[0.2em]',
currentPath === 'edit' && 'bg-card text-foreground shadow-sm',
)}
>
Expand Down
10 changes: 6 additions & 4 deletions app/routes/_app+/recipients+/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ export default function RecipientsIndexRoute() {
<p className="text-muted-foreground text-xs font-semibold tracking-[0.3em] uppercase">
Recipients
</p>
<h1 className="text-foreground text-4xl font-bold">Recipients</h1>
<h1 className="text-foreground text-3xl font-bold sm:text-4xl">
Recipients
</h1>
</div>
<ButtonLink
to="new"
className="flex items-center gap-2 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))]"
className="flex w-full items-center justify-center gap-2 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))] sm:w-auto"
>
<Icon name="plus">Add New Recipient</Icon>
</ButtonLink>
Expand All @@ -69,7 +71,7 @@ export default function RecipientsIndexRoute() {
return (
<div
key={recipient.id}
className="grid gap-3 px-6 py-6 md:grid-cols-[minmax(160px,1.2fr)_minmax(180px,1.2fr)_minmax(220px,1.4fr)_minmax(140px,0.8fr)_120px] md:items-center md:gap-4 md:px-8"
className="grid gap-4 px-4 py-5 sm:px-6 sm:py-6 md:grid-cols-[minmax(160px,1.2fr)_minmax(180px,1.2fr)_minmax(220px,1.4fr)_minmax(140px,0.8fr)_120px] md:items-center md:gap-4 md:px-8"
>
<div className="flex flex-col gap-1">
<span className="text-muted-foreground text-xs font-semibold tracking-[0.2em] uppercase md:hidden">
Expand Down Expand Up @@ -133,7 +135,7 @@ export default function RecipientsIndexRoute() {
</div>
<ButtonLink
to="new"
className="flex items-center gap-2 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))]"
className="flex w-full items-center justify-center gap-2 bg-[hsl(var(--palette-green-500))] text-[hsl(var(--palette-cream))] hover:bg-[hsl(var(--palette-green-700))] sm:w-auto"
>
<Icon name="plus">Add Recipient</Icon>
</ButtonLink>
Expand Down
Loading