Add dmca email and page!

This commit is contained in:
Cooper Ransom 2024-02-29 23:14:36 -05:00
parent 82a85ef349
commit cd440de3a7
4 changed files with 26 additions and 7 deletions

View File

@ -6,7 +6,7 @@ window.__CONFIG__ = {
VITE_TMDB_READ_API_KEY: "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiZmU0OGY4NjFkY2NmMjczMzUyMDdmMWVjYmVkNjNjNiIsInN1YiI6IjY1YjNmMWI0NTk0Yzk0MDE2MzNkZDBjNSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.GiCKswc2u9NraBbujm0ykI5G3p-K9WJoHg40jYbFv4o", VITE_TMDB_READ_API_KEY: "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiZmU0OGY4NjFkY2NmMjczMzUyMDdmMWVjYmVkNjNjNiIsInN1YiI6IjY1YjNmMWI0NTk0Yzk0MDE2MzNkZDBjNSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.GiCKswc2u9NraBbujm0ykI5G3p-K9WJoHg40jYbFv4o",
// The DMCA email displayed in the footer, null to hide the DMCA link // The DMCA email displayed in the footer, null to hide the DMCA link
VITE_DMCA_EMAIL: null, VITE_DMCA_EMAIL: "dreadpiratecozi@onionmail.org",
// Whether to disable hash-based routing, leave this as false if you don't know what this is // Whether to disable hash-based routing, leave this as false if you don't know what this is
VITE_NORMAL_ROUTER: false, VITE_NORMAL_ROUTER: false,

View File

@ -412,8 +412,8 @@
}, },
"screens": { "screens": {
"dmca": { "dmca": {
"text": "Welcome to sudo-flix's DMCA contact page! We respect intellectual property rights and want to address any copyright concerns swiftly. If you believe your copyrighted work has been improperly used on our platform (😢), please send a detailed DMCA notice to the email below. Please include a description of the copyrighted material, your contact details, and a statement of good faith belief. We're committed to resolving these matters promptly and appreciate your cooperation in keeping sudo-flix a place that respects creativity and copyrights.", "text": "Welcome to sudo-flix's DMCA contact page. If you believe your copyrighted work has been improperly used on our platform (😢), please send a detailed DMCA notice to: <bold>dreadpiratecozi@onionmail.org</bold> below. Please include a description of the copyrighted material, your contact details, and a statement of good faith belief. We're committed to resolving these matters promptly and appreciate your cooperation.",
"title": "DMCA" "title": "DMCA :("
}, },
"loadingApp": "Loading application", "loadingApp": "Loading application",
"loadingUser": "Loading your profile", "loadingUser": "Loading your profile",
@ -550,4 +550,3 @@
"unsaved": "You have unsaved changes... ฅ^•ﻌ•^ฅ" "unsaved": "You have unsaved changes... ฅ^•ﻌ•^ฅ"
} }
} }

View File

@ -47,6 +47,7 @@ function Dmca() {
const { t } = useTranslation(); const { t } = useTranslation();
if (!shouldHaveDmcaPage()) return null; if (!shouldHaveDmcaPage()) return null;
if (window.location.hash === "#/dmca") return null;
return ( return (
<FooterLink to="/dmca" icon={Icons.DRAGON}> <FooterLink to="/dmca" icon={Icons.DRAGON}>

View File

@ -1,4 +1,5 @@
import { useTranslation } from "react-i18next"; import React, { useState } from "react";
import { Trans, useTranslation } from "react-i18next";
import { Icon, Icons } from "@/components/Icon"; import { Icon, Icons } from "@/components/Icon";
import { ThinContainer } from "@/components/layout/ThinContainer"; import { ThinContainer } from "@/components/layout/ThinContainer";
@ -14,16 +15,34 @@ export function shouldHaveDmcaPage() {
export function DmcaPage() { export function DmcaPage() {
const { t } = useTranslation(); const { t } = useTranslation();
const [isHovered, setIsHovered] = useState(false);
return ( return (
<SubPageLayout> <SubPageLayout>
<PageTitle subpage k="global.pages.dmca" /> <PageTitle subpage k="global.pages.dmca" />
<ThinContainer> <ThinContainer>
<Heading1>{t("screens.dmca.title")}</Heading1> <Heading1>{t("screens.dmca.title")}</Heading1>
<Paragraph>{t("screens.dmca.text")}</Paragraph> <Paragraph>
<Trans
i18nKey="screens.dmca.text"
components={{
bold: <span className="font-bold" style={{ color: "#cfcfcf" }} />,
}}
/>
</Paragraph>
<Paragraph className="flex space-x-3 items-center"> <Paragraph className="flex space-x-3 items-center">
<Icon icon={Icons.MAIL} /> <Icon icon={Icons.MAIL} />
<span>{conf().DMCA_EMAIL ?? ""}</span> <a
href={`mailto:${conf().DMCA_EMAIL}`}
style={{
transition: "color 0.3s ease",
color: isHovered ? "#cfcfcf" : "inherit",
}}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{conf().DMCA_EMAIL ?? ""}
</a>
</Paragraph> </Paragraph>
</ThinContainer> </ThinContainer>
</SubPageLayout> </SubPageLayout>