Readd email to DMCA page

This commit is contained in:
Pas 2025-07-06 16:22:20 -06:00
parent c6b2236a19
commit 9dc2e0099b
4 changed files with 45 additions and 7 deletions

View file

@ -6,6 +6,7 @@ import type { RequireExactlyOne } from "type-fest";
import { Icon, Icons } from "@/components/Icon";
import { BrandPill } from "@/components/layout/BrandPill";
import { WideContainer } from "@/components/layout/WideContainer";
import { shouldHaveDmcaPage } from "@/pages/Dmca";
import { conf } from "@/setup/config";
// to and href are mutually exclusive
@ -45,6 +46,7 @@ function FooterLink(props: FooterLinkProps) {
function Dmca() {
const { t } = useTranslation();
if (!shouldHaveDmcaPage()) return null;
if (window.location.hash === "#/dmca") return null;
return (

View file

@ -1,25 +1,57 @@
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Icon, Icons } from "@/components/Icon";
import { ThinContainer } from "@/components/layout/ThinContainer";
import { Heading1 } from "@/components/utils/Text";
import { Heading1, Paragraph } from "@/components/utils/Text";
import { PageTitle } from "@/pages/parts/util/PageTitle";
import { conf } from "@/setup/config";
import { SubPageLayout } from "./layouts/SubPageLayout";
export function shouldHaveDmcaPage() {
return !!conf().DMCA_EMAIL;
}
export function DmcaPage() {
const { t } = useTranslation();
const [isHovered, setIsHovered] = useState(false);
return (
<SubPageLayout>
<PageTitle subpage k="global.pages.dmca" />
<ThinContainer>
<Heading1>{t("screens.dmca.title")}</Heading1>
<h1 className="pt-0 text-gray-600 text-xl">
<h1 className="pt-0 text-gray-500 text-xl">
This site operates in compliance with the Digital Millennium Copyright
Act (&ldquo;DMCA&ldquo;). We do not store any files on our servers.
All videos and media content are hosted on third-party services.
Please remember that we do not manage the content.
Please remember that we do not host or manage the content.
<br />
<br />
For questions or concerns, feel free to contact us!
</h1>
<Paragraph className="mt-2 text-gray-500 text-sm">
(The{" "}
<a href="/about" className="text-type-link">
about
</a>{" "}
page has more information about how we get our content.)
</Paragraph>
<Paragraph className="flex space-x-3 items-center">
<Icon icon={Icons.MAIL} />
<a
href={`mailto:${conf().DMCA_EMAIL}`}
style={{
transition: "color 0.3s ease",
color: isHovered ? "#ffffff" : "inherit",
}}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{conf().DMCA_EMAIL ?? ""}
</a>
</Paragraph>
</ThinContainer>
</SubPageLayout>
);

View file

@ -18,7 +18,7 @@ import VideoTesterView from "@/pages/developer/VideoTesterView";
import { DiscoverMore } from "@/pages/discover/AllMovieLists";
import { Discover } from "@/pages/discover/Discover";
import { MoreContent } from "@/pages/discover/MoreContent";
import { DmcaPage } from "@/pages/Dmca";
import { DmcaPage, shouldHaveDmcaPage } from "@/pages/Dmca";
import MaintenancePage from "@/pages/errors/MaintenancePage";
import { NotFoundPage } from "@/pages/errors/NotFoundPage";
import { HomePage } from "@/pages/HomePage";
@ -164,7 +164,9 @@ function App() {
/>
<Route path="/migration/upload" element={<MigrationUploadPage />} />
<Route path="/dmca" element={<DmcaPage />} />
{shouldHaveDmcaPage() ? (
<Route path="/dmca" element={<DmcaPage />} />
) : null}
{/* Support page */}
<Route path="/support" element={<SupportPage />} />
<Route path="/jip" element={<JipPage />} />

View file

@ -16,7 +16,7 @@ import { AboutPage } from "@/pages/About";
import { AdminPage } from "@/pages/admin/AdminPage";
import VideoTesterView from "@/pages/developer/VideoTesterView";
import { Discover } from "@/pages/discover/Discover";
import { DmcaPage } from "@/pages/Dmca";
import { DmcaPage, shouldHaveDmcaPage } from "@/pages/Dmca";
import MaintenancePage from "@/pages/errors/MaintenancePage";
import { NotFoundPage } from "@/pages/errors/NotFoundPage";
import { HomePage } from "@/pages/HomePage";
@ -145,7 +145,9 @@ function App() {
element={<OnboardingExtensionPage />}
/>
<Route path="/onboarding/proxy" element={<OnboardingProxyPage />} />
<Route path="/dmca" element={<DmcaPage />} />
{shouldHaveDmcaPage() ? (
<Route path="/dmca" element={<DmcaPage />} />
) : null}
{/* Support page */}
<Route path="/support" element={<SupportPage />} />
{/* Discover page */}