|
1 | 1 | import { Select, SelectItem } from "@nextui-org/select"; |
2 | 2 | import { Button } from "@nextui-org/button"; |
3 | 3 | import { Input } from "@nextui-org/input"; |
| 4 | +import { useTheme } from "next-themes"; |
| 5 | +import { Switch } from "@nextui-org/switch"; |
| 6 | +import { FiDownload } from "react-icons/fi"; |
4 | 7 |
|
5 | 8 | import useIndex, { LICENSE_TYPES } from "@/hooks/useIndex"; |
| 9 | +import { MoonFilledIcon, SunFilledIcon } from "@/components/icons"; |
6 | 10 |
|
7 | 11 | export default function IndexPage() { |
| 12 | + const { theme, setTheme } = useTheme(); |
8 | 13 | const { formData, setFormData, handleSubmit } = useIndex(); |
9 | 14 |
|
| 15 | + const darkBgColor = |
| 16 | + "bg-gradient-to-b from-indigo-950 via-purple-950 to-blue-950"; |
| 17 | + const lightBgColor = "bg-gradient-to-b from-gray-100 via-gray-50 to-gray-200"; |
| 18 | + |
10 | 19 | return ( |
11 | | - <div className="min-h-screen py-12"> |
12 | | - <div className="max-w-md mx-auto p-8"> |
13 | | - <h1 className="text-3xl font-bold text-center mb-8"> |
14 | | - MobaXterm Keygen |
15 | | - </h1> |
| 20 | + <div |
| 21 | + className={`min-h-screen py-12 ${theme === "dark" ? darkBgColor : lightBgColor}`} |
| 22 | + > |
| 23 | + <div className="max-w-md mx-auto p-8 rounded-xl backdrop-blur-lg bg-white/10 dark:bg-white/10 light:bg-black/10 shadow-2xl border border-gray-700/50 dark:border-gray-700/50 light:border-gray-300/50"> |
| 24 | + <div className="flex justify-between items-center mb-8"> |
| 25 | + <h1 |
| 26 | + className={`text-3xl font- ${theme === "dark" ? "text-white" : "text-black"}`} |
| 27 | + > |
| 28 | + MobaXterm Keygen |
| 29 | + </h1> |
| 30 | + <Switch |
| 31 | + defaultSelected={theme === "dark"} |
| 32 | + size="lg" |
| 33 | + color="secondary" |
| 34 | + startContent={<SunFilledIcon className="h-6 w-6" />} |
| 35 | + endContent={<MoonFilledIcon className="h-6 w-6" />} |
| 36 | + onChange={() => setTheme(theme === "dark" ? "light" : "dark")} |
| 37 | + /> |
| 38 | + </div> |
16 | 39 |
|
17 | 40 | <form className="space-y-6" onSubmit={handleSubmit}> |
18 | 41 | <Select |
@@ -68,6 +91,7 @@ export default function IndexPage() { |
68 | 91 | type="submit" |
69 | 92 | className="w-full" |
70 | 93 | > |
| 94 | + <FiDownload className="h-4 w-4" /> |
71 | 95 | Download Key |
72 | 96 | </Button> |
73 | 97 | </form> |
|
0 commit comments