Skip to content

Commit 618283a

Browse files
committed
Build fixes / styling improvements
1 parent 72730c2 commit 618283a

File tree

9 files changed

+19
-205
lines changed

9 files changed

+19
-205
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ LockScript Vault is an open-source secure vault for passwords, cards, notes, and
88
- Typescript
99
- ShadCN
1010
- Prisma
11+
- Zod
1112

12-
## APIs
13-
- `/api/vault`
14-
- Methods:
15-
- **POST** : JSON Body: {`key`}
13+
## How to contribute
14+
15+
We accept contributions from the community, but you must follow some rules:
16+
17+
1. Document your changes.
18+
2. Specifically state ANY new dependencies you have added.
19+
3. Test your changes.

branch.pxydb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
final
1+
final

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"generate": "prisma generate"
1011
},
1112
"dependencies": {
1213
"@clerk/backend": "^1.18.0",

src/app/actions.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use server";
22

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

66
export async function updatePasswordItem(
77
id: string,
@@ -82,13 +82,9 @@ export async function createPasswordItem(
8282
) {
8383
const clerkUser = await currentUser();
8484

85-
if (!clerkUser) {
86-
throw new Error("User not authenticated");
87-
}
88-
8985
const user = await prismadb.user.findUnique({
9086
where: {
91-
id: clerkUser.id,
87+
id: clerkUser?.id,
9288
},
9389
include: {
9490
passwordItems: true,

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

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

src/app/api/passwords/route.ts

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

src/app/api/vaults/route.ts

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

src/components/ui/edit-password-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function EditPasswordDialog({ isOpen, onClose, entry }: EditPasswordDialo
8282
<DialogTitle>{entry ? 'Edit Password Entry' : 'Add New Password Entry'}</DialogTitle>
8383
</div>
8484
<DialogDescription>
85-
Make changes to your password entry here. Click save when you're done.
85+
Make changes to your password entry here. Click save when you&apos;re done.
8686
</DialogDescription>
8787
</DialogHeader>
8888
<div className="grid gap-4 py-4">

src/components/ui/password-manager.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const VaultPage: React.FC<VaultPageProps> = ({ user }) => {
157157
<nav className="space-y-2">
158158
<Button
159159
variant="ghost"
160-
className="w-full justify-start gap-3 rounded-xl px-4 py-3 text-rose-600 transition-all hover:bg-rose-100 hover:text-rose-700"
160+
className={cn("w-full justify-start gap-3 rounded-xl px-4 py-3 transition-all hover:bg-rose-100 hover:text-rose-700", activeTab === "passwords" && "bg-rose-50 text-rose-700")}
161161
onClick={() => {
162162
setActiveTab("passwords");
163163
setIsSidebarOpen(false);
@@ -168,7 +168,7 @@ export const VaultPage: React.FC<VaultPageProps> = ({ user }) => {
168168
</Button>
169169
<Button
170170
variant="ghost"
171-
className="w-full justify-start gap-3 rounded-xl px-4 py-3 text-gray-600 transition-all hover:bg-rose-50 hover:text-rose-600"
171+
className={cn("w-full justify-start gap-3 rounded-xl px-4 py-3 transition-all hover:bg-rose-100 hover:text-rose-700", activeTab === "notes" && "bg-rose-50 text-rose-700")}
172172
onClick={() => {
173173
setActiveTab("notes");
174174
setIsSidebarOpen(false);
@@ -179,7 +179,7 @@ export const VaultPage: React.FC<VaultPageProps> = ({ user }) => {
179179
</Button>
180180
<Button
181181
variant="ghost"
182-
className="w-full justify-start gap-3 rounded-xl px-4 py-3 text-gray-600 transition-all hover:bg-rose-50 hover:text-rose-600"
182+
className={cn("w-full justify-start gap-3 rounded-xl px-4 py-3 transition-all hover:bg-rose-100 hover:text-rose-700", activeTab === "pins" && "bg-rose-50 text-rose-700")}
183183
onClick={() => {
184184
setActiveTab("pins");
185185
setIsSidebarOpen(false);
@@ -190,7 +190,7 @@ export const VaultPage: React.FC<VaultPageProps> = ({ user }) => {
190190
</Button>
191191
<Button
192192
variant="ghost"
193-
className="w-full justify-start gap-3 rounded-xl px-4 py-3 text-gray-600 transition-all hover:bg-rose-50 hover:text-rose-600"
193+
className={cn("w-full justify-start gap-3 rounded-xl px-4 py-3 transition-all hover:bg-rose-100 hover:text-rose-700", activeTab === "cards" && "bg-rose-50 text-rose-700")}
194194
onClick={() => {
195195
setActiveTab("cards");
196196
setIsSidebarOpen(false);
@@ -203,7 +203,7 @@ export const VaultPage: React.FC<VaultPageProps> = ({ user }) => {
203203
<div className="mt-auto pt-6">
204204
<Button
205205
variant="ghost"
206-
className="w-full justify-start gap-3 rounded-xl px-4 py-3 text-gray-600 transition-all hover:bg-rose-50 hover:text-rose-600"
206+
className={cn("w-full justify-start gap-3 rounded-xl px-4 py-3 transition-all hover:bg-rose-100 hover:text-rose-700", activeTab === "settings" && "bg-rose-50 text-rose-700")}
207207
>
208208
<Settings className="h-5 w-5" />
209209
Settings

0 commit comments

Comments
 (0)