From de5f2514eccb117a67a557dd84fca75cc6ce8d57 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Wed, 6 Mar 2024 15:31:52 -0500 Subject: [PATCH] Add a support page! --- src/assets/locales/en.json | 15 ++++- src/components/LinksDropdown.tsx | 1 + src/components/UserIcon.tsx | 2 +- src/pages/Support.tsx | 105 +++++++++++++++++++++++++++++++ src/setup/App.tsx | 3 + 5 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 src/pages/Support.tsx diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index df72e045..c72178ca 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -22,7 +22,7 @@ "body": "Well sudo-flix has a twitter account that can be found in the footer of this page as well as a link to the source code on Github.", "title": "How can I find out more?" }, - "title": "About sudo-flix (^▽^)👍" + "title": "About sudo-flix (^▽^)" }, "actions": { "copied": "Copied", @@ -105,6 +105,7 @@ "pages": { "about": "About", "dmca": "DMCA", + "support": "Support", "login": "Login", "onboarding": "Setup", "pagetitle": "{{title}} - sudo-flix", @@ -431,6 +432,18 @@ "verifyingHumanity": "Verifying your humanity... (^▽^)👍" } }, + "support": { + "title": "Support", + "text": "sudo-flix is designed to be as user-friendly as possible. However, people still have questions and issues. This page is here to help resolve these shortcomings", + "q1": { + "body": "Well, you can join the official <0>movie-web discord and ask questions there or you can email the one provided at the bottom of this page.", + "title": "Where can I get help?" + }, + "q2": { + "body": "We have a <0>GitHub where you can create a detailed issue in our repository. Additionally, if you wish, you can create a pull request to fix the issue yourself.", + "title": "How can I report a bug or issue?" + } + }, "screens": { "dmca": { "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: sudo-flix@proton.me 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.", diff --git a/src/components/LinksDropdown.tsx b/src/components/LinksDropdown.tsx index c0da66ee..d6dc4a6a 100644 --- a/src/components/LinksDropdown.tsx +++ b/src/components/LinksDropdown.tsx @@ -161,6 +161,7 @@ export function LinksDropdown(props: { children: React.ReactNode }) { icon={Icons.DISCORD} /> + = { cat: ``, - weed: ``, + weed: ``, userGroup: ``, couch: ``, mobile: ``, diff --git a/src/pages/Support.tsx b/src/pages/Support.tsx new file mode 100644 index 00000000..3dd9ab3a --- /dev/null +++ b/src/pages/Support.tsx @@ -0,0 +1,105 @@ +import classNames from "classnames"; +import React, { useState } from "react"; +import { Trans, useTranslation } from "react-i18next"; + +import { Icon, Icons } from "@/components/Icon"; +import { ThinContainer } from "@/components/layout/ThinContainer"; +import { MwLink } from "@/components/text/Link"; +import { Heading1, Paragraph } from "@/components/utils/Text"; +import { PageTitle } from "@/pages/parts/util/PageTitle"; +import { conf } from "@/setup/config"; + +import { SubPageLayout } from "./layouts/SubPageLayout"; + +// From about just removed the numbers +export function Ol(props: { items: React.ReactNode[] }) { + return ( +
    + {props.items.map((child, i) => { + return ( +
  1. +
    +
    + {i !== props.items.length - 1 ? ( +
    + ) : null} +
    +
    {child}
    +
  2. + ); + })} +
+ ); +} + +function Item(props: { title: string; children: React.ReactNode }) { + return ( + <> +

{props.title}

+
{props.children}
+ + ); +} + +export function SupportPage() { + const { t } = useTranslation(); + const [isHovered, setIsHovered] = useState(false); + + return ( + + + + {t("support.title")} + + , + }} + /> + +
    + + + + , + + + + + , + ]} + /> + + + setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + > + {conf().DMCA_EMAIL ?? ""} + + + + + ); +} diff --git a/src/setup/App.tsx b/src/setup/App.tsx index 258431e9..60616024 100644 --- a/src/setup/App.tsx +++ b/src/setup/App.tsx @@ -25,6 +25,7 @@ import { OnboardingPage } from "@/pages/onboarding/Onboarding"; import { OnboardingExtensionPage } from "@/pages/onboarding/OnboardingExtension"; import { OnboardingProxyPage } from "@/pages/onboarding/OnboardingProxy"; import { RegisterPage } from "@/pages/Register"; +import { SupportPage } from "@/pages/Support"; import { Layout } from "@/setup/Layout"; import { useHistoryListener } from "@/stores/history"; import { LanguageProvider } from "@/stores/language"; @@ -147,6 +148,8 @@ function App() { {shouldHaveDmcaPage() ? ( } /> ) : null} + {/* Support page */} + } /> {/* Settings page */}