add warning box for PornHub support

This commit is contained in:
La macchina desiderante 2024-05-24 20:44:54 +02:00
parent af169db4df
commit 6efe6582a5
5 changed files with 19 additions and 23 deletions

View File

@ -2,13 +2,7 @@
"Header": { "Header": {
"title": "Proxy Raye", "title": "Proxy Raye",
"description": "A proxy for porn websites", "description": "A proxy for porn websites",
"disclaimer_0": "Genital sexuality is only one of the many possible conceptions of sexuality", "disclaimer_pornhub": "Warning: PornHub support is experimental. If video player freezes, try reloading the page after a few seconds."
"disclaimer_1": "Platform capitalism makes money on desire flow. Proxies avoid this to happen.",
"disclaimer_2": "Platform capitalism is narcissism-driven",
"disclaimer_3": "Pornhub annoying elements (like ads) are put there intentionally to make you upgrade to premium",
"disclaimer_4": "You're going to masturbate on someone else's imaginary",
"disclaimer_5": "No banners or annoying popups. You can jerk off with no hassle!",
"disclaimer_6": "You're choosing image over imagination. What if they're not in antithesis?"
}, },
"NotFound": { "NotFound": {
"uh_oh": "Uh Oh...", "uh_oh": "Uh Oh...",

View File

@ -2,13 +2,7 @@
"Header": { "Header": {
"title": "Proxy Raye", "title": "Proxy Raye",
"description": "Un proxy per i siti porno", "description": "Un proxy per i siti porno",
"disclaimer_0": "Quella genitale è solo una delle possibili concezioni della sessualità.", "disclaimer_pornhub": "Attenzione: il supporto per PornHub è sperimentale. Se il player si blocca, provare a ricaricare la pagina dopo qualche secondo."
"disclaimer_1": "Le piattaforme monetizzano i flussi di desiderio. I proxy impediscono che questo accada.",
"disclaimer_2": "Le piattaforme si alimentano del narcisisismo degli utenti.",
"disclaimer_3": "Gli elementi di disturbo su PornHub sono messi lì a posta per farti passare alla versione Premium.",
"disclaimer_4": "Stai per masturbarti sull'immaginario di qualcun altro.",
"disclaimer_5": "Niente banner o popup fastidiosi. Puoi masturbarti in santa pace.",
"disclaimer_6": "Stai preferendo l'immagine all'immaginazione. E se immagine e immaginazione non fossero in antitesi?"
}, },
"NotFound": { "NotFound": {
"uh_oh": "Uh Oh...", "uh_oh": "Uh Oh...",

View File

@ -29,6 +29,6 @@ export default async function VideoPage({ params }: { params: { platform: Platfo
} }
return <Layout> return <Layout>
<Video id={id} data={data} related={related}/> <Video platform={platform} id={id} data={data} related={related}/>
</Layout> </Layout>
} }

View File

@ -3,19 +3,22 @@ import React from 'react';
import style from './Disclaimer.module.scss' import style from './Disclaimer.module.scss'
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';
import { Platforms } from '@/meta/settings';
const Disclaimer: React.FC = () => { interface Props {
platform: Platforms
}
const MAX_DISCLAIMER_NO = 6 const Disclaimer: React.FC<Props> = (props) => {
const { platform } = props;
const t = useTranslations('Header'); const t = useTranslations('Header');
const getRandomArbitrary = (max: number) => {
return Math.floor( Math.random() * max);
}
return ( return (
<div className={style.messageBox}>{t(`disclaimer_${getRandomArbitrary(MAX_DISCLAIMER_NO)}`)}</div> <>
{platform == Platforms.pornhub && <div className={style.messageBox}>{t(`disclaimer_pornhub`)}</div>}
</>
); );
}; };

View File

@ -9,21 +9,26 @@ import SearchBar from '@/components/Layout/SearchBar';
import Results from '@/components/Layout/Results'; import Results from '@/components/Layout/Results';
import { GalleryData, VideoData } from '@/meta/data'; import { GalleryData, VideoData } from '@/meta/data';
import { Platforms } from '@/meta/settings';
import Disclaimer from '@/components/Layout/Header/Disclaimer';
import { platform } from 'os';
interface Props { interface Props {
id: string id: string
data: VideoData data: VideoData
related: GalleryData[] related: GalleryData[]
platform: Platforms
} }
const Video: React.FC<Props> = (props) => { const Video: React.FC<Props> = (props) => {
const { data, related } = props; const { data, related, platform } = props;
return ( return (
<> <>
<Header /> <Header />
<Disclaimer platform={platform} />
{data.srcSet ? <PlyrJS data={data} /> : <VideoJS data={data} />} {data.srcSet ? <PlyrJS data={data} /> : <VideoJS data={data} />}
<SearchBar /> <SearchBar />
{related && <Results data={related} />} {related && <Results data={related} />}