From cfe1091f3eb3ece7a8d4219b20c28bd4211b040d Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 4 Mar 2022 03:03:59 -0500 Subject: [PATCH] form almost done --- .../VoiceCloneRequestPage.tsx | 200 ++++++++++++++++-- 1 file changed, 179 insertions(+), 21 deletions(-) diff --git a/packages/fakeyou/src/v2/view/clone_voice_requests/VoiceCloneRequestPage.tsx b/packages/fakeyou/src/v2/view/clone_voice_requests/VoiceCloneRequestPage.tsx index a043329558..7b72d14df8 100644 --- a/packages/fakeyou/src/v2/view/clone_voice_requests/VoiceCloneRequestPage.tsx +++ b/packages/fakeyou/src/v2/view/clone_voice_requests/VoiceCloneRequestPage.tsx @@ -1,8 +1,9 @@ import './VoiceCloneRequestPage.css'; -import { faEnvelope } from '@fortawesome/free-solid-svg-icons'; +import { faEnvelope, faUser } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React, { useCallback, useEffect, useState } from 'react'; +import { faDiscord } from '@fortawesome/free-brands-svg-icons'; interface Props { } @@ -13,6 +14,29 @@ function VoiceCloneRequestPage(props: Props) { const [discord, setDiscord] = useState(""); // Visibility + const [isForPublicUse, setIsForPublicUse] = useState(false); + const [isForPrivateUse, setIsForPrivateUse] = useState(false); + + // Use + const [isForTwitchTts, setIsForTwitchTts] = useState(false); + const [isForApiUse, setIsForApiUse] = useState(false); + const [isForMusic, setIsForMusic] = useState(false); + const [isForGames, setIsForGames] = useState(false); + const [isForOther, setIsForOther] = useState(false); + const [optionalNotesOnUse, setOptionalNotesOnUse] = useState(""); + + // Subject/ownership + const [isOwnVoice, setIsOwnVoice] = useState(false); + const [isThirdPartyVoice, setIsThirdPartyVoice] = useState(false); + const [notesOnSubject, setNotesOnSubject] = useState(""); + + // Equipment + const [hasCleanAudioRecordings, setHasCleanAudioRecordings] = useState(false); + const [hasGoodMicrophone, setHasGoodMicrophone] = useState(false); + + // Comments + const [optionalQuestions, setOptionalQuestions] = useState(""); + const [optionalExtraComments, setOptionalExtraComments] = useState(""); //const getLeaderboard = useCallback(async () => { // const leaderboardReponse = await GetLeaderboard(); @@ -39,6 +63,88 @@ function VoiceCloneRequestPage(props: Props) { // getLeaderboard(); //}, [getLeaderboard]); + const handleEmailAddressChange = (ev: React.FormEvent) => { + setEmailAddress((ev.target as HTMLInputElement).value); + }; + + const handleDiscordChange = (ev: React.FormEvent) => { + setDiscord((ev.target as HTMLInputElement).value); + }; + + const handleSubjectChange = (ev: React.FormEvent) => { + const value = (ev.target as HTMLInputElement).value; + switch (value) { + case 'mine': + setIsOwnVoice(true); + setIsThirdPartyVoice(false); + break; + case 'family': + setIsOwnVoice(false); + setIsThirdPartyVoice(true); + break; + case 'client': + setIsOwnVoice(false); + setIsThirdPartyVoice(true); + break; + case '3rd': + setIsOwnVoice(false); + setIsThirdPartyVoice(true); + break; + } + }; + + const handleSubjectNotesChange = (ev: React.FormEvent) => { + setNotesOnSubject((ev.target as HTMLInputElement).value); + }; + + const handleIsForMusicChange = () => { + setIsForMusic(!isForMusic); + }; + + const handleIsForGamesChange = () => { + setIsForGames(!isForGames); + }; + + const handleIsForTwitchTtsChange = () => { + setIsForTwitchTts(!isForTwitchTts); + }; + + const handleIsForApiUseChange = () => { + setIsForApiUse(!isForApiUse); + }; + + const handleIsForOtherChange = () => { + setIsForOther(!isForOther); + }; + + const handleOptionalNotesOnUseChange = (ev: React.FormEvent) => { + setOptionalNotesOnUse((ev.target as HTMLInputElement).value); + }; + + const handleIsForPrivateUseChange = () => { + setIsForPrivateUse(!isForPrivateUse); + }; + + const handleIsForPublicUseChange = () => { + setIsForPublicUse(!isForPublicUse); + }; + + const handleHasCleanAudioRecordingsChange= () => { + setHasCleanAudioRecordings(!hasCleanAudioRecordings); + }; + + const handleHasGoodMicrophoneChange = () => { + setHasGoodMicrophone(!hasGoodMicrophone); + }; + + const handleOptionalExtraCommentsChange = (ev: React.FormEvent) => { + setOptionalExtraComments((ev.target as HTMLTextAreaElement).value); + }; + + const handleOptionalQuestionsChange= (ev: React.FormEvent) => { + setOptionalQuestions((ev.target as HTMLTextAreaElement).value); + }; + return (
@@ -71,7 +177,7 @@ function VoiceCloneRequestPage(props: Props) {

Want a Custom Voice You Can Use?

-

For Music, Videos, Twitch Rewards, API, friends, family… whatever you want!

+

For Music, Videos, Twitch Rewards, API, Friends, Family… whatever you want!

We have an extremely talented staff that will personally handle your voice clone request. @@ -86,7 +192,13 @@ function VoiceCloneRequestPage(props: Props) {

- + @@ -101,9 +213,14 @@ function VoiceCloneRequestPage(props: Props) {
- + - +

@@ -125,17 +242,22 @@ function VoiceCloneRequestPage(props: Props) {



+
+
@@ -143,6 +265,26 @@ function VoiceCloneRequestPage(props: Props) {
+
+ +
+ + + + +
+

+

+
+ +
+

How will you use it?

Click as many as you plan to use!

@@ -151,36 +293,36 @@ function VoiceCloneRequestPage(props: Props) {




@@ -189,7 +331,13 @@ function VoiceCloneRequestPage(props: Props) {
- + @@ -215,14 +363,14 @@ function VoiceCloneRequestPage(props: Props) {

@@ -237,14 +385,14 @@ function VoiceCloneRequestPage(props: Props) {

@@ -257,14 +405,24 @@ function VoiceCloneRequestPage(props: Props) {
- +
- +