diff --git a/packages/fakeyou.com/src/components/layout/InferenceJobsList/InferenceJobsList.tsx b/packages/fakeyou.com/src/components/layout/InferenceJobsList/InferenceJobsList.tsx index 9c0274f22c..65738f1796 100644 --- a/packages/fakeyou.com/src/components/layout/InferenceJobsList/InferenceJobsList.tsx +++ b/packages/fakeyou.com/src/components/layout/InferenceJobsList/InferenceJobsList.tsx @@ -12,16 +12,23 @@ import { InferenceJob } from "@storyteller/components/src/jobs/InferenceJob"; // import { springs } from "resources"; // import { useInferenceJobs } from "hooks"; import { Button } from 'components/common'; -import { Analytics } from "common/Analytics"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faChevronRight, faHourglass1, faRemove, faTrophy, faWarning } from "@fortawesome/free-solid-svg-icons"; const DEFAULT_QUEUE_REFRESH_INTERVAL_MILLIS = 15000; -export default function InferenceJobsList({ t, inferenceJobs }: { t: any, inferenceJobs?: any }) { +interface JobsListProps{ + filter?: (job:any) => any, + onSelect?: (e:any) => any, + statusTxt: any, + t: any, + inferenceJobs?: any +} + +export default function InferenceJobsList({ filter, onSelect, statusTxt, t, inferenceJobs }: JobsListProps) { // const { inferenceJobs = [] } = useInferenceJobs({ type: 0 }); // const oldJobs = thejobs || inferenceJobs; - console.log("😎",inferenceJobs); + console.log("🥬",inferenceJobs); const [pending, pendingSet] = useState({ success: true, pending_job_count: 0, @@ -29,7 +36,7 @@ export default function InferenceJobsList({ t, inferenceJobs }: { t: any, infere refresh_interval_millis: DEFAULT_QUEUE_REFRESH_INTERVAL_MILLIS, }); const statusIcons = [faHourglass1,faHourglass1,faWarning,faRemove,faTrophy]; - const statusTxt = (which: number, config = {}) => ["animationPending","animationInProgress","animationFailed","animationDead","animationSuccess"].map((str,i) => t(`status.${str}`,config))[which]; + // const statusTxt = (which: number, config = {}) => ["animationPending","animationInProgress","animationFailed","animationDead","animationSuccess"].map((str,i) => t(`status.${str}`,config))[which]; const processFail = (fail = "") => { switch (fail) { @@ -87,8 +94,10 @@ export default function InferenceJobsList({ t, inferenceJobs }: { t: any, infere return jobs.length ?
{ t("headings.yourJobs") }
- { jobs.map((job: any, key: number) => { - console.log("🌸",job); + { jobs + // .filter(filter) + .map((job: any, key: number) => { + console.log("🍇",job); return
@@ -105,7 +114,7 @@ export default function InferenceJobsList({ t, inferenceJobs }: { t: any, infere icon: faChevronRight, iconFlip: true, label: t("inputs.viewResult"), - onClick:() => Analytics.voiceConversionClickDownload() + onClick: onSelect }} />: null }
diff --git a/packages/fakeyou.com/src/v2/view/PageContainer.tsx b/packages/fakeyou.com/src/v2/view/PageContainer.tsx index c6e83c444d..b4a31f7b73 100644 --- a/packages/fakeyou.com/src/v2/view/PageContainer.tsx +++ b/packages/fakeyou.com/src/v2/view/PageContainer.tsx @@ -688,7 +688,8 @@ class PageContainer extends React.Component< diff --git a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/FaceAnimatorTypes.ts b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/FaceAnimatorTypes.ts index 86db526447..84e824cfbd 100644 --- a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/FaceAnimatorTypes.ts +++ b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/FaceAnimatorTypes.ts @@ -17,7 +17,6 @@ export interface FaceAnimatorSlide { enqueueInferenceJob: any; sessionSubscriptionsWrapper: any; t: any; - inferenceJobsByCategory: any; removeWatermark: any; removeWatermarkChange: any; } diff --git a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.scss b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.scss index bea99a1c9b..fc091251a0 100644 --- a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.scss +++ b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.scss @@ -162,6 +162,7 @@ $over992: min-width 992px; } .face-animator-jobs { + margin-bottom: 1rem; @include FApanel; h5 { @include FAltTxt; diff --git a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.tsx b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.tsx index c840e931d2..1a01479997 100644 --- a/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/lipsync/LipsyncEditor/LipsyncEditor.tsx @@ -28,6 +28,7 @@ import { BasicVideo } from "components/common"; import "./LipsyncEditor.scss"; import { FrontendInferenceJobType } from "@storyteller/components/src/jobs/InferenceJob"; import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle"; +import { Analytics } from "common/Analytics"; export default function LipsyncEditor({ enqueueInferenceJob, @@ -146,6 +147,8 @@ export default function LipsyncEditor({ leave: { opacity: 0, position: "absolute" }, }); + const statusTxt = (which: number, config = {}) => ["animationPending","animationInProgress","animationFailed","animationDead","animationSuccess"].map((str,i) => t(`status.${str}`,config))[which]; + return (
@@ -169,7 +172,6 @@ export default function LipsyncEditor({ still, stillChange, sessionSubscriptionsWrapper, - inferenceJobsByCategory, index, t, toggle: { audio: readyMedia(1), image: readyMedia(0) }, @@ -183,7 +185,12 @@ export default function LipsyncEditor({ ); })}
- + Analytics.voiceConversionClickDownload(), + inferenceJobs: inferenceJobsByCategory.get(FrontendInferenceJobType.FaceAnimation), + statusTxt + }}/>
diff --git a/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerFormPage.tsx b/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerFormPage.tsx index ee9614a359..5507dddcfc 100644 --- a/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerFormPage.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerFormPage.tsx @@ -143,7 +143,7 @@ function VoiceDesignerFormPage({ enqueueInferenceJob }: { enqueueInferenceJob: a if (res && res.success) { enqueueInferenceJob( res.inference_job_token, - FrontendInferenceJobType.VoiceDesignerTts + FrontendInferenceJobType.VoiceDesignerCreateVoice ); history.push("/voice-designer"); diff --git a/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerMainPage.tsx b/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerMainPage.tsx index 68f195da50..395fda1c90 100644 --- a/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerMainPage.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/voice_designer/VoiceDesignerMainPage.tsx @@ -12,7 +12,12 @@ import ListItems from "./components/NewList"; import Modal from "components/common/Modal"; import useVoiceRequests from "./useVoiceRequests"; -function VoiceDesignerMainPage({ inferenceJobs }: { inferenceJobs: any }) { +import { + FrontendInferenceJobType, + // InferenceJob, +} from "@storyteller/components/src/jobs/InferenceJob"; + +function VoiceDesignerMainPage({ inferenceJobsByCategory }: { inferenceJobsByCategory: any }) { const { pathname } = useLocation(); const { t } = useLocalize("FaceAnimator"); const { datasets, voices } = useVoiceRequests({ requestDatasets: true, requestVoices: true }); @@ -114,6 +119,14 @@ function VoiceDesignerMainPage({ inferenceJobs }: { inferenceJobs: any }) { }; }); + const statusTxt = (status: number, config: any) => [ + "Voice pending...", + "Voice in progress", + "Voice failed", + "Voice dead", + "Voice created successfully" + ][status]; + const button = { label: `Create new voice`, icon: faPlus, @@ -131,7 +144,11 @@ function VoiceDesignerMainPage({ inferenceJobs }: { inferenceJobs: any }) { panel={false} imageUrl="/images/header/voice-designer.png" /> - +