diff --git a/.eslintrc.cjs b/.eslintrc.js similarity index 93% rename from .eslintrc.cjs rename to .eslintrc.js index 8bcd21c..ce79aee 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.js @@ -2,12 +2,7 @@ const fs = require("fs") module.exports = { - extends: [ - "next", - "prettier", - "plugin:@typescript-eslint/recommended", - "plugin:tailwindcss/recommended", - ], + extends: ["next", "prettier", "plugin:@typescript-eslint/recommended", "plugin:tailwindcss/recommended"], parserOptions: { babelOptions: { presets: [require.resolve("next/babel")], @@ -73,4 +68,4 @@ function getDirectories(path) { return fs.readdirSync(path).filter(function (file) { return fs.statSync(path + "/" + file).isDirectory() }) -} \ No newline at end of file +} diff --git a/prettier.config.js b/.prettierrc.js similarity index 100% rename from prettier.config.js rename to .prettierrc.js diff --git a/app/layout.tsx b/app/layout.tsx index bee4826..5c80e96 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,7 +3,7 @@ import { ThemeProvider } from "@/components/theme-provider" import "@/styles/globals.css" export const metadata: Metadata = { - title: "iCover", + title: "iCover - Apple-Style Cover Creator", description: "Design a captivating and visually appealing cover artwork for your Apple Music playlist to engage listeners and convey the theme or mood of the curated songs.", keywords: [ @@ -50,7 +50,7 @@ export const metadata: Metadata = { ], authors: [{ name: "Boostvolt", url: "https://github.com/boostvolt" }], openGraph: { - title: "iCover", + title: "iCover - Apple-Style Cover Creator", description: "Design a captivating and visually appealing cover artwork for your Apple Music playlist to engage listeners and convey the theme or mood of the curated songs.", url: "https://icover.vercel.app", diff --git a/app/page.tsx b/app/page.tsx index 0339b2f..d7824ad 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,6 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod" import html2canvas from "html2canvas" import { Cog, Info } from "lucide-react" import Image from "next/image" +import { useEffect } from "react" import { useForm } from "react-hook-form" import * as z from "zod" import AppleMusic from "@/components/icons/apple-music" @@ -36,6 +37,7 @@ const formSchema = z.object({ subTitle: z.string(), footer: z.string(), gradient: z.string(), + color: z.string(), }) export default function Home() { @@ -48,8 +50,11 @@ export default function Home() { subTitle: "", footer: "", gradient: "0", + color: "", }), }) + const { dirtyFields } = form.formState + const isEdited = dirtyFields.bigTitle ?? dirtyFields.subTitle ?? dirtyFields.footer const handleDownload = () => { const element = document.getElementById("coverElement") @@ -63,6 +68,10 @@ export default function Home() { } } + useEffect(() => { + form.setValue("color", "") + }, [form.watch("gradient")]) + return (