Skip to content

Commit d62320e

Browse files
committed
UI / Bug fixes
1 parent 618283a commit d62320e

20 files changed

+2172
-2601
lines changed

package-lock.json

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

package.json

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,77 +10,78 @@
1010
"generate": "prisma generate"
1111
},
1212
"dependencies": {
13-
"@clerk/backend": "^1.18.0",
14-
"@clerk/clerk-sdk-node": "^5.0.69",
15-
"@clerk/nextjs": "^6.5.0",
16-
"@emotion/react": "^11.13.5",
17-
"@emotion/styled": "^11.13.5",
18-
"@hookform/resolvers": "^3.9.1",
19-
"@prisma/client": "^5.22.0",
20-
"@radix-ui/react-accordion": "^1.2.1",
21-
"@radix-ui/react-alert-dialog": "^1.1.2",
22-
"@radix-ui/react-aspect-ratio": "^1.1.0",
23-
"@radix-ui/react-avatar": "^1.1.1",
24-
"@radix-ui/react-checkbox": "^1.1.2",
25-
"@radix-ui/react-collapsible": "^1.1.1",
26-
"@radix-ui/react-context-menu": "^2.2.2",
27-
"@radix-ui/react-dialog": "^1.1.4",
28-
"@radix-ui/react-dropdown-menu": "^2.1.2",
29-
"@radix-ui/react-hover-card": "^1.1.2",
30-
"@radix-ui/react-label": "^2.1.0",
31-
"@radix-ui/react-menubar": "^1.1.2",
32-
"@radix-ui/react-navigation-menu": "^1.2.3",
33-
"@radix-ui/react-popover": "^1.1.4",
34-
"@radix-ui/react-progress": "^1.1.0",
35-
"@radix-ui/react-radio-group": "^1.2.1",
36-
"@radix-ui/react-scroll-area": "^1.2.1",
37-
"@radix-ui/react-select": "^2.1.2",
38-
"@radix-ui/react-separator": "^1.1.0",
39-
"@radix-ui/react-slider": "^1.2.1",
40-
"@radix-ui/react-slot": "^1.1.0",
41-
"@radix-ui/react-switch": "^1.1.1",
42-
"@radix-ui/react-tabs": "^1.1.1",
43-
"@radix-ui/react-toast": "^1.2.2",
44-
"@radix-ui/react-toggle": "^1.1.0",
45-
"@radix-ui/react-toggle-group": "^1.1.0",
46-
"@radix-ui/react-tooltip": "^1.1.4",
47-
"@tanstack/react-table": "^8.20.5",
48-
"axios": "^1.7.7",
13+
"@clerk/backend": "^1.23.11",
14+
"@clerk/clerk-sdk-node": "^5.1.6",
15+
"@clerk/nextjs": "^6.11.0",
16+
"@emotion/react": "^11.14.0",
17+
"@emotion/styled": "^11.14.0",
18+
"@hookform/resolvers": "^3.10.0",
19+
"@prisma/client": "^6.3.1",
20+
"@radix-ui/react-accordion": "^1.2.2",
21+
"@radix-ui/react-alert-dialog": "^1.1.5",
22+
"@radix-ui/react-aspect-ratio": "^1.1.1",
23+
"@radix-ui/react-avatar": "^1.1.2",
24+
"@radix-ui/react-checkbox": "^1.1.3",
25+
"@radix-ui/react-collapsible": "^1.1.2",
26+
"@radix-ui/react-context-menu": "^2.2.5",
27+
"@radix-ui/react-dialog": "^1.1.5",
28+
"@radix-ui/react-dropdown-menu": "^2.1.5",
29+
"@radix-ui/react-hover-card": "^1.1.5",
30+
"@radix-ui/react-label": "^2.1.1",
31+
"@radix-ui/react-menubar": "^1.1.5",
32+
"@radix-ui/react-navigation-menu": "^1.2.4",
33+
"@radix-ui/react-popover": "^1.1.5",
34+
"@radix-ui/react-progress": "^1.1.1",
35+
"@radix-ui/react-radio-group": "^1.2.2",
36+
"@radix-ui/react-scroll-area": "^1.2.2",
37+
"@radix-ui/react-select": "^2.1.5",
38+
"@radix-ui/react-separator": "^1.1.1",
39+
"@radix-ui/react-slider": "^1.2.2",
40+
"@radix-ui/react-slot": "^1.1.1",
41+
"@radix-ui/react-switch": "^1.1.2",
42+
"@radix-ui/react-tabs": "^1.1.2",
43+
"@radix-ui/react-toast": "^1.2.5",
44+
"@radix-ui/react-toggle": "^1.1.1",
45+
"@radix-ui/react-toggle-group": "^1.1.1",
46+
"@radix-ui/react-tooltip": "^1.1.7",
47+
"@tailwindcss/postcss": "^4.0.3",
48+
"@tanstack/react-table": "^8.20.6",
49+
"axios": "^1.7.9",
4950
"bcryptjs": "^2.4.3",
50-
"class-variance-authority": "^0.7.0",
51+
"class-variance-authority": "^0.7.1",
5152
"clsx": "^2.1.1",
5253
"cmdk": "^1.0.4",
5354
"crypto-js": "^4.2.0",
5455
"date-fns": "^4.1.0",
5556
"favicon-fetch": "^1.0.0",
5657
"get-website-favicon": "^0.0.7",
57-
"lucide-react": "^0.460.0",
58-
"next": "^15.0.3",
59-
"next-themes": "^0.4.3",
60-
"react": "^18",
61-
"react-day-picker": "^9.3.2",
62-
"react-dom": "^18",
63-
"react-hook-form": "^7.53.2",
58+
"lucide-react": "^0.474.0",
59+
"next": "^15.1.6",
60+
"next-themes": "^0.4.4",
61+
"react": "^19",
62+
"react-day-picker": "^9.5.1",
63+
"react-dom": "^19",
64+
"react-hook-form": "^7.54.2",
6465
"react-hot-toast": "^2.5.1",
6566
"react-query": "^3.39.3",
6667
"react-resizable-panels": "^2.1.7",
67-
"sonner": "^1.7.0",
68-
"tailwind-merge": "^2.5.4",
68+
"sonner": "^1.7.4",
69+
"tailwind-merge": "^3.0.1",
6970
"tailwindcss-animate": "^1.0.7",
70-
"vaul": "^1.1.1",
71+
"vaul": "^1.1.2",
7172
"zod": "^3.24.1",
72-
"zustand": "^5.0.1"
73+
"zustand": "^5.0.3"
7374
},
7475
"devDependencies": {
7576
"@types/bcryptjs": "^2.4.6",
7677
"@types/crypto-js": "^4.2.2",
7778
"@types/node": "^22",
78-
"@types/react": "^18",
79-
"@types/react-dom": "^18",
79+
"@types/react": "^19",
80+
"@types/react-dom": "^19",
8081
"eslint": "^9",
81-
"eslint-config-next": "15.0.3",
82+
"eslint-config-next": "15.1.6",
8283
"postcss": "^8",
83-
"tailwindcss": "^3.4.15",
84+
"tailwindcss": "^4.0.3",
8485
"typescript": "^5"
8586
}
8687
}

postcss.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('postcss-load-config').Config} */
22
const config = {
33
plugins: {
4-
tailwindcss: {},
4+
"@tailwindcss/postcss": {},
55
},
66
};
77

src/app/(main)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Icons } from "@/components/ui/icons";
2-
import { VaultPage } from "@/components/ui/password-manager";
2+
import {VaultPage} from "@/components/vault/vault-page";
33
import prismadb from "@/lib/prismadb";
44
import { RedirectToSignIn, SignedOut } from "@clerk/nextjs";
55
import { auth } from "@clerk/nextjs/server";

src/app/actions.ts

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
"use server";
22

33
import prismadb from "@/lib/prismadb";
4-
import { currentUser } from "@clerk/nextjs/server";
4+
import { auth, currentUser } from "@clerk/nextjs/server";
55

66
export async function updatePasswordItem(
77
id: string,
88
newUsername: string,
99
newWebsite: string,
1010
newPassword: string
1111
) {
12-
const clerkUser = await currentUser();
12+
const { userId } = await auth()
13+
14+
if (!userId) {
15+
throw new Error("Not authenticated");
16+
}
1317

1418
const user = await prismadb.user.findUnique({
1519
where: {
16-
id: clerkUser?.id,
20+
id: userId,
1721
},
1822
include: {
1923
passwordItems: true,
@@ -45,11 +49,15 @@ export async function updatePasswordItem(
4549
}
4650

4751
export async function deletePasswordItem(id: string) {
48-
const clerkUser = await currentUser();
52+
const { userId } = await auth()
53+
54+
if (!userId) {
55+
throw new Error("Not authenticated");
56+
}
4957

5058
const user = await prismadb.user.findUnique({
5159
where: {
52-
id: clerkUser?.id,
60+
id: userId,
5361
},
5462
include: {
5563
passwordItems: true,
@@ -80,11 +88,15 @@ export async function createPasswordItem(
8088
website: string,
8189
password: string
8290
) {
83-
const clerkUser = await currentUser();
91+
const { userId } = await auth()
92+
93+
if (!userId) {
94+
throw new Error("Not authenticated");
95+
}
8496

8597
const user = await prismadb.user.findUnique({
8698
where: {
87-
id: clerkUser?.id,
99+
id: userId,
88100
},
89101
include: {
90102
passwordItems: true,
@@ -110,12 +122,18 @@ export async function createPasswordItem(
110122
}
111123

112124
export async function instantiateVault() {
113-
const clerkUser = await currentUser();
125+
const { userId } = await auth()
126+
127+
if (!userId) {
128+
throw new Error("Not authenticated");
129+
}
130+
131+
const user = await currentUser()
114132

115133
const vault = await prismadb.user.create({
116134
data: {
117-
id: clerkUser?.id,
118-
username: clerkUser?.username!,
135+
id: userId,
136+
username: user?.username!,
119137
},
120138
include: {
121139
passwordItems: true,

src/app/globals.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";
42

53
@layer base {
64
:root {
@@ -95,7 +93,7 @@
9593
}
9694

9795
* {
98-
@apply border-border;
96+
border-color: hsl(var(--border) / var(--tw-border-opacity, 1));
9997
}
10098

10199
@supports (font-variation-settings: normal) {
@@ -106,6 +104,7 @@
106104
}
107105

108106
body {
109-
@apply bg-background text-foreground;
107+
background-color: hsl(var(--background));
108+
color: hsl(var(--foreground));
110109
}
111110
}

src/app/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
22
import "./globals.css";
33
import { ClerkProvider } from "@clerk/nextjs";
44
import { Toaster } from "react-hot-toast";
5+
import { TooltipProvider } from "@/components/ui/tooltip";
56

67
export const metadata: Metadata = {
78
title: "LockScript - Vault",
@@ -17,8 +18,10 @@ export default function RootLayout({
1718
<html lang="en">
1819
<ClerkProvider>
1920
<body>
20-
<Toaster />
21-
<main>{children}</main>
21+
<TooltipProvider>
22+
<Toaster />
23+
<main>{children}</main>
24+
</TooltipProvider>
2225
</body>
2326
</ClerkProvider>
2427
</html>

0 commit comments

Comments
 (0)