-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add primary and secondary color selection
- Loading branch information
1 parent
158d95d
commit 882f781
Showing
9 changed files
with
132 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "User" ADD COLUMN "primary" STRING NOT NULL DEFAULT 'fuchsia'; | ||
ALTER TABLE "User" ADD COLUMN "secondary" STRING NOT NULL DEFAULT 'violet'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<div class="z-[-10] fixed top-0 opacity-20 w-full h-screen from-primary to-50% bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))]"></div> | ||
<div class="z-[-10] fixed top-0 opacity-20 w-full h-screen from-primary to-50% bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))]"></div> | ||
<div class="z-[-10] fixed top-0 opacity-20 w-full h-screen opacity-10 from-primary-color to-50% bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))]"></div> | ||
<div class="z-[-10] fixed top-0 opacity-20 w-full h-screen opacity-10 from-primary-color to-50% bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))]"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import prisma from "$lib/prisma"; | ||
import { json } from "@sveltejs/kit"; | ||
|
||
export async function POST({ event, request }) { | ||
const { tier, color, userId } = await request.json(); | ||
await prisma.user.update({ where: { id: userId }, data: { [tier]: color } }); | ||
return json({ success: true }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters