From 2d87d3d882132d786cccfaf652c8a3e5a1ccfae5 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 4 Jun 2021 01:42:16 -0400 Subject: [PATCH] share results in common --- .../TtsInferenceResultsListFc.tsx | 5 ++++- vocodes/src/v2/tts_model_list/TtsModelFormFc.tsx | 2 +- vocodes/src/v2/tts_model_view/TtsModelViewFc.tsx | 4 ++-- vocodes/src/v2/tts_result_view/TtsResultViewFc.tsx | 10 +++++++++- 4 files changed, 16 insertions(+), 5 deletions(-) rename vocodes/src/v2/{tts_model_list => common}/TtsInferenceResultsListFc.tsx (87%) diff --git a/vocodes/src/v2/tts_model_list/TtsInferenceResultsListFc.tsx b/vocodes/src/v2/common/TtsInferenceResultsListFc.tsx similarity index 87% rename from vocodes/src/v2/tts_model_list/TtsInferenceResultsListFc.tsx rename to vocodes/src/v2/common/TtsInferenceResultsListFc.tsx index 4c6d5eda74..5c0ea16299 100644 --- a/vocodes/src/v2/tts_model_list/TtsInferenceResultsListFc.tsx +++ b/vocodes/src/v2/common/TtsInferenceResultsListFc.tsx @@ -29,7 +29,10 @@ function TtsInferenceResultListFc(props: Props) { audio element. - Permalink & download + Permalink & download ); } diff --git a/vocodes/src/v2/tts_model_list/TtsModelFormFc.tsx b/vocodes/src/v2/tts_model_list/TtsModelFormFc.tsx index d72b5267d3..da3666f08c 100644 --- a/vocodes/src/v2/tts_model_list/TtsModelFormFc.tsx +++ b/vocodes/src/v2/tts_model_list/TtsModelFormFc.tsx @@ -4,7 +4,7 @@ import { SessionWrapper } from '../../session/SessionWrapper'; import { v1 as uuidv1 } from 'uuid'; import { Link } from 'react-router-dom'; import { TtsInferenceJob } from '../../App'; -import { TtsInferenceResultListFc } from './TtsInferenceResultsListFc'; +import { TtsInferenceResultListFc } from '../common/TtsInferenceResultsListFc'; interface TtsModelListResponsePayload { success: boolean, diff --git a/vocodes/src/v2/tts_model_view/TtsModelViewFc.tsx b/vocodes/src/v2/tts_model_view/TtsModelViewFc.tsx index ea5f8d7e57..73418ea7dc 100644 --- a/vocodes/src/v2/tts_model_view/TtsModelViewFc.tsx +++ b/vocodes/src/v2/tts_model_view/TtsModelViewFc.tsx @@ -7,7 +7,7 @@ import { SessionWrapper } from '../../session/SessionWrapper'; import { TtsInferenceJob } from '../../App'; import { v1 as uuidv1 } from 'uuid'; import { EnqueueJobResponsePayload } from '../tts_model_list/TtsModelFormFc'; -import { TtsInferenceResultListFc } from '../tts_model_list/TtsInferenceResultsListFc'; +import { TtsInferenceResultListFc } from '../common/TtsInferenceResultsListFc'; interface TtsModelViewResponsePayload { success: boolean, @@ -206,7 +206,7 @@ function TtsModelViewFc(props: Props) {

- +
diff --git a/vocodes/src/v2/tts_result_view/TtsResultViewFc.tsx b/vocodes/src/v2/tts_result_view/TtsResultViewFc.tsx index 7286ae8d86..9627cc24da 100644 --- a/vocodes/src/v2/tts_result_view/TtsResultViewFc.tsx +++ b/vocodes/src/v2/tts_result_view/TtsResultViewFc.tsx @@ -113,9 +113,17 @@ function TtsResultViewFc(props: Props) { ); } + let headingTitle = 'TTS Result'; + let subtitle = ; + if (ttsInferenceResult.tts_model_title !== undefined && ttsInferenceResult.tts_model_title !== null) { + headingTitle = `${ttsInferenceResult.tts_model_title}`; + subtitle =

TTS Result

; + } + return (
-

TTS Result

+

{headingTitle}

+ {subtitle}