diff --git a/.eslintrc b/.eslintrc index 1471db4..b5cb380 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ -{ - "extends": ["next", "next/core-web-vitals"], - "rules": { - "react/no-unescaped-entities": "off", - "@next/next/no-page-custom-font": "off" - } -} +{ + "extends": ["next", "next/core-web-vitals"], + "rules": { + "react/no-unescaped-entities": "off", + "@next/next/no-page-custom-font": "off" + } +} diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..72718d5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,20 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/yarn.yml b/.github/workflows/yarn.yml index 96afb47..714a32c 100644 --- a/.github/workflows/yarn.yml +++ b/.github/workflows/yarn.yml @@ -1,14 +1,14 @@ -name: CI -on: [push] -jobs: - build: - name: Build Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: borales/actions-yarn@v2.3.0 - with: - cmd: install # will run `yarn install` command - - uses: borales/actions-yarn@v2.3.0 - with: - cmd: build # will run `yarn build` command +name: CI +on: [push] +jobs: + build: + name: Build Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: install # will run `yarn install` command + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: build # will run `yarn build` command diff --git a/.gitignore b/.gitignore index 9f5aeb6..81380c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,37 +1,37 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -package-lock.json -yarn.lock -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +package-lock.json +yarn.lock +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b66410..ca6fe06 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ -{ - "git.ignoreLimitWarning": true +{ + "git.ignoreLimitWarning": true } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fef2fa..d0d4d92 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull request process - -To contribute to the repository, first make create an issue describing what you will be doing, then fork the repository, make your appropriate changes, then commit. Afterwards, you can make a pull request and (if it passes tests) we will merge it into the main branch - +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull request process + +To contribute to the repository, first make create an issue describing what you will be doing, then fork the repository, make your appropriate changes, then commit. Afterwards, you can make a pull request and (if it passes tests) we will merge it into the main branch + diff --git a/LICENSE b/LICENSE index 6b38416..fe8a10e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2021 Night Kaly - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2021 Night Kaly + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index f17dd5b..2645e1e 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,62 @@ - -# Cath.gq - -Cath.gq is the dashboard for its parent project, [Cath.exe](https://github.com/night0721/cath.exe) - - -## Bugs And Feature Requests - -If there is a bug you would wish to report, open a new **issue** and label it as **bug**; these will be high priority changes! If there is a feature you would like to see implemented, open a new **issue** and mark it as an **enhancement**; we'll make sure to get to these! - - -## Run Locally - -Clone the project - -```bash - git clone https://github.com/night0721/cath.gq.git -``` - -Go to the project directory - -```bash - cd cath.gq -``` - -Install dependencies - -```bash - yarn install -``` - -Configure environment variables - -.env example -``` - DISCORD_ID= - DISCORD_SECRET= - DATABASE_URL= -``` - -Start the server - -```bash - npm run dev -``` - - -## License - -[MIT](https://choosealicense.com/licenses/mit/) - - -## Demo - -[Live](https://cath.gq) - - -## Authors - -- [@qt-coder](https://www.github.com/qt-coder) - - + +# Cath.gq + +Cath.gq is the dashboard for its parent project, [Cath.exe](https://github.com/night0721/cath.exe) + + +## Bugs And Feature Requests + +If there is a bug you would wish to report, open a new **issue** and label it as **bug**; these will be high priority changes! If there is a feature you would like to see implemented, open a new **issue** and mark it as an **enhancement**; we'll make sure to get to these! + + +## Run Locally + +Clone the project + +```bash + git clone https://github.com/night0721/cath.gq.git +``` + +Go to the project directory + +```bash + cd cath.gq +``` + +Install dependencies + +```bash + yarn install +``` + +Configure environment variables + +.env example +``` + DISCORD_ID= + DISCORD_SECRET= + DATABASE_URL= +``` + +Start the server + +```bash + npm run dev +``` + + +## License + +[MIT](https://choosealicense.com/licenses/mit/) + + +## Demo + +[Live](https://cath.gq) + + +## Authors + +- [@qt-coder](https://www.github.com/qt-coder) + + diff --git a/chakra_config/theme.js b/chakra_config/theme.js index d389c5f..85fb62b 100644 --- a/chakra_config/theme.js +++ b/chakra_config/theme.js @@ -1,7 +1,7 @@ -import { extendTheme, ThemeConfig } from "@chakra-ui/react"; -const config = { - initialColorMode: "dark", - useSystemColorMode: false, -}; -const theme = extendTheme({ config }); -export default theme; +import { extendTheme, ThemeConfig } from "@chakra-ui/react"; +const config = { + initialColorMode: "dark", + useSystemColorMode: false, +}; +const theme = extendTheme({ config }); +export default theme; diff --git a/components/AuthButton.js b/components/AuthButton.js index b40db18..459be09 100644 --- a/components/AuthButton.js +++ b/components/AuthButton.js @@ -1,47 +1,47 @@ -import { signIn, signOut, useSession } from "next-auth/client"; -import { Button } from "@chakra-ui/react"; - -export default function Page() { - const [session, loading] = useSession(); - - return ( - <> - {!session && ( - <> - - - )} - {session && ( - <> - - - )} - - ); -} +import { signIn, signOut, useSession } from "next-auth/client"; +import { Button } from "@chakra-ui/react"; + +export default function Page() { + const [session, loading] = useSession(); + + return ( + <> + {!session && ( + <> + + + )} + {session && ( + <> + + + )} + + ); +} diff --git a/components/CTA.js b/components/CTA.js index bb36201..e1db6e6 100644 --- a/components/CTA.js +++ b/components/CTA.js @@ -1,31 +1,31 @@ -import { Box, Button, Heading, Text } from "@chakra-ui/react"; -import * as React from "react"; - -export const CTA = () => ( - - - - Convinced? - - - Start using Cath.exe in your servers now - - - - -); +import { Box, Button, Heading, Text } from "@chakra-ui/react"; +import * as React from "react"; + +export const CTA = () => ( + + + + Convinced? + + + Start using Cath.exe in your servers now + + + + +); diff --git a/components/Card.js b/components/Card.js index 8a86091..e659c2e 100644 --- a/components/Card.js +++ b/components/Card.js @@ -1,35 +1,35 @@ -import React from "react"; -import Link from "next/link"; -import { Text, Flex, Button } from "@chakra-ui/react"; -import { motion } from "framer-motion"; -const MotionFlex = motion(Flex); -const item = { - hidden: { y: 20, opacity: 0 }, - visible: { - y: 0, - opacity: 1, - }, -}; -export default function Card({ title, desc, link }) { - return ( - - - {title} - - {desc} - - - - - ); -} +import React from "react"; +import Link from "next/link"; +import { Text, Flex, Button } from "@chakra-ui/react"; +import { motion } from "framer-motion"; +const MotionFlex = motion(Flex); +const item = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + }, +}; +export default function Card({ title, desc, link }) { + return ( + + + {title} + + {desc} + + + + + ); +} diff --git a/components/Features/Feature.js b/components/Features/Feature.js index d15512b..e1ed2b8 100644 --- a/components/Features/Feature.js +++ b/components/Features/Feature.js @@ -1,20 +1,20 @@ -import { Box, Stack, Text, useColorModeValue as mode } from "@chakra-ui/react"; -import * as React from "react"; - -export const Feature = props => { - const { title, children, icon } = props; - return ( - - {icon} - - - {title} - - {children} - - - ); -}; +import { Box, Stack, Text, useColorModeValue as mode } from "@chakra-ui/react"; +import * as React from "react"; + +export const Feature = props => { + const { title, children, icon } = props; + return ( + + {icon} + + + {title} + + {children} + + + ); +}; diff --git a/components/Features/Features.js b/components/Features/Features.js index 39fcace..e284fab 100644 --- a/components/Features/Features.js +++ b/components/Features/Features.js @@ -1,35 +1,35 @@ -import { Box, SimpleGrid } from "@chakra-ui/react"; -import * as React from "react"; -import { - FcDoughnutChart, - FcMultipleDevices, - FcPrivacy, - FcTimeline, -} from "react-icons/fc"; -import { Feature } from "./Feature"; - -export const Features = () => ( - - - }> - Cath will never leak any of your information. Ever. All your data is - stored securely on our side. - - }> - Cath is constantly being updated and worked on. Bugs and features, you - name them, we do them. - - }> - Amazing server statistics that make tracking your server growth a - breeze. - - }> - No matter who you are, Cath is sure to have a purpose for you. - - - -); +import { Box, SimpleGrid } from "@chakra-ui/react"; +import * as React from "react"; +import { + FcDoughnutChart, + FcMultipleDevices, + FcPrivacy, + FcTimeline, +} from "react-icons/fc"; +import { Feature } from "./Feature"; + +export const Features = () => ( + + + }> + Cath will never leak any of your information. Ever. All your data is + stored securely on our side. + + }> + Cath is constantly being updated and worked on. Bugs and features, you + name them, we do them. + + }> + Amazing server statistics that make tracking your server growth a + breeze. + + }> + No matter who you are, Cath is sure to have a purpose for you. + + + +); diff --git a/components/Footer/Copyright.js b/components/Footer/Copyright.js index 2f64f97..2607e42 100644 --- a/components/Footer/Copyright.js +++ b/components/Footer/Copyright.js @@ -1,8 +1,8 @@ -import { Text, TextProps } from "@chakra-ui/layout"; -import * as React from "react"; - -export const Copyright = props => ( - - © {new Date().getFullYear()} Cath. All rights reserved. - -); +import { Text, TextProps } from "@chakra-ui/layout"; +import * as React from "react"; + +export const Copyright = props => ( + + © {new Date().getFullYear()} Cath. All rights reserved. + +); diff --git a/components/Footer/Footer.js b/components/Footer/Footer.js index 50525f6..ad6402f 100644 --- a/components/Footer/Footer.js +++ b/components/Footer/Footer.js @@ -1,22 +1,22 @@ -import { Box, Stack } from "@chakra-ui/react"; -import * as React from "react"; -import { Copyright } from "./Copyright"; -import { SocialMediaLinks } from "./SocialMediaLinks"; - -export const Footer = () => ( - - - - - - - - -); +import { Box, Stack } from "@chakra-ui/react"; +import * as React from "react"; +import { Copyright } from "./Copyright"; +import { SocialMediaLinks } from "./SocialMediaLinks"; + +export const Footer = () => ( + + + + + + + + +); diff --git a/components/Footer/SocialMediaLinks.js b/components/Footer/SocialMediaLinks.js index f8244f5..6a0ba4b 100644 --- a/components/Footer/SocialMediaLinks.js +++ b/components/Footer/SocialMediaLinks.js @@ -1,15 +1,15 @@ -import { ButtonGroup, ButtonGroupProps, IconButton } from "@chakra-ui/react"; -import * as React from "react"; -import { FaGithub } from "react-icons/fa"; - -export const SocialMediaLinks = props => ( - - } - target="_empty" - /> - -); +import { ButtonGroup, ButtonGroupProps, IconButton } from "@chakra-ui/react"; +import * as React from "react"; +import { FaGithub } from "react-icons/fa"; + +export const SocialMediaLinks = props => ( + + } + target="_empty" + /> + +); diff --git a/components/Hero/Hero.js b/components/Hero/Hero.js index 485aa62..ba1f9ab 100644 --- a/components/Hero/Hero.js +++ b/components/Hero/Hero.js @@ -1,108 +1,108 @@ -import React from "react"; -import { - chakra, - Box, - useColorModeValue, - Button, - Stack, - Image, - Text, - Icon, -} from "@chakra-ui/react"; -import { signIn } from "next-auth/client"; - -const Hero = () => { - return ( - - - - Your favorite{" "} - - CODM - {" "} - bot. - - - Your favorite CODM bot. Cath.exe is packed to the brim with commands - for moderation, stats and of course, CODM. - - - - - - - - ); -}; - -export default Hero; +import React from "react"; +import { + chakra, + Box, + useColorModeValue, + Button, + Stack, + Image, + Text, + Icon, +} from "@chakra-ui/react"; +import { signIn } from "next-auth/client"; + +const Hero = () => { + return ( + + + + Your favorite{" "} + + CODM + {" "} + bot. + + + Your favorite CODM bot. Cath.exe is packed to the brim with commands + for moderation, stats and of course, CODM. + + + + + + + + ); +}; + +export default Hero; diff --git a/components/Nav/Header.js b/components/Nav/Header.js index 260838d..33fbe0b 100644 --- a/components/Nav/Header.js +++ b/components/Nav/Header.js @@ -1,282 +1,282 @@ -import { - Box, - Flex, - Text, - IconButton, - Button, - Stack, - Collapse, - Icon, - Link, - Popover, - PopoverTrigger, - PopoverContent, - useColorModeValue, - useBreakpointValue, - useDisclosure, -} from "@chakra-ui/react"; -import { - HamburgerIcon, - CloseIcon, - ChevronDownIcon, - ChevronRightIcon, -} from "@chakra-ui/icons"; -import AuthButton from "../AuthButton"; -import { signIn, signOut, useSession } from "next-auth/client"; - -export default function WithSubnavigation() { - const { isOpen, onToggle } = useDisclosure(); - const [session, loading] = useSession(); - - return ( - - - - : - } - variant={"ghost"} - aria-label={"Toggle Navigation"} - /> - - - - Cath.exe - - - - - - - - - - - - - - - - - ); -} - -const DesktopNav = () => { - const linkColor = useColorModeValue("gray.600", "gray.200"); - const linkHoverColor = useColorModeValue("gray.800", "white"); - const popoverContentBgColor = useColorModeValue("white", "gray.800"); - - return ( - - {NAV_ITEMS.map(navItem => ( - - - - - {navItem.label} - - - - {navItem.children && ( - - - {navItem.children.map(child => ( - - ))} - - - )} - - - ))} - - ); -}; - -const DesktopSubNav = ({ label, href, subLabel }) => { - return ( - - - - - {label} - - {subLabel} - - - - - - - ); -}; - -const MobileNav = () => { - return ( - - {NAV_ITEMS.map(navItem => ( - - ))} - - ); -}; - -const MobileNavItem = ({ label, children, href }) => { - const { isOpen, onToggle } = useDisclosure(); - - return ( - - - - {label} - - {children && ( - - )} - - - - - {children && - children.map(child => ( - - {child.label} - - ))} - - - - ); -}; - -const NAV_ITEMS = [ - { - label: "Home", - href: "/", - }, - { - label: "Control Panel", - children: [ - { - label: "Main", - subLabel: "Control Everything", - href: "/controlpanel", - }, - { - label: "Commands", - subLabel: "Control Caths commands", - href: "/controlpanel/commands", - }, - ], - }, - { - label: "Coming soon...", - href: "#", - }, -]; +import { + Box, + Flex, + Text, + IconButton, + Button, + Stack, + Collapse, + Icon, + Link, + Popover, + PopoverTrigger, + PopoverContent, + useColorModeValue, + useBreakpointValue, + useDisclosure, +} from "@chakra-ui/react"; +import { + HamburgerIcon, + CloseIcon, + ChevronDownIcon, + ChevronRightIcon, +} from "@chakra-ui/icons"; +import AuthButton from "../AuthButton"; +import { signIn, signOut, useSession } from "next-auth/client"; + +export default function WithSubnavigation() { + const { isOpen, onToggle } = useDisclosure(); + const [session, loading] = useSession(); + + return ( + + + + : + } + variant={"ghost"} + aria-label={"Toggle Navigation"} + /> + + + + Cath.exe + + + + + + + + + + + + + + + + + ); +} + +const DesktopNav = () => { + const linkColor = useColorModeValue("gray.600", "gray.200"); + const linkHoverColor = useColorModeValue("gray.800", "white"); + const popoverContentBgColor = useColorModeValue("white", "gray.800"); + + return ( + + {NAV_ITEMS.map(navItem => ( + + + + + {navItem.label} + + + + {navItem.children && ( + + + {navItem.children.map(child => ( + + ))} + + + )} + + + ))} + + ); +}; + +const DesktopSubNav = ({ label, href, subLabel }) => { + return ( + + + + + {label} + + {subLabel} + + + + + + + ); +}; + +const MobileNav = () => { + return ( + + {NAV_ITEMS.map(navItem => ( + + ))} + + ); +}; + +const MobileNavItem = ({ label, children, href }) => { + const { isOpen, onToggle } = useDisclosure(); + + return ( + + + + {label} + + {children && ( + + )} + + + + + {children && + children.map(child => ( + + {child.label} + + ))} + + + + ); +}; + +const NAV_ITEMS = [ + { + label: "Home", + href: "/", + }, + { + label: "Control Panel", + children: [ + { + label: "Main", + subLabel: "Control Everything", + href: "/controlpanel", + }, + { + label: "Commands", + subLabel: "Control Caths commands", + href: "/controlpanel/commands", + }, + ], + }, + { + label: "Coming soon...", + href: "#", + }, +]; diff --git a/components/Nav/Logo.js b/components/Nav/Logo.js index 5b8b1c4..fbd61ff 100644 --- a/components/Nav/Logo.js +++ b/components/Nav/Logo.js @@ -1,12 +1,12 @@ -import React from "react"; -import { Box, Text } from "@chakra-ui/react"; - -export default function Logo(props) { - return ( - - - Logo - - - ); -} +import React from "react"; +import { Box, Text } from "@chakra-ui/react"; + +export default function Logo(props) { + return ( + + + Logo + + + ); +} diff --git a/components/Sidebar/Sidebar.js b/components/Sidebar/Sidebar.js index f7c8e90..66b5e16 100644 --- a/components/Sidebar/Sidebar.js +++ b/components/Sidebar/Sidebar.js @@ -1,180 +1,180 @@ -import { - Avatar, - Box, - Collapse, - Drawer, - DrawerContent, - DrawerOverlay, - Flex, - Icon, - IconButton, - Input, - InputGroup, - InputLeftElement, - Text, - useColorModeValue, - useDisclosure, -} from "@chakra-ui/react"; -import { FaBell } from "react-icons/fa"; -import { AiFillGift } from "react-icons/ai"; -import { FiMenu, FiSearch } from "react-icons/fi"; -import { HiCode } from "react-icons/hi"; -import { MdKeyboardArrowRight, MdHome } from "react-icons/md"; -import AuthButton from "../AuthButton"; -import Link from "next/link"; -import React from "react"; -import { session } from "next-auth/client"; - -export default function Sidebar({ children }) { - const sidebar = useDisclosure(); - const integrations = useDisclosure(); - - const NavItem = props => { - const { icon, children, ...rest } = props; - return ( - - {icon && ( - - )} - {children} - - ); - }; - - const SidebarContent = props => ( - - - - - Cath.exe - - - - - - Home - - - Control Panel - - - - - - Main - - - - - Commands - - - - Coming Soon - - - - ); - return ( - - - - - - - - - - - } - size="sm" - /> - - - - - - - - - - {children} - - - - ); -} +import { + Avatar, + Box, + Collapse, + Drawer, + DrawerContent, + DrawerOverlay, + Flex, + Icon, + IconButton, + Input, + InputGroup, + InputLeftElement, + Text, + useColorModeValue, + useDisclosure, +} from "@chakra-ui/react"; +import { FaBell } from "react-icons/fa"; +import { AiFillGift } from "react-icons/ai"; +import { FiMenu, FiSearch } from "react-icons/fi"; +import { HiCode } from "react-icons/hi"; +import { MdKeyboardArrowRight, MdHome } from "react-icons/md"; +import AuthButton from "../AuthButton"; +import Link from "next/link"; +import React from "react"; +import { session } from "next-auth/client"; + +export default function Sidebar({ children }) { + const sidebar = useDisclosure(); + const integrations = useDisclosure(); + + const NavItem = props => { + const { icon, children, ...rest } = props; + return ( + + {icon && ( + + )} + {children} + + ); + }; + + const SidebarContent = props => ( + + + + + Cath.exe + + + + + + Home + + + Control Panel + + + + + + Main + + + + + Commands + + + + Coming Soon + + + + ); + return ( + + + + + + + + + + + } + size="sm" + /> + + + + + + + + + + {children} + + + + ); +} diff --git a/components/StatCard.js b/components/StatCard.js index d458d8c..a66a079 100644 --- a/components/StatCard.js +++ b/components/StatCard.js @@ -1,81 +1,81 @@ -import { - Stat, - StatLabel, - StatNumber, - StatHelpText, - StatArrow, - StatGroup, -} from "@chakra-ui/react"; - -import React from "react"; -import { motion } from "framer-motion"; - -const container = { - hidden: { opacity: 1, scale: 0 }, - visible: { - opacity: 1, - scale: 1, - transition: { - delayChildren: 0.4, - staggerChildren: 0.3, - }, - }, -}; - -const item = { - hidden: { y: 20, opacity: 0 }, - visible: { - y: 0, - opacity: 1, - }, -}; - -const MotionStatGroup = motion(StatGroup); -const MotionStat = motion(Stat); - -function StatCard() { - return ( - - - User Growth - 77 - - - 11.36% - - - - - Activity - 45 messages - - - 9.05% - - - - ); -} - -export default StatCard; +import { + Stat, + StatLabel, + StatNumber, + StatHelpText, + StatArrow, + StatGroup, +} from "@chakra-ui/react"; + +import React from "react"; +import { motion } from "framer-motion"; + +const container = { + hidden: { opacity: 1, scale: 0 }, + visible: { + opacity: 1, + scale: 1, + transition: { + delayChildren: 0.4, + staggerChildren: 0.3, + }, + }, +}; + +const item = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + }, +}; + +const MotionStatGroup = motion(StatGroup); +const MotionStat = motion(Stat); + +function StatCard() { + return ( + + + User Growth + 77 + + + 11.36% + + + + + Activity + 45 messages + + + 9.05% + + + + ); +} + +export default StatCard; diff --git a/components/Testimonials/Testimonials.js b/components/Testimonials/Testimonials.js index 723b234..6fd5011 100644 --- a/components/Testimonials/Testimonials.js +++ b/components/Testimonials/Testimonials.js @@ -1,167 +1,167 @@ -import { - Avatar, - Box, - chakra, - Container, - Flex, - Icon, - SimpleGrid, - useColorModeValue, -} from "@chakra-ui/react"; - -const testimonials = [ - { - name: "John Doe", - role: "Chief Marketing Officer", - content: "Remarkable", - avatar: - "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", - }, - { - name: "John Doe", - role: "Chief Marketing Officer", - content: "Remarkable", - avatar: - "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", - }, - { - name: "John Doe", - role: "Chief Marketing Officer", - content: "Remarkable", - avatar: - "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", - }, - { - name: "John Doe", - role: "Chief Marketing Officer", - content: "Remarkable", - avatar: - "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", - }, -]; - -const backgrounds = [ - `url("data:image/svg+xml, %3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'560\' height=\'185\' viewBox=\'0 0 560 185\' fill=\'none\'%3E%3Cellipse cx=\'102.633\' cy=\'61.0737\' rx=\'102.633\' ry=\'61.0737\' fill=\'%23ED64A6\' /%3E%3Cellipse cx=\'399.573\' cy=\'123.926\' rx=\'102.633\' ry=\'61.0737\' fill=\'%23F56565\' /%3E%3Cellipse cx=\'366.192\' cy=\'73.2292\' rx=\'193.808\' ry=\'73.2292\' fill=\'%2338B2AC\' /%3E%3Cellipse cx=\'222.705\' cy=\'110.585\' rx=\'193.808\' ry=\'73.2292\' fill=\'%23ED8936\' /%3E%3C/svg%3E")`, - `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='457.367' cy='123.926' rx='102.633' ry='61.0737' transform='rotate(-180 457.367 123.926)' fill='%23ED8936'/%3E%3Cellipse cx='160.427' cy='61.0737' rx='102.633' ry='61.0737' transform='rotate(-180 160.427 61.0737)' fill='%2348BB78'/%3E%3Cellipse cx='193.808' cy='111.771' rx='193.808' ry='73.2292' transform='rotate(-180 193.808 111.771)' fill='%230BC5EA'/%3E%3Cellipse cx='337.295' cy='74.415' rx='193.808' ry='73.2292' transform='rotate(-180 337.295 74.415)' fill='%23ED64A6'/%3E%3C/svg%3E")`, - `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='102.633' cy='61.0737' rx='102.633' ry='61.0737' fill='%23ED8936'/%3E%3Cellipse cx='399.573' cy='123.926' rx='102.633' ry='61.0737' fill='%2348BB78'/%3E%3Cellipse cx='366.192' cy='73.2292' rx='193.808' ry='73.2292' fill='%230BC5EA'/%3E%3Cellipse cx='222.705' cy='110.585' rx='193.808' ry='73.2292' fill='%23ED64A6'/%3E%3C/svg%3E")`, - `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='457.367' cy='123.926' rx='102.633' ry='61.0737' transform='rotate(-180 457.367 123.926)' fill='%23ECC94B'/%3E%3Cellipse cx='160.427' cy='61.0737' rx='102.633' ry='61.0737' transform='rotate(-180 160.427 61.0737)' fill='%239F7AEA'/%3E%3Cellipse cx='193.808' cy='111.771' rx='193.808' ry='73.2292' transform='rotate(-180 193.808 111.771)' fill='%234299E1'/%3E%3Cellipse cx='337.295' cy='74.415' rx='193.808' ry='73.2292' transform='rotate(-180 337.295 74.415)' fill='%2348BB78'/%3E%3C/svg%3E")`, -]; - -function TestmonialCard(props) { - const { name, role, content, avatar, index } = props; - return ( - - - - {content} - - - {name} - - {" "} - - {role} - - - - - - ); -} - -export default function GridBlurredBackdrop() { - return ( - - - - Users love Cath - - - You're in good company - - - See why over{" "} - - 110000+ - {" "} - users use Cath in their servers - - - - {testimonials.map((cardInfo, index) => ( - - ))} - - - ); -} +import { + Avatar, + Box, + chakra, + Container, + Flex, + Icon, + SimpleGrid, + useColorModeValue, +} from "@chakra-ui/react"; + +const testimonials = [ + { + name: "John Doe", + role: "Chief Marketing Officer", + content: "Remarkable", + avatar: + "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", + }, + { + name: "John Doe", + role: "Chief Marketing Officer", + content: "Remarkable", + avatar: + "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", + }, + { + name: "John Doe", + role: "Chief Marketing Officer", + content: "Remarkable", + avatar: + "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", + }, + { + name: "John Doe", + role: "Chief Marketing Officer", + content: "Remarkable", + avatar: + "https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=334&q=80", + }, +]; + +const backgrounds = [ + `url("data:image/svg+xml, %3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'560\' height=\'185\' viewBox=\'0 0 560 185\' fill=\'none\'%3E%3Cellipse cx=\'102.633\' cy=\'61.0737\' rx=\'102.633\' ry=\'61.0737\' fill=\'%23ED64A6\' /%3E%3Cellipse cx=\'399.573\' cy=\'123.926\' rx=\'102.633\' ry=\'61.0737\' fill=\'%23F56565\' /%3E%3Cellipse cx=\'366.192\' cy=\'73.2292\' rx=\'193.808\' ry=\'73.2292\' fill=\'%2338B2AC\' /%3E%3Cellipse cx=\'222.705\' cy=\'110.585\' rx=\'193.808\' ry=\'73.2292\' fill=\'%23ED8936\' /%3E%3C/svg%3E")`, + `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='457.367' cy='123.926' rx='102.633' ry='61.0737' transform='rotate(-180 457.367 123.926)' fill='%23ED8936'/%3E%3Cellipse cx='160.427' cy='61.0737' rx='102.633' ry='61.0737' transform='rotate(-180 160.427 61.0737)' fill='%2348BB78'/%3E%3Cellipse cx='193.808' cy='111.771' rx='193.808' ry='73.2292' transform='rotate(-180 193.808 111.771)' fill='%230BC5EA'/%3E%3Cellipse cx='337.295' cy='74.415' rx='193.808' ry='73.2292' transform='rotate(-180 337.295 74.415)' fill='%23ED64A6'/%3E%3C/svg%3E")`, + `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='102.633' cy='61.0737' rx='102.633' ry='61.0737' fill='%23ED8936'/%3E%3Cellipse cx='399.573' cy='123.926' rx='102.633' ry='61.0737' fill='%2348BB78'/%3E%3Cellipse cx='366.192' cy='73.2292' rx='193.808' ry='73.2292' fill='%230BC5EA'/%3E%3Cellipse cx='222.705' cy='110.585' rx='193.808' ry='73.2292' fill='%23ED64A6'/%3E%3C/svg%3E")`, + `url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='185' viewBox='0 0 560 185' fill='none'%3E%3Cellipse cx='457.367' cy='123.926' rx='102.633' ry='61.0737' transform='rotate(-180 457.367 123.926)' fill='%23ECC94B'/%3E%3Cellipse cx='160.427' cy='61.0737' rx='102.633' ry='61.0737' transform='rotate(-180 160.427 61.0737)' fill='%239F7AEA'/%3E%3Cellipse cx='193.808' cy='111.771' rx='193.808' ry='73.2292' transform='rotate(-180 193.808 111.771)' fill='%234299E1'/%3E%3Cellipse cx='337.295' cy='74.415' rx='193.808' ry='73.2292' transform='rotate(-180 337.295 74.415)' fill='%2348BB78'/%3E%3C/svg%3E")`, +]; + +function TestmonialCard(props) { + const { name, role, content, avatar, index } = props; + return ( + + + + {content} + + + {name} + + {" "} + - {role} + + + + + + ); +} + +export default function GridBlurredBackdrop() { + return ( + + + + Users love Cath + + + You're in good company + + + See why over{" "} + + 110000+ + {" "} + users use Cath in their servers + + + + {testimonials.map((cardInfo, index) => ( + + ))} + + + ); +} diff --git a/next.config.js b/next.config.js index da1bb77..dc55842 100644 --- a/next.config.js +++ b/next.config.js @@ -1,3 +1,3 @@ -module.exports = { - reactStrictMode: true, -}; +module.exports = { + reactStrictMode: true, +}; diff --git a/pages/404.js b/pages/404.js index 0f884cd..70771a5 100644 --- a/pages/404.js +++ b/pages/404.js @@ -1,11 +1,11 @@ -import Head from "next/head"; -export default function Custom404() { - return ( - <> - - 404 - -
404 - Page Not Found
- - ); -} +import Head from "next/head"; +export default function Custom404() { + return ( + <> + + 404 + +
404 - Page Not Found
+ + ); +} diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index 0a49a76..755d267 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -1,16 +1,16 @@ -import NextAuth from "next-auth"; -import Providers from "next-auth/providers"; - -export default NextAuth({ - // Configure one or more authentication providers - providers: [ - Providers.Discord({ - clientId: process.env.DISCORD_ID, - clientSecret: process.env.DISCORD_SECRET, - }), - // ...add more providers here - ], - - // A database is optional, but required to persist accounts in a database - database: process.env.DATABASE_URL, -}); +import NextAuth from "next-auth"; +import Providers from "next-auth/providers"; + +export default NextAuth({ + // Configure one or more authentication providers + providers: [ + Providers.Discord({ + clientId: process.env.DISCORD_ID, + clientSecret: process.env.DISCORD_SECRET, + }), + // ...add more providers here + ], + + // A database is optional, but required to persist accounts in a database + database: process.env.DATABASE_URL, +}); diff --git a/pages/api/skyblock.js b/pages/api/skyblock.js index 7420035..b6d9474 100644 --- a/pages/api/skyblock.js +++ b/pages/api/skyblock.js @@ -1,25 +1,25 @@ -const {getItemNetworth} = require("skyhelper-networth"); -const nbt = require("prismarine-nbt"); -const parseNbt = require("util").promisify(nbt.parse); -async function decodeData(buffer) { - const parsedNbt = await parseNbt(Buffer.from(buffer, "base64")); - return nbt.simplify(parsedNbt); -} -let dat; -export default async function handler(req, res) { - if (req.method == "GET") { - try { - dat = JSON.parse(req.body).ByteData; - } catch (e) { - dat = req.body.ByteData; - } - if (dat == undefined) - res.status(400).json({error: "ByteData is undefined"}); - const data = await getItemNetworth((await decodeData(dat)).i[0], { - cache: true, - }); - res.status(200).json(data); - } else { - res.status(400).json({error: "This endpoint only accepts GET requests"}); - } -} +const {getItemNetworth} = require("skyhelper-networth"); +const nbt = require("prismarine-nbt"); +const parseNbt = require("util").promisify(nbt.parse); +async function decodeData(buffer) { + const parsedNbt = await parseNbt(Buffer.from(buffer, "base64")); + return nbt.simplify(parsedNbt); +} +let dat; +export default async function handler(req, res) { + if (req.method == "GET") { + try { + dat = JSON.parse(req.body).ByteData; + } catch (e) { + dat = req.body.ByteData; + } + if (dat == undefined) + res.status(400).json({error: "ByteData is undefined"}); + const data = await getItemNetworth((await decodeData(dat)).i[0], { + cache: true, + }); + res.status(200).json(data); + } else { + res.status(400).json({error: "This endpoint only accepts GET requests"}); + } +} diff --git a/pages/controlpanel/index.js b/pages/controlpanel/index.js index c3ec7ab..fdd8318 100644 --- a/pages/controlpanel/index.js +++ b/pages/controlpanel/index.js @@ -1,81 +1,81 @@ -import React from "react"; -import Card from "../../components/Card"; -import Head from "next/head"; -import { useSession } from "next-auth/client"; -import { Flex, Text, Spacer } from "@chakra-ui/react"; -import { motion } from "framer-motion"; - -const container = { - hidden: { opacity: 1, scale: 0 }, - visible: { - opacity: 1, - scale: 1, - transition: { - delayChildren: 0.3, - staggerChildren: 0.2, - }, - }, -}; - -const item = { - hidden: { y: 20, opacity: 0 }, - visible: { - y: 0, - opacity: 1, - }, -}; - -function Index() { - const [session, loading] = useSession(); - - return ( - <> - {!session && ( - <> -

Seems like you're not logged in. Log in to get started!

- - )} - {session && ( - <> - - Cath Control Panel - - - Control Panel - - - - - - - - - - - - )} - - ); -} - -export default Index; +import React from "react"; +import Card from "../../components/Card"; +import Head from "next/head"; +import { useSession } from "next-auth/client"; +import { Flex, Text, Spacer } from "@chakra-ui/react"; +import { motion } from "framer-motion"; + +const container = { + hidden: { opacity: 1, scale: 0 }, + visible: { + opacity: 1, + scale: 1, + transition: { + delayChildren: 0.3, + staggerChildren: 0.2, + }, + }, +}; + +const item = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + }, +}; + +function Index() { + const [session, loading] = useSession(); + + return ( + <> + {!session && ( + <> +

Seems like you're not logged in. Log in to get started!

+ + )} + {session && ( + <> + + Cath Control Panel + + + Control Panel + + + + + + + + + + + + )} + + ); +} + +export default Index; diff --git a/pages/discord.js b/pages/discord.js index 42f4af6..65c58b2 100644 --- a/pages/discord.js +++ b/pages/discord.js @@ -1,9 +1,9 @@ -import {useRouter} from "next/router"; -import {useEffect} from "react"; -export default function Discord() { - const page = useRouter(); - useEffect(() => { - page.push("http://discord.gg/SbQHChmGcp"); - }, []); - return () => null; -} +import {useRouter} from "next/router"; +import {useEffect} from "react"; +export default function Discord() { + const page = useRouter(); + useEffect(() => { + page.push("http://discord.gg/SbQHChmGcp"); + }, []); + return () => null; +} diff --git a/pages/github.js b/pages/github.js index 8d47bd2..1c8f7bc 100644 --- a/pages/github.js +++ b/pages/github.js @@ -1,9 +1,9 @@ -import { useRouter } from "next/router"; -import { useEffect } from "react"; -export default function Github() { - const page = useRouter(); - useEffect(() => { - page.push("http://github.com/night0721"); - }, []); - return () => null; -} +import { useRouter } from "next/router"; +import { useEffect } from "react"; +export default function Github() { + const page = useRouter(); + useEffect(() => { + page.push("http://github.com/night0721"); + }, []); + return () => null; +} diff --git a/pages/index.js b/pages/index.js index 5d80598..67aed15 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,84 +1,84 @@ -import Card from "../components/Card"; -import { useSession } from "next-auth/client"; -import { Text } from "@chakra-ui/react"; -import Hero from "../components/Hero/Hero"; -import { CTA } from "../components/CTA"; -import { Features } from "../components/Features/Features"; -import { Footer } from "../components/Footer/Footer"; -import { motion } from "framer-motion"; -import StatCard from "../components/StatCard"; -import Testimonials from "../components/Testimonials/Testimonials"; -import AuthButton from "../components/AuthButton"; - -export default function Home() { - const container = { - hidden: { opacity: 1, scale: 0 }, - visible: { - opacity: 1, - scale: 1, - transition: { - delayChildren: 0.4, - staggerChildren: 0.3, - }, - }, - }; - - const [session, loading] = useSession(); - return ( - <> - {!session && ( - <> - - - - -