Skip to content

Commit bfe1a0d

Browse files
authored
Merge branch 'joincalldotco:main' into feature/ui-refactor
2 parents 97342dd + b17d02e commit bfe1a0d

File tree

8 files changed

+38
-33
lines changed

8 files changed

+38
-33
lines changed

apps/server/src/routes/auth/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ authRouter.post(
3737
}
3838
);
3939

40+
// Redirect specific Better Auth error to app
41+
authRouter.get("/error", async (c) => {
42+
const url = new URL(c.req.url);
43+
const error = url.searchParams.get("error");
44+
45+
if (error === "please_restart_the_process") {
46+
return c.redirect("https://joincall.co/app", 302);
47+
}
48+
return auth.handler(c.req.raw);
49+
});
50+
4051
authRouter.on(["POST", "GET"], "/*", async (c: Context) => {
4152
try {
4253
return await auth.handler(c.req.raw);

apps/web/components/app/section/_components/close-sidebar-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useSidebar } from "@call/ui/components/sidebar";
44
import { Button } from "@call/ui/components/button";
5-
import { PanelRight } from "lucide-react";
5+
import { Icons } from "@call/ui/components/icons";
66

77
export function CloseSidebarButton({ className }: { className?: string }) {
88
const { toggleSidebar } = useSidebar();
@@ -14,7 +14,7 @@ export function CloseSidebarButton({ className }: { className?: string }) {
1414
onClick={toggleSidebar}
1515
className={className}
1616
>
17-
<PanelRight className="h-4 w-4" />
17+
<Icons.sidebarClose className="h-4 w-4" />
1818
</Button>
1919
);
2020
}

apps/web/components/app/section/_components/nav-main.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
SidebarMenu,
99
SidebarMenuButton,
1010
SidebarMenuItem,
11+
SidebarSeparator,
1112
useSidebar,
1213
} from "@call/ui/components/sidebar";
1314
import type { JSX } from "react";
@@ -35,17 +36,18 @@ export function NavMain({
3536
return (
3637
<SidebarGroup>
3738
<SidebarMenu className="flex flex-col">
38-
<SidebarMenuItem className="mb-2">
39+
<SidebarMenuItem className="mb-5">
3940
<SidebarMenuButton
4041
tooltip="Start Call"
4142
isActive={true}
4243
onClick={() => onOpen("start-call")}
43-
className="flex items-center justify-center gap-2"
44+
className="flex items-center text-sm !font-semibold !bg-primary-blue rounded-lg justify-center gap-3"
4445
>
45-
<Icons.plus className="size-4" />
46+
<Icons.plus style={{ width: 14, height: 14 }} />
4647
{isExpanded && <span>Start Call</span>}
4748
</SidebarMenuButton>
4849
</SidebarMenuItem>
50+
4951
{items.map((item) => (
5052
<Collapsible
5153
key={item.title}

apps/web/components/app/section/_components/nav-user.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function NavUser({
4343
avatar: string;
4444
};
4545
}) {
46-
const { isMobile } = useSidebar();
46+
const { isMobile, state } = useSidebar();
4747
const router = useRouter();
4848

4949
function getInitials(name?: string) {
@@ -66,16 +66,21 @@ export function NavUser({
6666
<DropdownMenu>
6767
<DropdownMenuTrigger asChild>
6868
<SidebarMenuButton
69-
size="xl"
69+
size="lg"
7070
className="data-[state=open]:text-sidebar-accent-foreground data-[state=collapsed]:p-0"
7171
>
72-
<UserProfile name={user.name} url={user.avatar} />
72+
<UserProfile
73+
className="rounded-lg"
74+
name={user.name}
75+
url={user.avatar}
76+
size={state === "collapsed" ? "lg" : "sm"}
77+
/>
7378
<div className="grid flex-1 text-left text-sm leading-tight">
74-
<span className="truncate text-lg font-medium capitalize">
79+
<span className="truncate text-sm font-medium capitalize">
7580
{user.name}
7681
</span>
7782
</div>
78-
<ChevronsUpDown className="ml-auto size-4" />
83+
<ChevronsUpDown className="ml-auto" size="sm" />
7984
</SidebarMenuButton>
8085
</DropdownMenuTrigger>
8186
<DropdownMenuContent

apps/web/components/auth/login-card.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export const LoginCard = ({
4848
onClick={handleGoogleLogin}
4949
className="w-full w-lg"
5050
disabled={isLoading}
51-
5251
>
5352
<Icons.google className="mr-2 h-4 w-4" />
5453
Continue with Google

packages/auth/src/auth.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export const auth = betterAuth({
4949
prompt: "consent",
5050
},
5151
},
52+
53+
54+
5255
advanced: {
5356
crossSubDomainCookies: {
5457
enabled: process.env.NODE_ENV === "production",

packages/ui/src/components/icons.tsx

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export const Icons = {
309309
<path
310310
d="M9 18C8.33663 18 7.79886 17.4622 7.79886 16.7989V1.20114C7.79886 0.537769 8.33663 0 9 0V0C9.66337 0 10.2011 0.537768 10.2011 1.20114V16.7989C10.2011 17.4622 9.66337 18 9 18V18ZM1.23237 10.2324C0.55175 10.2324 0 9.68062 0 9V9C0 8.31938 0.551749 7.76764 1.23237 7.76764H16.7676C17.4482 7.76764 18 8.31938 18 9V9C18 9.68062 17.4483 10.2324 16.7676 10.2324H8.96382H1.23237Z"
311311
className={cn(
312-
"fill-primary-icon transition-all duration-300",
312+
"fill-primary-icon fill-white transition-all duration-300",
313313
props.fill
314314
)}
315315
/>
@@ -712,35 +712,20 @@ export const Icons = {
712712
//sidebar-close
713713
sidebarClose: (props: IconProps) => (
714714
<svg
715-
height="20"
716715
width="20"
716+
height="16"
717+
viewBox="0 0 20 16"
717718
fill="none"
718-
viewBox="0 0 20 20"
719719
xmlns="http://www.w3.org/2000/svg"
720720
{...props}
721721
>
722722
<path
723-
d="M19 13.5714V4.42857C19 2.53503 17.6569 1 16 1H4C2.34315 1 1 2.53503 1 4.42857V13.5714C1 15.465 2.34315 17 4 17H16C17.6569 17 19 15.465 19 13.5714Z"
724-
stroke="currentColor"
725-
strokeLinecap="square"
726-
strokeLinejoin="round"
727-
strokeWidth="2"
728-
/>
729-
<path
730-
d="M5 11.7142C5.48325 11.7142 5.875 12.162 5.875 12.7142C5.875 13.2664 5.48325 13.7142 5 13.7142C4.51675 13.7142 4.125 13.2664 4.125 12.7142C4.125 12.162 4.51675 11.7142 5 11.7142ZM5 7.99993C5.48325 7.99993 5.875 8.4477 5.875 8.99993C5.875 9.55216 5.48325 9.99993 5 9.99993C4.51675 9.99993 4.125 9.55216 4.125 8.99993C4.125 8.4477 4.51675 7.99993 5 7.99993ZM5 4.28564C5.48325 4.28564 5.875 4.73336 5.875 5.28564C5.875 5.83793 5.48325 6.28564 5 6.28564C4.51675 6.28564 4.125 5.83793 4.125 5.28564C4.125 4.73336 4.51675 4.28564 5 4.28564Z"
731-
className="fill-primary-icon"
732-
stroke="currentColor"
733-
strokeWidth="0.75"
734-
/>
735-
<path
736-
d="M9 1V17"
737-
stroke="currentColor"
738-
strokeLinecap="round"
739-
strokeLinejoin="round"
740-
strokeWidth="2"
723+
d="M16.6668 0.5H3.3335C1.95516 0.5 0.833496 1.62167 0.833496 3V13C0.833496 14.3783 1.95516 15.5 3.3335 15.5H16.6668C18.0452 15.5 19.1668 14.3783 19.1668 13V3C19.1668 1.62167 18.0452 0.5 16.6668 0.5ZM2.50016 13V3C2.50016 2.54083 2.87433 2.16667 3.3335 2.16667H12.5002V13.8333H3.3335C2.87433 13.8333 2.50016 13.4592 2.50016 13Z"
724+
fill="#929292"
741725
/>
742726
</svg>
743727
),
728+
744729
//friends-Icon-for-now-lol
745730
friends: (props: IconProps) => (
746731
<svg

packages/ui/src/components/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727

2828
const SIDEBAR_COOKIE_NAME = "sidebar_state";
2929
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
30-
export const SIDEBAR_WIDTH = "20rem";
30+
export const SIDEBAR_WIDTH = "18rem";
3131
export const SIDEBAR_WIDTH_MOBILE = "18rem";
3232
export const SIDEBAR_WIDTH_ICON = "5rem";
3333
export const SIDEBAR_KEYBOARD_SHORTCUT = "b";

0 commit comments

Comments
 (0)