Skip to content

Commit 16a4972

Browse files
committed
Updates / bug fixes / styling fixes / theme fixes
1 parent 28d6d72 commit 16a4972

20 files changed

Lines changed: 1164 additions & 997 deletions

package-lock.json

Lines changed: 730 additions & 725 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@clerk/clerk-sdk-node": "^5.0.46",
13-
"@clerk/nextjs": "^5.1.3",
12+
"@clerk/backend": "^1.16.0",
13+
"@clerk/clerk-sdk-node": "^5.0.61",
14+
"@clerk/nextjs": "^6.3.0",
1415
"@emotion/react": "^11.11.4",
1516
"@emotion/styled": "^11.11.5",
1617
"@hookform/resolvers": "^3.9.0",
@@ -51,7 +52,7 @@
5152
"crypto-js": "^4.2.0",
5253
"date-fns": "^3.6.0",
5354
"lucide-react": "^0.383.0",
54-
"next": "^14.2.13",
55+
"next": "^15.0.3",
5556
"next-themes": "^0.3.0",
5657
"react": "^18",
5758
"react-day-picker": "^8.10.1",

src/app/(auth)/layout.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/app/(main)/layout.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { ClerkProvider } from "@clerk/nextjs";
2+
import type { Metadata } from "next";
3+
import { Montserrat } from "next/font/google";
4+
import "../globals.css";
5+
import { ModalProvider } from "@/providers/modal-provider";
6+
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
7+
import { AppSidebar } from "@/components/ui/app-sidebar";
8+
import { ToastProvider } from "@/providers/toast-provider";
9+
10+
const inter = Montserrat({ subsets: ["latin"] });
11+
12+
export const metadata: Metadata = {
13+
title: "LockScript - Vault",
14+
description: "Online security, made simple.",
15+
};
16+
17+
export default function RootLayout({
18+
children,
19+
}: Readonly<{
20+
children: React.ReactNode;
21+
}>) {
22+
return (
23+
<SidebarProvider>
24+
<ToastProvider />
25+
<ModalProvider />
26+
<AppSidebar />
27+
<main>
28+
<SidebarTrigger />
29+
{children}
30+
</main>
31+
</SidebarProvider>
32+
);
33+
}
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
import { Icons } from "@/components/ui/icons";
12
import VaultPage from "@/components/ui/vault/vault";
23
import prismadb from "@/lib/prismadb";
3-
import {auth} from "@clerk/nextjs/server";
4-
import {Loader} from "lucide-react";
4+
import { auth } from "@clerk/nextjs/server";
5+
import { Loader } from "lucide-react";
56

67
const Page = async () => {
7-
const { userId } = auth();
8+
const { userId } = await auth();
89

910
if (!userId) {
1011
return (
1112
<div className="h-full w-full flex justify-center items-center">
13+
<Icons.logo />
1214
<Loader className="text-black animate-spin" />
1315
</div>
14-
)
16+
);
1517
}
1618

1719
const user = await prismadb.user.findUnique({
@@ -26,11 +28,7 @@ const Page = async () => {
2628
},
2729
});
2830

29-
return (
30-
<>
31-
<VaultPage user={user} />
32-
</>
33-
);
31+
return <VaultPage user={user} />;
3432
};
3533

3634
export default Page;

