diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 44015c74..062d7304 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -12,23 +12,9 @@ interface ArticleCardImageProps { onClick?: () => void; } -export function BackgroundCard({ - image, - title, - category, - style, - showButton, - buttonText, - onClick, -}: ArticleCardImageProps) { +export function BackgroundCard({ image, title, category, style, showButton, buttonText, onClick }: ArticleCardImageProps) { return ( - +
{category} diff --git a/src/components/GalleryGrid.tsx b/src/components/GalleryGrid.tsx index 3502faa9..c1df4746 100644 --- a/src/components/GalleryGrid.tsx +++ b/src/components/GalleryGrid.tsx @@ -1,17 +1,4 @@ -import { - AspectRatio, - Avatar, - BackgroundImage, - Badge, - Box, - Image, - Modal, - Overlay, - Portal, - SimpleGrid, - Title, - useMantineTheme, -} from '@mantine/core'; +import { AspectRatio, Avatar, BackgroundImage, Badge, Box, Image, Modal, Overlay, Portal, SimpleGrid, Title, useMantineTheme } from '@mantine/core'; import React, { useState } from 'react'; import { useIsClient } from '../hooks/useIsClient'; diff --git a/src/components/GridButton.tsx b/src/components/GridButton.tsx index 26a027ad..f2c9364d 100644 --- a/src/components/GridButton.tsx +++ b/src/components/GridButton.tsx @@ -2,23 +2,9 @@ import { Text, UnstyledButton } from '@mantine/core'; import classes from '../styles/components/GridButton.module.css'; -export const GridButton = ({ - icon, - text, - onClick, - solid, -}: { - icon: any; - text: string; - onClick?: () => void; - solid?: boolean; -}) => { +export const GridButton = ({ icon, text, onClick, solid }: { icon: any; text: string; onClick?: () => void; solid?: boolean }) => { return ( - + {icon} {text} diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 4eafde1d..41fa6349 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,25 +1,4 @@ -import { - ActionIcon, - Anchor, - AppShellHeader, - Avatar, - Badge, - Box, - Burger, - Button, - Container, - Divider, - Group, - Indicator, - Menu, - Paper, - Text, - Tooltip, - Transition, - UnstyledButton, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; +import { ActionIcon, Anchor, AppShellHeader, Avatar, Badge, Box, Burger, Button, Container, Divider, Group, Indicator, Menu, Paper, Text, Tooltip, Transition, UnstyledButton, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { ChevronDown, FileSearch, FileUpload, Logout, MoonStars, Sun, World } from 'tabler-icons-react'; import { Discord, Instagram, Tiktok, Twitch, Twitter, Youtube } from '@icons-pack/react-simple-icons'; import React, { CSSProperties, useState } from 'react'; @@ -280,27 +259,13 @@ export const LogoHeader = (props: LogoHeaderProps) => { icon = ; } return ( - + {icon} ); })} {props.invite && ( - + )} @@ -315,16 +280,7 @@ export const LogoHeader = (props: LogoHeaderProps) => { Apply )} - {user.hasPermissions( - [ - 'team.settings.edit', - 'team.socials.edit', - 'team.application.edit', - 'team.application.list', - 'team.application.review', - ], - props.id, - ) && ( + {user.hasPermissions(['team.settings.edit', 'team.socials.edit', 'team.application.edit', 'team.application.list', 'team.application.review'], props.id) && ( diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index e0ee8f9b..2bdf083b 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -3,13 +3,7 @@ import { useMantineColorScheme } from '@mantine/core'; /* eslint-disable jsx-a11y/alt-text */ const Icon = ({ name, ...rest }: any) => { const scheme = useMantineColorScheme(); - return ( - - ); + return ; }; export default Icon; diff --git a/src/components/LanguageSwitcher.tsx b/src/components/LanguageSwitcher.tsx index 7c44ab81..9cf99643 100644 --- a/src/components/LanguageSwitcher.tsx +++ b/src/components/LanguageSwitcher.tsx @@ -30,13 +30,7 @@ export function LanguageSwitcher() { }; const items = languages.map((item) => ( - - } - onClick={() => changeLanguage(item)} - key={item.label} - > + } onClick={() => changeLanguage(item)} key={item.label}> {item.label} )); @@ -46,10 +40,7 @@ export function LanguageSwitcher() { - + {selected && selected.label} diff --git a/src/components/Page.tsx b/src/components/Page.tsx index ec382e91..ff19d2ef 100644 --- a/src/components/Page.tsx +++ b/src/components/Page.tsx @@ -42,12 +42,7 @@ const Page = (props: PageProps) => { const bgPosY = useTransform(scrollYProgress, (latest) => `${latest * 5 + 50}%`); return ( <> - + {!props.disabled?.header && (
{ export const LogoPage = (props: PageProps & { headData: any; team: string }) => { return ( - + {props.children} diff --git a/src/components/RTE.tsx b/src/components/RTE.tsx index a9fbdeac..2f7b28d7 100644 --- a/src/components/RTE.tsx +++ b/src/components/RTE.tsx @@ -10,27 +10,9 @@ import Underline from '@tiptap/extension-underline'; import { useEditor } from '@tiptap/react'; import { useEffect } from 'react'; -export default function RTE({ - value, - onChange, - onClick, - style, -}: { - value?: string; - onChange?: (e: string) => void; - onClick?: (e: any) => void; - style?: any; -}) { +export default function RTE({ value, onChange, onClick, style }: { value?: string; onChange?: (e: string) => void; onClick?: (e: any) => void; style?: any }) { const editor = useEditor({ - extensions: [ - StarterKit, - Underline, - Link, - Superscript, - SubScript, - Highlight, - TextAlign.configure({ types: ['heading', 'paragraph'] }), - ], + extensions: [StarterKit, Underline, Link, Superscript, SubScript, Highlight, TextAlign.configure({ types: ['heading', 'paragraph'] })], content: value, onUpdate: (e) => { onChange && onChange(e.editor.getHTML()); diff --git a/src/components/SearchInput.tsx b/src/components/SearchInput.tsx index c106290e..9eeba263 100644 --- a/src/components/SearchInput.tsx +++ b/src/components/SearchInput.tsx @@ -25,15 +25,7 @@ const SearchInput = (props: SearchInputProps) => { } }, [debounced, oldValue, props]); - return ( - } - {...props.inputProps} - defaultValue={value} - onChange={(event) => setValue(event.currentTarget.value)} - /> - ); + return } {...props.inputProps} defaultValue={value} onChange={(event) => setValue(event.currentTarget.value)} />; }; export default SearchInput; diff --git a/src/components/SettingsTabs.tsx b/src/components/SettingsTabs.tsx index 0aa8e3d0..d781425c 100644 --- a/src/components/SettingsTabs.tsx +++ b/src/components/SettingsTabs.tsx @@ -30,52 +30,21 @@ const SettingsTabs = ({ children, team, loading = false }: { children: any; team : {} } > - - value == 'quit' - ? router.push(`/teams/${router.query.team}`) - : router.push(`/teams/${router.query.team}/manage/${value}`) - } - style={{ width: '100%' }} - > + (value == 'quit' ? router.push(`/teams/${router.query.team}`) : router.push(`/teams/${router.query.team}/manage/${value}`))} style={{ width: '100%' }}> - } - disabled={!user.hasPermissions(['team.socials.edit', 'team.settings.edit'], team)} - > + } disabled={!user.hasPermissions(['team.socials.edit', 'team.settings.edit'], team)}> Settings - } - disabled={!user.hasPermission('team.application.edit', team)} - > + } disabled={!user.hasPermission('team.application.edit', team)}> Application Questions - } - disabled={!user.hasPermissions(['permission.add', 'permission.remove'], team)} - > + } disabled={!user.hasPermissions(['permission.add', 'permission.remove'], team)}> Members - } - disabled={!user.hasPermission('team.showcases.edit', team)} - > + } disabled={!user.hasPermission('team.showcases.edit', team)}> Showcase Images - } - disabled={!user.hasPermissions(['team.application.review', 'team.application.list'], team)} - > + } disabled={!user.hasPermissions(['team.application.review', 'team.application.list'], team)}> Review }> diff --git a/src/components/application/questions/CityQuestion.tsx b/src/components/application/questions/CityQuestion.tsx index 5d170b44..920e3fd5 100644 --- a/src/components/application/questions/CityQuestion.tsx +++ b/src/components/application/questions/CityQuestion.tsx @@ -22,14 +22,7 @@ const CityQuestion = (props: CityQuestionProps) => { const EditQuestion = ({ editingQuestion, handleUpdateEditingQuestion }: any) => { return ( <> - handleUpdateEditingQuestion({ additionalData: { country: e.target.value } })} - /> + handleUpdateEditingQuestion({ additionalData: { country: e.target.value } })} /> ); }; diff --git a/src/hooks/useUser.ts b/src/hooks/useUser.ts index b87f7f84..bfd2b62d 100644 --- a/src/hooks/useUser.ts +++ b/src/hooks/useUser.ts @@ -23,12 +23,7 @@ export const useUser = () => { hasPermissions: (ps: string[], buildteam?: string) => { const permissions = data?.permissions; if (!permissions) return false; - if ( - permissions - .filter((p: any) => (buildteam ? p.buildTeamId === buildteam : true)) - .find((p: any) => ps.includes(p.permission)) - ) - return true; + if (permissions.filter((p: any) => (buildteam ? p.buildTeamId === buildteam : true)).find((p: any) => ps.includes(p.permission))) return true; return false; }, reload: () => mutate('/account'), diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 7dd6beb4..260f70d2 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -33,8 +33,7 @@ function MyApp({ Component, pageProps }: AppProps) { { >

Sign in to BuildTheEarth

- On your My BuildTheEarth page, you can apply to join a Build Team or request to be verified as solo builder and - work on projects yourself.
- It is also the place where you can upload your world when you have finished. To access your page, you need to - Sign in.
+ On your My BuildTheEarth page, you can apply to join a Build Team or request to be verified as solo builder and work on projects yourself.
+ It is also the place where you can upload your world when you have finished. To access your page, you need to Sign in.

{router.query.error &&

An error occurred, please try again later.

} diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index c5791407..58307090 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -1,28 +1,8 @@ /* eslint-disable no-undef */ import { At, Divide, ExternalLink } from 'tabler-icons-react'; -import { - Avatar, - Button, - Divider, - Grid, - Group, - Text, - ThemeIcon, - Title, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; -import { - Discord, - Facebook, - Instagram, - Snapchat, - Tiktok, - Twitch, - Twitter, - Youtube, -} from '@icons-pack/react-simple-icons'; +import { Avatar, Button, Divider, Grid, Group, Text, ThemeIcon, Title, useMantineColorScheme, useMantineTheme } from '@mantine/core'; +import { Discord, Facebook, Instagram, Snapchat, Tiktok, Twitch, Twitter, Youtube } from '@icons-pack/react-simple-icons'; import { IconMail } from '@tabler/icons-react'; import { NextPage } from 'next'; @@ -64,12 +44,7 @@ const Contact: NextPage = ({ data }: any) => { - window.open(`mailto:${contact.mail}`, '_blank')} - > + window.open(`mailto:${contact.mail}`, '_blank')}> {contact.email} @@ -181,10 +156,7 @@ const Contact: NextPage = ({ data }: any) => { Ban Appeals

If you wish to appeal your ban on the Discord server, please send an email to appeals@buildtheearth.net.

-

- In order to submit a ban appeal, you must include your Discord tag and user ID, screenshot of your ban message - and your reason for appealing. Illegitimate appeals will be ignored. -

+

In order to submit a ban appeal, you must include your Discord tag and user ID, screenshot of your ban message and your reason for appealing. Illegitimate appeals will be ignored.

diff --git a/src/pages/faq/manage.tsx b/src/pages/faq/manage.tsx index 8d5ef97c..b11eb628 100644 --- a/src/pages/faq/manage.tsx +++ b/src/pages/faq/manage.tsx @@ -198,14 +198,7 @@ const Faq: NextPage = () => {

{action} FAQ Question

- + diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b7eb7e6e..12d5f2c2 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,14 +1,4 @@ -import { - ActionIcon, - Box, - Button, - Center, - Grid, - Stack, - Title, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; +import { ActionIcon, Box, Button, Center, Grid, Stack, Title, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { ChevronDown, ChevronRight } from 'tabler-icons-react'; import { motion, useScroll, useTransform } from 'framer-motion'; @@ -82,13 +72,7 @@ const Home: NextPage = ({ data }: any) => { }} > - + @@ -109,20 +93,12 @@ const Home: NextPage = ({ data }: any) => {

{t('mission.content')}

-
@@ -141,10 +117,7 @@ const Home: NextPage = ({ data }: any) => { }} /> - + {

{t('join.content')}

-
diff --git a/src/pages/join/build.tsx b/src/pages/join/build.tsx index de002c65..bcf8f0d0 100644 --- a/src/pages/join/build.tsx +++ b/src/pages/join/build.tsx @@ -1,35 +1,5 @@ -import { - ActionIcon, - Anchor, - Avatar, - BackgroundImage, - Box, - Button, - Card, - Center, - Container, - Grid, - Group, - Stack, - Stepper, - Text, - Title, - rem, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; -import { - IconBox, - IconBracketsContainStart, - IconBuildingCommunity, - IconChevronDown, - IconChevronLeft, - IconCommand, - IconPrompt, - IconRun, - IconSearch, - IconServer, -} from '@tabler/icons'; +import { ActionIcon, Anchor, Avatar, BackgroundImage, Box, Button, Card, Center, Container, Grid, Group, Stack, Stepper, Text, Title, rem, useMantineColorScheme, useMantineTheme } from '@mantine/core'; +import { IconBox, IconBracketsContainStart, IconBuildingCommunity, IconChevronDown, IconChevronLeft, IconCommand, IconPrompt, IconRun, IconSearch, IconServer } from '@tabler/icons'; import { motion, useScroll, useTransform } from 'framer-motion'; import Image from 'next/image'; @@ -87,13 +57,7 @@ const Build: NextPage = ({ data }: any) => { }} > - + diff --git a/src/pages/join/index.tsx b/src/pages/join/index.tsx index a9a36c1a..6e5ef77b 100644 --- a/src/pages/join/index.tsx +++ b/src/pages/join/index.tsx @@ -1,16 +1,4 @@ -import { - ActionIcon, - BackgroundImage, - Button, - Card, - Center, - Container, - Grid, - Text, - Title, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; +import { ActionIcon, BackgroundImage, Button, Card, Center, Container, Grid, Text, Title, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { ChevronDown, ChevronRight } from 'tabler-icons-react'; import { motion, useScroll, useTransform } from 'framer-motion'; @@ -58,13 +46,7 @@ const GetStarted: NextPage = () => { }} > - + @@ -92,16 +74,9 @@ const GetStarted: NextPage = () => { - + - + @@ -111,29 +86,15 @@ const GetStarted: NextPage = () => { <Text mt="xs" c="dimmed" size="md"> {t('choose.visit.subtitle')} </Text> - <Button - component={Link} - href="/join/visit#more" - rightSection={<ChevronRight />} - px={'var(--mantine-spacing-xl)'} - mt="md" - style={{ width: 'fit-content' }} - > + <Button component={Link} href="/join/visit#more" rightSection={<ChevronRight />} px={'var(--mantine-spacing-xl)'} mt="md" style={{ width: 'fit-content' }}> {t('choose.visit.button')} </Button> </Card> </Grid.Col> <Grid.Col span={{ xs: 6, base: 9 }}> - <Card - padding="xl" - radius={0} - style={{ width: '100%', height: '100%', boxShadow: '10px 10px 0px 4px rgba(0,0,0,0.45)' }} - > + <Card padding="xl" radius={0} style={{ width: '100%', height: '100%', boxShadow: '10px 10px 0px 4px rgba(0,0,0,0.45)' }}> <Card.Section> - <BackgroundImage - src="https://cdn.buildtheearth.net/static/getstarted/build.webp" - style={{ height: '25vh' }} - /> + <BackgroundImage src="https://cdn.buildtheearth.net/static/getstarted/build.webp" style={{ height: '25vh' }} /> </Card.Section> <Title order={2} mt="md"> @@ -143,14 +104,7 @@ const GetStarted: NextPage = () => { <Text mt="xs" c="dimmed" size="md"> {t('choose.build.subtitle')} </Text> - <Button - component={Link} - href="/join/build#more" - rightSection={<ChevronRight />} - px={'var(--mantine-spacing-xl)'} - mt="md" - style={{ width: 'fit-content' }} - > + <Button component={Link} href="/join/build#more" rightSection={<ChevronRight />} px={'var(--mantine-spacing-xl)'} mt="md" style={{ width: 'fit-content' }}> {t('choose.build.button')} </Button> </Card> diff --git a/src/pages/join/visit.tsx b/src/pages/join/visit.tsx index 2b0d07ec..68198a39 100644 --- a/src/pages/join/visit.tsx +++ b/src/pages/join/visit.tsx @@ -1,35 +1,5 @@ -import { - ActionIcon, - Anchor, - Avatar, - BackgroundImage, - Box, - Button, - Card, - Center, - Container, - Grid, - Group, - Stack, - Stepper, - Text, - Title, - rem, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; -import { - IconBox, - IconBracketsContainStart, - IconBuildingCommunity, - IconChevronDown, - IconChevronLeft, - IconCommand, - IconPrompt, - IconRun, - IconSearch, - IconServer, -} from '@tabler/icons'; +import { ActionIcon, Anchor, Avatar, BackgroundImage, Box, Button, Card, Center, Container, Grid, Group, Stack, Stepper, Text, Title, rem, useMantineColorScheme, useMantineTheme } from '@mantine/core'; +import { IconBox, IconBracketsContainStart, IconBuildingCommunity, IconChevronDown, IconChevronLeft, IconCommand, IconPrompt, IconRun, IconSearch, IconServer } from '@tabler/icons'; import { motion, useScroll, useTransform } from 'framer-motion'; import Image from 'next/image'; @@ -112,13 +82,7 @@ const Visit: NextPage = ({ data }: any) => { }} > <motion.div whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }}> - <ActionIcon - component={Link} - styles={{ root: { height: 64, width: 64, textShadow: '0px 0px 28px #000' } }} - radius="xs" - variant="transparent" - href="#more" - > + <ActionIcon component={Link} styles={{ root: { height: 64, width: 64, textShadow: '0px 0px 28px #000' } }} radius="xs" variant="transparent" href="#more"> <IconChevronDown size={64} color="white" /> </ActionIcon> </motion.div> @@ -171,10 +135,7 @@ const Visit: NextPage = ({ data }: any) => { router.push('#country'); }} > - <span - className={`fi fi-${element.raw} fis`} - style={{ height: 90, width: 90, borderRadius: '50%' }} - ></span> + <span className={`fi fi-${element.raw} fis`} style={{ height: 90, width: 90, borderRadius: '50%' }}></span> <div> <Stack gap={'xs'}> <Text fs="xl" fw="bold"> @@ -209,41 +170,17 @@ const Visit: NextPage = ({ data }: any) => { {t('visit.country.title', { country: selected.location })} </h1> <Stepper active={1} orientation="vertical" my="xl"> - <Stepper.Step - label={t('visit.country.step0.title')} - description={t('visit.country.step0.description')} - icon={<IconSearch style={{ width: rem(18), height: rem(18) }} />} - /> - <Stepper.Step - label={t('visit.country.step1.title')} - description={t('visit.country.step1.description')} - icon={<IconBox style={{ width: rem(18), height: rem(18) }} />} - /> + <Stepper.Step label={t('visit.country.step0.title')} description={t('visit.country.step0.description')} icon={<IconSearch style={{ width: rem(18), height: rem(18) }} />} /> + <Stepper.Step label={t('visit.country.step1.title')} description={t('visit.country.step1.description')} icon={<IconBox style={{ width: rem(18), height: rem(18) }} />} /> {selected.type == 'standalone' ? ( - <Stepper.Step - label={t('visit.country.step2.title', { ip: selected?.ip })} - description={t('visit.country.step2.description', { ip: selected?.ip })} - icon={<IconServer style={{ width: rem(18), height: rem(18) }} />} - /> + <Stepper.Step label={t('visit.country.step2.title', { ip: selected?.ip })} description={t('visit.country.step2.description', { ip: selected?.ip })} icon={<IconServer style={{ width: rem(18), height: rem(18) }} />} /> ) : ( <> - <Stepper.Step - label={t('visit.country.step2.title', { ip: 'buildtheearth.net' })} - description={t('visit.country.step2.description', { ip: 'buildtheearth.net' })} - icon={<IconServer style={{ width: rem(18), height: rem(18) }} />} - /> - <Stepper.Step - label={t('visit.country.step3.title', { slug: selected?.slug })} - description={t('visit.country.step3.description', { slug: selected?.slug })} - icon={<IconPrompt style={{ width: rem(18), height: rem(18) }} />} - /> + <Stepper.Step label={t('visit.country.step2.title', { ip: 'buildtheearth.net' })} description={t('visit.country.step2.description', { ip: 'buildtheearth.net' })} icon={<IconServer style={{ width: rem(18), height: rem(18) }} />} /> + <Stepper.Step label={t('visit.country.step3.title', { slug: selected?.slug })} description={t('visit.country.step3.description', { slug: selected?.slug })} icon={<IconPrompt style={{ width: rem(18), height: rem(18) }} />} /> </> )} - <Stepper.Step - label={t('visit.country.step3.title', { slug: selected?.location })} - description={t('visit.country.step3.description', { slug: selected?.location })} - icon={<IconBuildingCommunity style={{ width: rem(18), height: rem(18) }} />} - /> + <Stepper.Step label={t('visit.country.step3.title', { slug: selected?.location })} description={t('visit.country.step3.description', { slug: selected?.location })} icon={<IconBuildingCommunity style={{ width: rem(18), height: rem(18) }} />} /> </Stepper> <Button mt="xl" component={Link} href="/join#more" leftSection={<IconChevronLeft />}> {' '} diff --git a/src/pages/legal/privacy.tsx b/src/pages/legal/privacy.tsx deleted file mode 100644 index 01d037f3..00000000 --- a/src/pages/legal/privacy.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { Anchor } from '@mantine/core'; -import Link from 'next/link'; -import { NextPage } from 'next'; -import Page from '../../components/Page'; -import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; - -const Team: NextPage = () => { - //TODO: This privacy has to be reworked - return ( - <Page - head={{ - title: 'Privacy', - image: 'https://cdn.buildtheearth.net/static/thumbnails/legal.png', - }} - seo={{ nofollow: true, noindex: true }} - > - <h1>Privacy</h1> - <h2>What information we keep</h2> - <p> - We do not save any personal information from normal visitors. When you log in to <i>My BuildTheEarth</i> using - Discord, we save your Discord account ID and any information you explicitly enter on the website, which should - not include any personal information. - </p> - <h2>Log files</h2> - <p>Build The Earth does not log personally identifyable information such as IP addresses.</p> - <h2>Third Party Privacy Policies</h2> - <p> - Build The Earth's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you - to consult the respective Privacy Policies of these third-party servers for more detailed information. It may - include their practices and instructions about how to opt-out of certain options. You can choose to disable - cookies through your individual browser options. - <br /> - To know more detailed information about cookie management with specific web browsers, it can be found at the - browsers' respective websites. - </p> - <h2>Children's Information</h2> - <p> - Another part of our priority is adding protection for children while using the internet. We encourage parents - and guardians to observe, participate in, and/or monitor and guide their online activity. - <br /> - Build The Earth does not knowingly collect any Personal Identifiable Information from children under the age of - 13. Personal data is only collected when a visitor logs in on <i>My BuildTheEarth</i>, which requires a Discord - account. It is against Discord's Terms of Service for children younger than 13 to create an account. If you - think that your child provided this kind of information on our website, we strongly encourage you{' '} - <Anchor component={Link} href="/contact"> - contact - </Anchor>{' '} - us immediately and we will do our best efforts to promptly remove such information from our records. - </p> - <h2>Online Privacy Policy Only</h2> - <p> - Our Privacy Policy applies only to our online activities and is valid for visitors to our website with regards - to the information that they shared and/or collect in Build The Earth. This policy is not applicable to any - information collected offline or via channels other than this website. - </p> - </Page> - ); -}; - -export default Team; - -export async function getStaticProps({ locale }: any) { - return { - props: { - ...(await serverSideTranslations(locale, ['common'])), - }, - }; -} diff --git a/src/pages/legal/tos.tsx b/src/pages/legal/tos.tsx new file mode 100644 index 00000000..9f23f04b --- /dev/null +++ b/src/pages/legal/tos.tsx @@ -0,0 +1,214 @@ +import { Anchor } from '@mantine/core'; +import Link from 'next/link'; +import { NextPage } from 'next'; +import Page from '../../components/Page'; +import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; + +const Team: NextPage = () => { + //TODO: This privacy has to be reworked + return ( + <Page + head={{ + title: 'Terms of Service', + image: 'https://cdn.buildtheearth.net/static/thumbnails/legal.png', + }} + seo={{ nofollow: true, noindex: true }} + > + <p>Our Terms and Conditions were last updated on 22/10/2023.</p> + <p>Please read these terms and conditions carefully before using Our Service.</p> + <h1 id="interpretation-and-definitions">Interpretation and Definitions</h1> + <h2 id="interpretation">Interpretation</h2> + <p>The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.</p> + <h2 id="definitions">Definitions</h2> + <p>For the purposes of these Terms and Conditions:</p> + <ul> + <li> + <strong>"Affiliate"</strong> means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority. + </li> + <li> + <strong>"Account"</strong> means a unique account created for You to access our Service or parts of our Service. + </li> + <li> + <strong>"Company"</strong> (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to BuildTheEarth. + </li> + <li> + <strong>"Country"</strong> refers to Germany. + </li> + <li> + <strong>"Content"</strong> refers to content such as text, images, or other information that can be posted, uploaded, linked to or otherwise made available by You, regardless of the form of that content. + </li> + <li> + <strong>"Device"</strong> means any device that can access the Service such as a computer, a cellphone or a digital tablet. + </li> + <li> + <strong>"Feedback"</strong> means feedback, innovations or suggestions sent by You regarding the attributes, performance or features of our Service. + </li> + <li> + <strong>"Service"</strong> refers to the Website. + </li> + <li> + <strong>"Terms and Conditions"</strong> (also referred as "Terms" or "Terms of Use") mean these Terms and Conditions that form the entire agreement between You and the Company regarding the use of the Service. + </li> + <li> + <strong>"Third-party Social Media Service"</strong> means any services or content (including data, information, products or services) provided by a third-party that may be displayed, included or made available by the Service. + </li> + <li> + <strong>"Website"</strong> refers to buildtheearth.net, accessible from <Anchor href="https://buildtheearth.net">https://buildtheearth.net</Anchor>, and any subdomain of this domain. + </li> + <li> + <strong>"You"</strong> means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable. + </li> + </ul> + <h1 id="acknowledgment">Acknowledgment</h1> + <p>These are the Terms and Conditions governing the use of this Service and the agreement that operates between You and the Company. These Terms and Conditions set out the rights and obligations of all users regarding the use of the Service.</p> + <p>Your access to and use of the Service is conditioned on Your acceptance of and compliance with these Terms and Conditions. These Terms and Conditions apply to all visitors, users and others who access or use the Service.</p> + <p>By accessing or using the Service You agree to be bound by these Terms and Conditions. If You disagree with any part of these Terms and Conditions then You may not access the Service.</p> + <p>You represent that you are over the age of 18. The Company does not permit those under 18 to use the Service.</p> + <p> + Your access to and use of the Service is also conditioned on Your acceptance of and compliance with the Privacy Policy of the Company. Our Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your personal information when You use the Application or the Website and tells You about Your privacy rights + and how the law protects You. Please read Our Privacy Policy carefully before using Our Service. + </p> + <h1 id="user-accounts">User Accounts</h1> + <p>When You create an account with Us, You must provide Us information that is accurate, complete, and current at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate termination of Your account on Our Service.</p> + <p>You are responsible for safeguarding the password that You use to access the Service and for any activities or actions under Your password, whether Your password is with Our Service or a Third-Party Social Media Service.</p> + <p>You agree not to disclose Your password to any third party. You must notify Us immediately upon becoming aware of any breach of security or unauthorized use of Your account.</p> + <p>You may not use as a username the name of another person or entity or that is not lawfully available for use, a name or trademark that is subject to any rights of another person or entity other than You without appropriate authorization, or a name that is otherwise offensive, vulgar or obscene.</p> + <h1 id="content">Content</h1> + <h2 id="your-right-to-post-content">Your Right to Post Content</h2> + <p>Our Service allows You to post Content. You are responsible for the Content that You post to the Service, including its legality, reliability, and appropriateness.</p> + <p> + By posting Content to the Service, You grant Us the right and license to use, modify, publicly perform, publicly display, reproduce, and distribute such Content on and through the Service. You retain any and all of Your rights to any Content You submit, post or display on or through the Service and You are responsible for protecting those + rights. You agree that this license includes the right for Us to make Your Content available to other users of the Service, who may also use Your Content subject to these Terms. + </p> + <p> + You represent and warrant that: (i) the Content is Yours (You own it) or You have the right to use it and grant Us the rights and license as provided in these Terms, and (ii) the posting of Your Content on or through the Service does not violate the privacy rights, publicity rights, copyrights, contract rights or any other rights of any + person. + </p> + <h2 id="content-restrictions">Content Restrictions</h2> + <p>The Company is not responsible for the content of the Service's users. You expressly understand and agree that You are solely responsible for the Content and for all activity that occurs under your account, whether done so by You or any third person using Your account.</p> + <p>You may not transmit any Content that is unlawful, offensive, upsetting, intended to disgust, threatening, libelous, defamatory, obscene or otherwise objectionable. Examples of such objectionable Content include, but are not limited to, the following:</p> + <ul> + <li>Unlawful or promoting unlawful activity.</li> + <li>Defamatory, discriminatory, or mean-spirited content, including references or commentary about religion, race, sexual orientation, gender, national/ethnic origin, or other targeted groups.</li> + <li>Spam, machine – or randomly – generated, constituting unauthorized or unsolicited advertising, chain letters, any other form of unauthorized solicitation, or any form of lottery or gambling.</li> + <li>Containing or installing any viruses, worms, malware, trojan horses, or other content that is designed or intended to disrupt, damage, or limit the functioning of any software, hardware or telecommunications equipment or to damage or obtain unauthorized access to any data or other information of a third person.</li> + <li>Infringing on any proprietary rights of any party, including patent, trademark, trade secret, copyright, right of publicity or other rights.</li> + <li>Impersonating any person or entity including the Company and its employees or representatives.</li> + <li>Violating the privacy of any third person.</li> + <li>False information and features.</li> + </ul> + <p> + The Company reserves the right, but not the obligation, to, in its sole discretion, determine whether or not any Content is appropriate and complies with this Terms, refuse or remove this Content. The Company further reserves the right to make formatting and edits and change the manner of any Content. The Company can also limit or revoke + the use of the Service if You post such objectionable Content. + <br /> + As the Company cannot control all content posted by users and/or third parties on the Service, you agree to use the Service at your own risk. You understand that by using the Service You may be exposed to content that You may find offensive, indecent, incorrect or objectionable, and You agree that under no circumstances will the Company be + liable in any way for any content, including any errors or omissions in any content, or any loss or damage of any kind incurred as a result of your use of any content. + </p> + <h2 id="content-backups">Content Backups</h2> + <p>Although regular backups of Content are performed, the Company does not guarantee there will be no loss or corruption of data.</p> + <p>Corrupt or invalid backup points may be caused by, without limitation, Content that is corrupted prior to being backed up or that changes during the time a backup is performed.</p> + <p>The Company will provide support and attempt to troubleshoot any known or discovered issues that may affect the backups of Content. But You acknowledge that the Company has no liability related to the integrity of Content or the failure to successfully restore Content to a usable state.</p> + <p>You agree to maintain a complete and accurate copy of any Content in a location independent of the Service.</p> + <h1 id="copyright-policy">Copyright Policy</h1> + <h2 id="intellectual-property-infringement">Intellectual Property Infringement</h2> + <p>We respect the intellectual property rights of others. It is Our policy to respond to any claim that Content posted on the Service infringes a copyright or other intellectual property infringement of any person.</p> + <p> + If You are a copyright owner, or authorized on behalf of one, and You believe that the copyrighted work has been copied in a way that constitutes copyright infringement that is taking place through the Service, You must submit Your notice in writing to the attention of Us via email (contact@buildtheearth.net) and include in Your notice a + detailed description of the alleged infringement. + </p> + <p>You may be held accountable for damages (including costs and attorneys' fees) for misrepresenting that any Content is infringing Your copyright.</p> + <h2 id="dmca-notice-and-dmca-procedure-for-copyright-infringement-claims">DMCA Notice and DMCA Procedure for Copyright Infringement Claims</h2> + <p>You may submit a notification pursuant to the Digital Millennium Copyright Act (DMCA) by providing Us with the following information in writing (see 17 U.S.C 512(c)(3) for further detail):</p> + <ul> + <li>An electronic or physical signature of the person authorized to act on behalf of the owner of the copyright's interest.</li> + <li>A description of the copyrighted work that You claim has been infringed, including the URL (i.e., web page address) of the location where the copyrighted work exists or a copy of the copyrighted work.</li> + <li>Identification of the URL or other specific location on the Service where the material that You claim is infringing is located.</li> + <li>Your address, telephone number, and email address.</li> + <li>A statement by You that You have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law.</li> + <li>A statement by You, made under penalty of perjury, that the above information in Your notice is accurate and that You are the copyright owner or authorized to act on the copyright owner's behalf.</li> + </ul> + <p>You can contact Us via email (contact@buildtheearth.net). Upon receipt of a notification, the Company will take whatever action, in its sole discretion, it deems appropriate, including removal of the challenged content from the Service.</p> + <h2 id="intellectual-property">Intellectual Property</h2> + <p>The Service and its original content (excluding Content provided by You or other users), features and functionality are and will remain the exclusive property of the Company and its licensors.</p> + <p>The Service is protected by copyright, trademark, and other laws of both the Country and foreign countries.</p> + <p>Our trademarks and trade dress may not be used in connection with any product or service without the prior written consent of the Company.</p> + <h1 id="your-feedback-to-us">Your Feedback to Us</h1> + <p> + You assign all rights, title and interest in any Feedback You provide the Company. If for any reason such assignment is ineffective, You agree to grant the Company a non-exclusive, perpetual, irrevocable, royalty free, worldwide right and license to use, reproduce, disclose, sub-license, distribute, modify and exploit such Feedback without + restriction. + </p> + <h1 id="links-to-other-websites">Links to Other Websites</h1> + <p>Our Service may contain links to third-party web sites or services that are not owned or controlled by the Company.</p> + <p> + The Company has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection + with the use of or reliance on any such content, goods or services available on or through any such web sites or services. + </p> + <p>We strongly advise You to read the terms and conditions and privacy policies of any third-party web sites or services that You visit.</p> + <h1 id="termination">Termination</h1> + <p>We may terminate or suspend Your Account immediately, without prior notice or liability, for any reason whatsoever, including without limitation if You breach these Terms and Conditions.</p> + <p>Upon termination, Your right to use the Service will cease immediately. If You wish to terminate Your Account, You may simply discontinue using the Service.</p> + <h1 id="limitation-of-liability">Limitation of Liability</h1> + <p> + To the maximum extent permitted by applicable law, in no event shall the Company or its suppliers be liable for any special, incidental, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits, loss of data or other information, for business interruption, for personal injury, loss of privacy + arising out of or in any way related to the use of or inability to use the Service, third-party software and/or third-party hardware used with the Service, or otherwise in connection with any provision of this Terms), even if the Company or any supplier has been advised of the possibility of such damages and even if the remedy fails of its + essential purpose. + </p> + <p>Some states do not allow the exclusion of implied warranties or limitation of liability for incidental or consequential damages, which means that some of the above limitations may not apply. In these states, each party's liability will be limited to the greatest extent permitted by law.</p> + <h1 id="-as-is-and-as-available-disclaimer">"AS IS" and "AS AVAILABLE" Disclaimer</h1> + <p> + The Service is provided to You "AS IS" and "AS AVAILABLE" and with all faults and defects without warranty of any kind. To the maximum extent permitted under applicable law, the Company, on its own behalf and on behalf of its Affiliates and its and their respective licensors and service providers, expressly disclaims all + warranties, whether express, implied, statutory or otherwise, with respect to the Service, including all implied warranties of merchantability, fitness for a particular purpose, title and non-infringement, and warranties that may arise out of course of dealing, course of performance, usage or trade practice. Without limitation to the + foregoing, the Company provides no warranty or undertaking, and makes no representation of any kind that the Service will meet Your requirements, achieve any intended results, be compatible or work with any other software, applications, systems or services, operate without interruption, meet any performance or reliability standards or be + error free or that any errors or defects can or will be corrected. + </p> + <p> + Without limiting the foregoing, neither the Company nor any of the company's provider makes any representation or warranty of any kind, express or implied: (i) as to the operation or availability of the Service, or the information, content, and materials or products included thereon; (ii) that the Service will be uninterrupted or + error-free; (iii) as to the accuracy, reliability, or currency of any information or content provided through the Service; or (iv) that the Service, its servers, the content, or e-mails sent from or on behalf of the Company are free of viruses, scripts, trojan horses, worms, malware, timebombs or other harmful components. + </p> + <p> + Some jurisdictions do not allow the exclusion of certain types of warranties or limitations on applicable statutory rights of a consumer, so some or all of the above exclusions and limitations may not apply to You. But in such a case the exclusions and limitations set forth in this section shall be applied to the greatest extent enforceable + under applicable law. + </p> + <h1 id="governing-law">Governing Law</h1> + <p>The laws of the Country, excluding its conflicts of law rules, shall govern this Terms and Your use of the Service. Your use of the Application may also be subject to other local, state, national, or international laws.</p> + <h1 id="disputes-resolution">Disputes Resolution</h1> + <p>If You have any concern or dispute about the Service, You agree to first try to resolve the dispute informally by contacting the Company.</p> + <h1 id="for-european-union-eu-users">For European Union (EU) Users</h1> + <p>If You are a European Union consumer, you will benefit from any mandatory provisions of the law of the country in which you are resident in.</p> + <h1 id="united-states-legal-compliance">United States Legal Compliance</h1> + <p>You represent and warrant that (i) You are not located in a country that is subject to the United States government embargo, or that has been designated by the United States government as a "terrorist supporting" country, and (ii) You are not listed on any United States government list of prohibited or restricted parties.</p> + <h1 id="severability-and-waiver">Severability and Waiver</h1> + <h2 id="severability">Severability</h2> + <p>If any provision of these Terms is held to be unenforceable or invalid, such provision will be changed and interpreted to accomplish the objectives of such provision to the greatest extent possible under applicable law and the remaining provisions will continue in full force and effect.</p> + <h2 id="waiver">Waiver</h2> + <p>Except as provided herein, the failure to exercise a right or to require performance of an obligation under these Terms shall not effect a party's ability to exercise such right or require such performance at any time thereafter nor shall be the waiver of a breach constitute a waiver of any subsequent breach.</p> + <h1 id="translation-interpretation">Translation Interpretation</h1> + <p> + These Terms and Conditions may have been translated if We have made them available to You on our Service. + <br /> + You agree that the original English text shall prevail in the case of a dispute. + </p> + <h1 id="changes-to-these-terms-and-conditions">Changes to These Terms and Conditions</h1> + <p>We reserve the right, at Our sole discretion, to modify or replace these Terms at any time. If a revision is material We will make reasonable efforts to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at Our sole discretion.</p> + <p>By continuing to access or use Our Service after those revisions become effective, You agree to be bound by the revised terms. If You do not agree to the new terms, in whole or in part, please stop using the website and the Service.</p> + <h1 id="contact-us">Contact Us</h1> + <p>If you have any questions about these Terms and Conditions, You can contact us:</p> + <ul> + <li> + By visiting this page on our website: <Anchor href="https://buildtheearth.net/contact">https://buildtheearth.net/contact</Anchor> + </li> + <li>By sending us an email: contact@buildtheearth.net</li> + </ul> + </Page> + ); +}; + +export default Team; + +export async function getStaticProps({ locale }: any) { + return { + props: { + ...(await serverSideTranslations(locale, ['common'])), + }, + }; +} diff --git a/src/pages/me/claims/[id].tsx b/src/pages/me/claims/[id].tsx index fcd6478f..91415601 100644 --- a/src/pages/me/claims/[id].tsx +++ b/src/pages/me/claims/[id].tsx @@ -84,54 +84,18 @@ const ClaimPage: NextPage = ({ claimId, data }: any) => { ) : ( <Grid> <Grid.Col span={{ md: 6 }}> - <TextInput - label="Claim Name" - required - defaultValue={additionalData.name} - onChange={(e) => editData('name', e.target.value)} - mb="md" - /> - <Switch - defaultChecked={additionalData.finished} - label="Claim is finished" - onChange={(e) => editData('finished', e.target.checked)} - mb="md" - /> - <Switch - defaultChecked={additionalData.active} - label="Show on map" - onChange={(e) => editData('active', e.target.checked)} - mb="md" - /> + <TextInput label="Claim Name" required defaultValue={additionalData.name} onChange={(e) => editData('name', e.target.value)} mb="md" /> + <Switch defaultChecked={additionalData.finished} label="Claim is finished" onChange={(e) => editData('finished', e.target.checked)} mb="md" /> + <Switch defaultChecked={additionalData.active} label="Show on map" onChange={(e) => editData('active', e.target.checked)} mb="md" /> <h3>Builders</h3> - <Alert - variant="light" - color="yellow" - mb="xl" - icon={<IconAlertCircle />} - title="Editing Builders currently does not work" - > + <Alert variant="light" color="yellow" mb="xl" icon={<IconAlertCircle />} title="Editing Builders currently does not work"> If there are any incorrect Builders listed for this claim, message us. </Alert> <Group> - <Button - variant="outline" - component="a" - href={ - router.query.z && router.query.lat && router.query.lng - ? `/map?z=${router.query.z}&lat=${router.query.lat}&lng=${router.query.lng}` - : '/map' - } - leftSection={<IconChevronLeft />} - > + <Button variant="outline" component="a" href={router.query.z && router.query.lat && router.query.lng ? `/map?z=${router.query.z}&lat=${router.query.lat}&lng=${router.query.lng}` : '/map'} leftSection={<IconChevronLeft />}> Back </Button> - <Button - onClick={handleSubmit} - disabled={!user?.token} - loading={loading} - leftSection={<IconDeviceFloppy />} - > + <Button onClick={handleSubmit} disabled={!user?.token} loading={loading} leftSection={<IconDeviceFloppy />}> Save </Button> </Group> diff --git a/src/pages/newsletter/[newsletter]/index.tsx b/src/pages/newsletter/[newsletter]/index.tsx index ad380cc0..26b9b97a 100644 --- a/src/pages/newsletter/[newsletter]/index.tsx +++ b/src/pages/newsletter/[newsletter]/index.tsx @@ -20,9 +20,7 @@ const Newsletter: NextPage = () => { image: data?.links[0] || 'https://cdn.buildtheearth.net/static/thumbnails/newsletter.png', subtitle: `Issue ${data?.issue}, ${new Date(data?.published_date).toLocaleDateString()}`, }} - description={`BuildTheEarth Newsletter Issue ${data?.issue}, ${new Date( - data?.published_date, - ).toLocaleDateString()}`} + description={`BuildTheEarth Newsletter Issue ${data?.issue}, ${new Date(data?.published_date).toLocaleDateString()}`} > <Group style={{ width: '100%' }}> {data?.links.slice(1).map((link: any) => ( diff --git a/src/pages/teams/[team]/manage/apply.tsx b/src/pages/teams/[team]/manage/apply.tsx index 4183ecba..a92a5f1d 100644 --- a/src/pages/teams/[team]/manage/apply.tsx +++ b/src/pages/teams/[team]/manage/apply.tsx @@ -1,20 +1,4 @@ -import { - ActionIcon, - Anchor, - Button, - Card, - Divider, - Group, - Menu, - Modal, - SegmentedControl, - Stack, - Switch, - Text, - TextInput, - Title, - useMantineTheme, -} from '@mantine/core'; +import { ActionIcon, Anchor, Button, Card, Divider, Group, Menu, Modal, SegmentedControl, Stack, Switch, Text, TextInput, Title, useMantineTheme } from '@mantine/core'; import { ApplicationQuestions, toReadable } from '../../../../utils/application/ApplicationQuestions'; import { IconCheck, IconChevronDown, IconChevronUp, IconLetterT, IconPlus } from '@tabler/icons'; import Question, { EditQuestion } from '../../../../components/application/questions/Question'; @@ -24,7 +8,7 @@ import Link from 'next/link'; import { NextPage } from 'next'; import Page from '../../../../components/Page'; import SettingsTabs from '../../../../components/SettingsTabs'; -import Team from '../../../legal/privacy'; +import Team from '../../../legal/tos'; import fetcher from '../../../../utils/Fetcher'; import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import { showNotification } from '@mantine/notifications'; diff --git a/src/pages/teams/[team]/manage/images.tsx b/src/pages/teams/[team]/manage/images.tsx index 4777581a..247f8c55 100644 --- a/src/pages/teams/[team]/manage/images.tsx +++ b/src/pages/teams/[team]/manage/images.tsx @@ -1,16 +1,4 @@ -import { - ActionIcon, - AspectRatio, - Button, - FileInput, - Group, - Image, - Table, - Text, - TextInput, - Tooltip, - rem, -} from '@mantine/core'; +import { ActionIcon, AspectRatio, Button, FileInput, Group, Image, Table, Text, TextInput, Tooltip, rem } from '@mantine/core'; import { IconPencil, IconPlus, IconTrash } from '@tabler/icons'; import useSWR, { mutate } from 'swr'; @@ -40,8 +28,7 @@ const Settings = () => { centered: true, children: ( <Text> - Are you sure you want to delete the showcase image of <b>{image.title}</b> from the team? This action cannot - be undone. + Are you sure you want to delete the showcase image of <b>{image.title}</b> from the team? This action cannot be undone. </Text> ), labels: { confirm: 'Delete Image', cancel: 'Cancel' }, @@ -89,20 +76,8 @@ const Settings = () => { title: 'Add a new Showcase Image', children: ( <> - <TextInput - label="Name" - description="The Name of the Showcase" - required - onChange={(e) => (name = e.target.value)} - /> - <FileInput - label="Image" - placeholder="Select an image..." - mt="md" - required - onChange={(e) => (image = e)} - accept="image/*" - /> + <TextInput label="Name" description="The Name of the Showcase" required onChange={(e) => (name = e.target.value)} /> + <FileInput label="Image" placeholder="Select an image..." mt="md" required onChange={(e) => (image = e)} accept="image/*" /> <DateInput defaultValue={new Date()} onChange={(e) => (date = e)} label="Date" mt="md" /> <Button mt="md" @@ -189,11 +164,7 @@ const Settings = () => { </AspectRatio> </Table.Td> <Table.Td> - <Tooltip - withinPortal - label={s.createdAt ? vagueTime.get({ to: new Date(s.createdAt) }) : ''} - position="top-start" - > + <Tooltip withinPortal label={s.createdAt ? vagueTime.get({ to: new Date(s.createdAt) }) : ''} position="top-start"> <p>{new Date(s.createdAt).toLocaleDateString()} </p> </Tooltip> </Table.Td> diff --git a/src/pages/teams/[team]/manage/members.tsx b/src/pages/teams/[team]/manage/members.tsx index 5ea89581..c547546f 100644 --- a/src/pages/teams/[team]/manage/members.tsx +++ b/src/pages/teams/[team]/manage/members.tsx @@ -1,21 +1,4 @@ -import { - ActionIcon, - Badge, - Button, - Checkbox, - Chip, - Group, - ScrollArea, - ScrollAreaAutosize, - Stack, - Table, - Text, - TextInput, - Title, - rem, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; +import { ActionIcon, Badge, Button, Checkbox, Chip, Group, ScrollArea, ScrollAreaAutosize, Stack, Table, Text, TextInput, Title, rem, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { IconEdit, IconPencil, IconPlus, IconStar, IconTrash } from '@tabler/icons'; import useSWR, { mutate } from 'swr'; @@ -44,12 +27,7 @@ const Settings = () => { modals.openConfirmModal({ title: `Remove ${capitalize(member.username)}`, centered: true, - children: ( - <Text> - Are you sure you want to remove {capitalize(member.username)} from the team? This action cannot be undone, the - user needs to reapply. - </Text> - ), + children: <Text>Are you sure you want to remove {capitalize(member.username)} from the team? This action cannot be undone, the user needs to reapply.</Text>, labels: { confirm: 'Remove Builder', cancel: 'Cancel' }, confirmProps: { color: 'red' }, onCancel: () => @@ -95,12 +73,7 @@ const Settings = () => { onClose: () => (hasUpdated ? mutate(`/buildteams/${router.query.team}/managers`) : null), children: ( <> - <TextInput - label="ID" - description="The ID of the User" - placeholder={user.user.id} - onChange={(e) => (id = e.target.value)} - /> + <TextInput label="ID" description="The ID of the User" placeholder={user.user.id} onChange={(e) => (id = e.target.value)} /> <Button mt="md" onClick={() => handleEditManager({ id, username: id })}> Next </Button> @@ -154,11 +127,7 @@ const Settings = () => { modals.openConfirmModal({ title: `Remove ${capitalize(member.username)}´s Permissions`, centered: true, - children: ( - <Text> - Are you sure you want to remove {capitalize(member.username)}´s Permissions? This action cannot be undone. - </Text> - ), + children: <Text>Are you sure you want to remove {capitalize(member.username)}´s Permissions? This action cannot be undone.</Text>, labels: { confirm: 'Remove Permissions', cancel: 'Cancel' }, confirmProps: { color: 'red' }, onCancel: () => @@ -244,12 +213,7 @@ const Settings = () => { data={builders ? builders.filter((b: any) => b.username.toLowerCase().includes(filter.toLowerCase())) : []} actions={(data) => ( <Group gap={0} justify="flex-end"> - <ActionIcon - variant="subtle" - color="red" - onClick={() => handleRemoveBuilder(data)} - loading={loadingManagers} - > + <ActionIcon variant="subtle" color="red" onClick={() => handleRemoveBuilder(data)} loading={loadingManagers}> <IconTrash style={{ width: rem(18), height: rem(18) }} stroke={1.5} /> </ActionIcon> </Group> @@ -273,20 +237,10 @@ const Settings = () => { data={managers ? managers.filter((b: any) => b.username.toLowerCase().includes(filter.toLowerCase())) : []} actions={(data) => ( <Group gap={0} justify="flex-end"> - <ActionIcon - variant="subtle" - color="gray" - onClick={() => handleEditManager(data)} - loading={loadingManagers} - > + <ActionIcon variant="subtle" color="gray" onClick={() => handleEditManager(data)} loading={loadingManagers}> <IconPencil style={{ width: rem(18), height: rem(18) }} stroke={1.5} /> </ActionIcon> - <ActionIcon - variant="subtle" - color="red" - onClick={() => handleRemoveManager(data)} - loading={loadingManagers} - > + <ActionIcon variant="subtle" color="red" onClick={() => handleRemoveManager(data)} loading={loadingManagers}> <IconTrash style={{ width: rem(18), height: rem(18) }} stroke={1.5} /> </ActionIcon> </Group> @@ -294,12 +248,7 @@ const Settings = () => { extraHead={<Table.Th>Permissions</Table.Th>} extraContent={(data) => ( <Table.Td> - <Badge - color="yellow" - variant="light" - style={{ cursor: 'pointer' }} - onClick={() => handleEditManager(data)} - > + <Badge color="yellow" variant="light" style={{ cursor: 'pointer' }} onClick={() => handleEditManager(data)}> {data.permissions.length} </Badge> </Table.Td> diff --git a/src/pages/teams/[team]/manage/settings.tsx b/src/pages/teams/[team]/manage/settings.tsx index 52450eb4..983360a4 100644 --- a/src/pages/teams/[team]/manage/settings.tsx +++ b/src/pages/teams/[team]/manage/settings.tsx @@ -1,17 +1,4 @@ -import { - Alert, - Button, - Divider, - Grid, - Group, - Input, - Select, - Switch, - TextInput, - Textarea, - useMantineColorScheme, - useMantineTheme, -} from '@mantine/core'; +import { Alert, Button, Divider, Grid, Group, Input, Select, Switch, TextInput, Textarea, useMantineColorScheme, useMantineTheme } from '@mantine/core'; import { IconAlertCircle, IconCheck, IconPlus, IconTrash } from '@tabler/icons'; import { useEffect, useState } from 'react'; @@ -107,50 +94,11 @@ const Settings = ({ data: tempData }: any) => { <h3>General Settings</h3> <Grid grow> <Grid.Col span={{ md: 6 }}> - <TextInput - required - label="BuildTeam Name" - description="The name that should be displayed on the Build Team List." - mb="md" - defaultValue={data.name} - disabled={!allowSettings} - onChange={(e) => handleUpdate('name', e.target.value)} - /> - <TextInput - required - label="Logo URL" - description="The logo that should be displayed on the Build Team List." - mb="md" - defaultValue={data.icon} - disabled={!allowSettings} - onChange={(e) => handleUpdate('icon', e.target.value)} - /> - <TextInput - required - label="Background Image URL" - description="The background image that should be displayed on the Build Team Page." - mb="md" - defaultValue={data.backgroundImage} - disabled={!allowSettings} - onChange={(e) => handleUpdate('backgroundImage', e.target.value)} - /> - <TextInput - required - label="Locations" - description="A comma seperated list of 2-letter-ISO-codes that the Build Team is building in. If its a global Build Team this should be set to `glb`" - mb="md" - defaultValue={data.location} - disabled={!allowSettings} - onChange={(e) => handleUpdate('location', e.target.value)} - /> - <TextInput - required - label="Build Team Slug" - description="A short form of the Build Team name that can be used in the URL. Has to be unique, coordinate with BTE Staff. Use the countrie´s two-letter code if possible." - defaultValue={data.slug} - disabled={!allowSettings} - onChange={(e) => handleUpdate('slug', e.target.value)} - /> + <TextInput required label="BuildTeam Name" description="The name that should be displayed on the Build Team List." mb="md" defaultValue={data.name} disabled={!allowSettings} onChange={(e) => handleUpdate('name', e.target.value)} /> + <TextInput required label="Logo URL" description="The logo that should be displayed on the Build Team List." mb="md" defaultValue={data.icon} disabled={!allowSettings} onChange={(e) => handleUpdate('icon', e.target.value)} /> + <TextInput required label="Background Image URL" description="The background image that should be displayed on the Build Team Page." mb="md" defaultValue={data.backgroundImage} disabled={!allowSettings} onChange={(e) => handleUpdate('backgroundImage', e.target.value)} /> + <TextInput required label="Locations" description="A comma seperated list of 2-letter-ISO-codes that the Build Team is building in. If its a global Build Team this should be set to `glb`" mb="md" defaultValue={data.location} disabled={!allowSettings} onChange={(e) => handleUpdate('location', e.target.value)} /> + <TextInput required label="Build Team Slug" description="A short form of the Build Team name that can be used in the URL. Has to be unique, coordinate with BTE Staff. Use the countrie´s two-letter code if possible." defaultValue={data.slug} disabled={!allowSettings} onChange={(e) => handleUpdate('slug', e.target.value)} /> <TextInput required label="Minecraft IP" @@ -179,37 +127,16 @@ const Settings = ({ data: tempData }: any) => { onChange={(e) => allowSettings && handleUpdate('about', e)} /> </Input.Wrapper> - <Switch - label="Trial Applications" - description="If new Users should be able to apply as Trial to the Build Team and then build their builder application builds on the Build Team´s server." - defaultChecked={data.allowTrial} - mt="md" - disabled={!allowSettings} - onChange={(e) => handleUpdate('allowTrial', e.target.checked)} - /> + <Switch label="Trial Applications" description="If new Users should be able to apply as Trial to the Build Team and then build their builder application builds on the Build Team´s server." defaultChecked={data.allowTrial} mt="md" disabled={!allowSettings} onChange={(e) => handleUpdate('allowTrial', e.target.checked)} /> </Grid.Col> </Grid> <h4>Messages</h4> <Grid grow mb="md"> <Grid.Col span={{ md: 6 }}> - <Textarea - label="Acception Message" - description="The Message the Discord Bot should send Users if they get accepted as Builders." - defaultValue={data.acceptionMessage} - minRows={9} - disabled={!allowSettings} - onChange={(e) => handleUpdate('acceptionMessage', e.target.value)} - /> + <Textarea label="Acception Message" description="The Message the Discord Bot should send Users if they get accepted as Builders." defaultValue={data.acceptionMessage} minRows={9} disabled={!allowSettings} onChange={(e) => handleUpdate('acceptionMessage', e.target.value)} /> </Grid.Col> <Grid.Col span={{ md: 6 }}> - <Textarea - label="Rejection Message" - description="The Message the Discord Bot should send Users if they get Rejected." - defaultValue={data.rejectionMessage} - minRows={9} - disabled={!allowSettings} - onChange={(e) => handleUpdate('rejectionMessage', e.target.value)} - /> + <Textarea label="Rejection Message" description="The Message the Discord Bot should send Users if they get Rejected." defaultValue={data.rejectionMessage} minRows={9} disabled={!allowSettings} onChange={(e) => handleUpdate('rejectionMessage', e.target.value)} /> </Grid.Col> </Grid> <Textarea @@ -230,21 +157,10 @@ const Settings = ({ data: tempData }: any) => { <Divider mt="md" /> <h3>Socials</h3> <form onSubmit={handleSave}> - <Alert - variant="light" - color="yellow" - mb="md" - icon={<IconAlertCircle />} - title="Editing Social Links currently does not work" - > + <Alert variant="light" color="yellow" mb="md" icon={<IconAlertCircle />} title="Editing Social Links currently does not work"> If there are any bugged social links on the build team page right now, message us. </Alert> - <Button - leftSection={<IconPlus />} - mb="md" - onClick={() => handleAddSocial({ id: uuidv4(), buildTeamId: data.id })} - disabled={!allowSocial} - > + <Button leftSection={<IconPlus />} mb="md" onClick={() => handleAddSocial({ id: uuidv4(), buildTeamId: data.id })} disabled={!allowSocial}> Add Social Link </Button> {data.socials.map((social: any, i: number) => ( @@ -268,27 +184,9 @@ const Settings = ({ data: tempData }: any) => { disabled={!allowSocial} onChange={(e) => handleUpdateSocial(i, 'icon', e)} /> - <TextInput - required - label="Social Name" - defaultValue={social.name} - disabled={!allowSocial} - onChange={(e) => handleUpdateSocial(i, 'name', e.target.value)} - /> - <TextInput - required - label="URL" - defaultValue={social.url} - disabled={!allowSocial} - onChange={(e) => handleUpdateSocial(i, 'url', e.target.value)} - /> - <Button - variant="outline" - style={{ width: '80%' }} - leftSection={<IconTrash />} - disabled={!allowSocial} - onClick={() => handleDeleteSocial(social.id)} - > + <TextInput required label="Social Name" defaultValue={social.name} disabled={!allowSocial} onChange={(e) => handleUpdateSocial(i, 'name', e.target.value)} /> + <TextInput required label="URL" defaultValue={social.url} disabled={!allowSocial} onChange={(e) => handleUpdateSocial(i, 'url', e.target.value)} /> + <Button variant="outline" style={{ width: '80%' }} leftSection={<IconTrash />} disabled={!allowSocial} onClick={() => handleDeleteSocial(social.id)}> Delete </Button> </Group> diff --git a/src/styles/globals.css b/src/styles/globals.css index d60decbc..0940e053 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -18,8 +18,7 @@ font-weight: 100 900; font-display: optional; src: url('../../public/fonts/Inter.var.latin.woff2') format('woff2'); - unicode-range: U+00??, U+0131, U+0152-0153, U+02bb-02bc, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2122, - U+2191, U+2193, U+2212, U+2215, U+feff, U+fffd; + unicode-range: U+00??, U+0131, U+0152-0153, U+02bb-02bc, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2122, U+2191, U+2193, U+2212, U+2215, U+feff, U+fffd; } html, @@ -28,8 +27,7 @@ body, scroll-behavior: smooth; padding: 0; margin: 0; - font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', - 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; width: 100%; height: 100%; } @@ -41,8 +39,7 @@ a { * { box-sizing: border-box; - font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', - 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; } .canvas {