Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: chat spacing and minor detail #135

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion apps/www/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default async function Home({
api.auth.getCurrentUserPublic(),
api.auth.getCurrentSession(),
]);

return (
<>
{!getCurrentUserPublic && getCurrentSession ? (
Expand Down
18 changes: 17 additions & 1 deletion apps/www/src/components/room-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@ export default function RoomPageClient(
: "items-start",
)}
>
{chats[i - 1]?.user_id !== chat.user_id && (
<Link
href={`/${chat.user.username}`}
className="mt-1 max-w-52 truncate text-xs text-muted-foreground opacity-100 xs:max-w-60"
>
{chat.user.name} — {chat.user.username}
</Link>
)}

<Tooltip>
<TooltipTrigger asChild>
<div
Expand Down Expand Up @@ -489,12 +498,19 @@ export default function RoomPageClient(
>
<div
className={cn(
"max-w-60 rounded-lg border bg-muted px-3 py-2 xs:max-w-72 sm:max-w-96",
"max-w-60 rounded-br-lg rounded-tr-lg border bg-muted px-3 py-2 xs:max-w-72 sm:max-w-96",

searchParams.get("chat_id") === chat.id &&
"border-primary",
chat.user_id === props.current_user.id
? "rounded-l-2xl rounded-br-none bg-primary text-white"
: "rounded-r-2xl rounded-bl-none",
{
"rounded-bl-lg":
chats[i + 1]?.user_id !== chat.user_id,
"rounded-tl-lg":
chats[i - 1]?.user_id !== chat.user_id,
},
)}
>
<p className="whitespace-pre-wrap break-words">
Expand Down
7 changes: 7 additions & 0 deletions supabase/migrations/20240918131030_added-pinned-post.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alter table "public"."users" add column "pinned_post" uuid;

alter table "public"."users" add constraint "public_users_pinned_post_fkey" FOREIGN KEY (pinned_post) REFERENCES users(id) ON DELETE SET NULL not valid;

alter table "public"."users" validate constraint "public_users_pinned_post_fkey";


Loading