src/app/api/passwords/[passwordId]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function DELETE(
77
{ params }: { params: { passwordId: string } }
88
) {
99
try {
10-
const { userId } = auth();
10+
const { userId } = await auth();
1111

1212
if (!userId) {
1313
return new NextResponse("Unauthenticated", { status: 401 });

src/app/api/passwords/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {NextResponse} from "next/server";
44

55
export async function POST(req: Request) {
66
try {
7-
const { userId } = auth();
7+
const { userId } = await auth();
88
const body = await req.json();
99

1010
const { website, username, password } = body;

src/app/api/vaults/route.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import prismadb from "@/lib/prismadb";
2-
import { auth, clerkClient } from "@clerk/nextjs/server";
2+
import { auth, } from "@clerk/nextjs/server";
33
import { NextResponse } from "next/server";
4+
import { createClerkClient } from '@clerk/backend'
5+
6+
const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY })
47

58
export async function POST(req: Request) {
69
try {
7-
const { userId } = auth();
10+
const { userId } = await auth();
811

912
if (!userId) {
1013
return new NextResponse("Unauthenticated", { status: 401 });
@@ -40,4 +43,4 @@ export async function POST(req: Request) {
4043
console.error(error);
4144
return new Response("Internal Server Error", { status: 500 });
4245
}
43-
}
46+
}

src/app/globals.css

Lines changed: 103 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,111 @@
11
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
4-
5-
@layer base {
6-
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 222.2 84% 4.9%;
9-
10-
--card: 0 0% 100%;
11-
--card-foreground: 222.2 84% 4.9%;
12-
13-
--popover: 0 0% 100%;
14-
--popover-foreground: 222.2 84% 4.9%;
15-
16-
--primary: 222.2 47.4% 11.2%;
17-
--primary-foreground: 210 40% 98%;
18-
19-
--secondary: 210 40% 96.1%;
20-
--secondary-foreground: 222.2 47.4% 11.2%;
21-
22-
--muted: 210 40% 96.1%;
23-
--muted-foreground: 215.4 16.3% 46.9%;
24-
25-
--accent: 210 40% 96.1%;
26-
--accent-foreground: 222.2 47.4% 11.2%;
27-
28-
--destructive: 0 84.2% 60.2%;
29-
--destructive-foreground: 210 40% 98%;
30-
31-
--border: 214.3 31.8% 91.4%;
32-
--input: 214.3 31.8% 91.4%;
33-
--ring: 222.2 84% 4.9%;
34-
35-
--radius: 0.5rem;
36-
37-
--sidebar-background: 0 0% 98%;
38-
39-
--sidebar-foreground: 240 5.3% 26.1%;
40-
41-
--sidebar-primary: 240 5.9% 10%;
42-
43-
--sidebar-primary-foreground: 0 0% 98%;
44-
45-
--sidebar-accent: 240 4.8% 95.9%;
46-
47-
--sidebar-accent-foreground: 240 5.9% 10%;
48-
49-
--sidebar-border: 220 13% 91%;
50-
51-
--sidebar-ring: 217.2 91.2% 59.8%;
52-
}
53-
54-
.dark {
55-
--background: 222.2 84% 4.9%;
56-
--foreground: 210 40% 98%;
57-
58-
--card: 222.2 84% 4.9%;
59-
--card-foreground: 210 40% 98%;
60-
61-
--popover: 222.2 84% 4.9%;
62-
--popover-foreground: 210 40% 98%;
63-
64-
--primary: 210 40% 98%;
65-
--primary-foreground: 222.2 47.4% 11.2%;
66-
67-
--secondary: 217.2 32.6% 17.5%;
68-
--secondary-foreground: 210 40% 98%;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 222.2 84% 4.9%;
9+
--card: 0 0% 100%;
10+
--card-foreground: 222.2 84% 4.9%;
11+
--popover: 0 0% 100%;
12+
--popover-foreground: 222.2 84% 4.9%;
13+
--primary: 349 100% 55.5%;
14+
--primary-foreground: 210 40% 98%;
15+
--secondary: 210 40% 96.1%;
16+
--secondary-foreground: 349 100% 55.5%;
17+
--muted: 210 40% 96.1%;
18+
--muted-foreground: 215.4 16.3% 46.9%;
19+
--accent: 210 40% 96.1%;
20+
--accent-foreground: 349 100% 55.5%;
21+
--destructive: 0 84.2% 60.2%;
22+
--destructive-foreground: 210 40% 98%;
23+
--border: 214.3 31.8% 91.4%;
24+
--input: 214.3 31.8% 91.4%;
25+
--ring: 222.2 84% 4.9%;
26+
--radius: 0.5rem;
27+
--chart-1: 12 76% 61%;
28+
--chart-2: 173 58% 39%;
29+
--chart-3: 197 37% 24%;
30+
--chart-4: 43 74% 66%;
31+
--chart-5: 27 87% 67%;
32+
--sidebar-background: 0 0% 98%;
33+
--sidebar-foreground: 240 5.3% 26.1%;
34+
--sidebar-primary: 240 5.9% 10%;
35+
--sidebar-primary-foreground: 0 0% 98%;
36+
--sidebar-accent: 240 4.8% 95.9%;
37+
--sidebar-accent-foreground: 240 5.9% 10%;
38+
--sidebar-border: 220 13% 91%;
39+
--sidebar-ring: 217.2 91.2% 59.8%;
40+
}
6941

70-
--muted: 217.2 32.6% 17.5%;
71-
--muted-foreground: 215 20.2% 65.1%;
42+
.dark {
43+
--background: 240 10% 3.9%;
44+
--foreground: 0 0% 98%;
45+
--card: 240 10% 3.9%;
46+
--card-foreground: 0 0% 98%;
47+
--popover: 240 10% 3.9%;
48+
--popover-foreground: 0 0% 98%;
49+
--primary: 349 100% 55.5%;
50+
--primary-foreground: 240 5.9% 10%;
51+
--secondary: 240 3.7% 15.9%;
52+
--secondary-foreground: 349 100% 55.5%;
53+
--muted: 240 3.7% 15.9%;
54+
--muted-foreground: 240 5% 64.9%;
55+
--accent: 240 3.7% 15.9%;
56+
--accent-foreground: 349 100% 55.5%;
57+
--destructive: 0 62.8% 30.6%;
58+
--destructive-foreground: 0 85.7% 97.3%;
59+
--border: 240 3.7% 15.9%;
60+
--input: 240 3.7% 15.9%;
61+
--ring: 240 4.9% 83.9%;
62+
--chart-1: 220 70% 50%;
63+
--chart-2: 160 60% 45%;
64+
--chart-3: 30 80% 55%;
65+
--chart-4: 280 65% 60%;
66+
--chart-5: 340 75% 55%;
67+
--sidebar-background: 240 5.9% 10%;
68+
--sidebar-foreground: 240 4.8% 95.9%;
69+
--sidebar-primary: 224.3 76.3% 48%;
70+
--sidebar-primary-foreground: 0 0% 100%;
71+
--sidebar-accent: 240 3.7% 15.9%;
72+
--sidebar-accent-foreground: 240 4.8% 95.9%;
73+
--sidebar-border: 240 3.7% 15.9%;
74+
--sidebar-ring: 217.2 91.2% 59.8%;
75+
}
76+
}
77+
78+
@layer base {
79+
:root {
80+
--chart-1: 349 100% 55.5%;
81+
--chart-2: 0 0 90;
82+
--chart-3: 0 0 83;
83+
--chart-4: 0 0 64;
84+
--chart-5: 27 87% 67%;
85+
font-family: Inter, sans-serif;
86+
font-feature-settings: "cv02", "cv03", "cv04", "cv11", "salt";
87+
}
7288

73-
--accent: 217.2 32.6% 17.5%;
74-
--accent-foreground: 210 40% 98%;
89+
.dark {
90+
--chart-1: 220 70% 50%;
91+
--chart-2: 160 60% 45%;
92+
--chart-3: 30 80% 55%;
93+
--chart-4: 280 65% 60%;
94+
--chart-5: 340 75% 55%;
95+
}
7596

76-
--destructive: 0 62.8% 30.6%;
77-
--destructive-foreground: 210 40% 98%;
97+
* {
98+
@apply border-border;
99+
}
78100

79-
--border: 217.2 32.6% 17.5%;
80-
--input: 217.2 32.6% 17.5%;
81-
--ring: 212.7 26.8% 83.9%;
82-
--sidebar-background: 240 5.9% 10%;
83-
--sidebar-foreground: 240 4.8% 95.9%;
84-
--sidebar-primary: 224.3 76.3% 48%;
85-
--sidebar-primary-foreground: 0 0% 100%;
86-
--sidebar-accent: 240 3.7% 15.9%;
87-
--sidebar-accent-foreground: 240 4.8% 95.9%;
88-
--sidebar-border: 240 3.7% 15.9%;
89-
--sidebar-ring: 217.2 91.2% 59.8%;
101+
@supports (font-variation-settings: normal) {
102+
:root {
103+
font-family: InterVariable, sans-serif;
104+
font-feature-settings: "cv02", "cv03", "cv04", "cv11", "salt";
90105
}
91106
}
92107

93-
@layer base {
94-
* {
95-
@apply border-border;
96-
}
97-
body {
98-
@apply bg-background text-foreground;
99-
}
100-
}
108+
body {
109+
@apply bg-background text-foreground;
110+
}
111+
}

0 commit comments

Comments
 (0)