From 34a76b6dbda27c0fe5b85978029068fd0386464e Mon Sep 17 00:00:00 2001 From: ftk789 Date: Tue, 19 Jul 2022 00:53:58 +0300 Subject: [PATCH] Fixed TTS Result element, Although Alert colors are not correct --- .../SessionTtsInferenceResultsListFc.tsx | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/fakeyou/src/v2/view/_common/SessionTtsInferenceResultsListFc.tsx b/packages/fakeyou/src/v2/view/_common/SessionTtsInferenceResultsListFc.tsx index bfd38a8993..6eb90241a2 100644 --- a/packages/fakeyou/src/v2/view/_common/SessionTtsInferenceResultsListFc.tsx +++ b/packages/fakeyou/src/v2/view/_common/SessionTtsInferenceResultsListFc.tsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { TtsInferenceJob } from '../../../App' import { BucketConfig } from '@storyteller/components/src/api/BucketConfig'; import { JobState } from '@storyteller/components/src/jobs/JobStates'; - +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faLink, faList, faMicrophone } from '@fortawesome/free-solid-svg-icons'; interface Props { ttsInferenceJobs: Array, } @@ -15,7 +16,7 @@ function SessionTtsInferenceResultListFc(props: Props) { props.ttsInferenceJobs.forEach(job => { if (!job.maybeResultToken) { - let cssStyle = "message"; + let cssStyle = "alert alert-secondary my-4 alert text-black"; let stateDescription = "Pending..."; switch (job.jobState) { @@ -24,16 +25,16 @@ function SessionTtsInferenceResultListFc(props: Props) { stateDescription = job.maybeExtraStatusDescription == null ? "Pending..." : job.maybeExtraStatusDescription; break; case JobState.STARTED: - cssStyle = "message is-primary"; + cssStyle = "alert alert-success my-4 alert"; stateDescription = job.maybeExtraStatusDescription == null ? "Started..." : job.maybeExtraStatusDescription; break; case JobState.ATTEMPT_FAILED: - cssStyle = "message is-warning"; + cssStyle = "alert alert-danger my-4 alert"; stateDescription = `Failed ${job.attemptCount} attempt(s). Will retry...`; break; case JobState.COMPLETE_FAILURE: case JobState.DEAD: - cssStyle = "message is-danger"; + cssStyle = "alert alert-danger my-4 alert"; stateDescription = "Failed Permanently. Please tell us in Discord so we can fix. :("; break; case JobState.COMPLETE_SUCCESS: @@ -64,22 +65,23 @@ function SessionTtsInferenceResultListFc(props: Props) {

{job.title}

*/} -
- {job.title} +
+

{job.title}

{job.rawInferenceText}

- -   - + +
Permalink & download + className="btn btn-primary btn-lg" + > Permalink & download +
  @@ -94,7 +96,8 @@ function SessionTtsInferenceResultListFc(props: Props) { let title = ; if (results.length !== 0) { - title =

Session TTS Results

; + title =

Session TTS Results

; } // Users have requested reverse chronological results @@ -102,6 +105,8 @@ function SessionTtsInferenceResultListFc(props: Props) { return (
+
+
{title} {/*
Working on speeding this up @@ -111,6 +116,9 @@ function SessionTtsInferenceResultListFc(props: Props) {
*/} {results}
+
+
+ ); }