diff --git a/www/app/[domain]/transcripts/[transcriptId]/page.tsx b/www/app/[domain]/transcripts/[transcriptId]/page.tsx index 1efb6c43..309093aa 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/page.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/page.tsx @@ -71,21 +71,30 @@ export default function TranscriptDetails(details: TranscriptDetails) { return ( <> - + - + - } aria-label="Edit Transcript Title" /> + {topics.length > 0 ? ( <> -

Topics

- {autoscroll && ( )} -
topic.id == activeTopic?.id), + ]} + variant="custom" + allowToggle > {topics.map((topic, index) => ( - + {" "} + {getSpeakerName(segment.speaker)}: + {" "} + {segment.text} + + ))} + + ) : ( + <>{topic.transcript} + )} + + ))} -
+ ) : ( -
- Discussion topics will appear here after you start recording. -
- It may take up to 5 minutes of conversation for the first topic to - appear. -
+ + + Discussion topics will appear here after you start recording. + + + It may take up to 5 minutes of conversation for the first topic to + appear. + + )} - +
); } diff --git a/www/app/[domain]/transcripts/transcriptTitle.tsx b/www/app/[domain]/transcripts/transcriptTitle.tsx index fa456049..14ce7c97 100644 --- a/www/app/[domain]/transcripts/transcriptTitle.tsx +++ b/www/app/[domain]/transcripts/transcriptTitle.tsx @@ -1,6 +1,8 @@ import { useState } from "react"; import { UpdateTranscript } from "../../api"; import useApi from "../../lib/useApi"; +import { Heading, IconButton, Input } from "@chakra-ui/react"; +import { FaPen } from "react-icons/fa"; type TranscriptTitle = { title: string; @@ -19,7 +21,6 @@ const TranscriptTitle = (props: TranscriptTitle) => { const requestBody: UpdateTranscript = { title: newTitle, }; - const api = useApi(); const updatedTranscript = await api?.v1TranscriptUpdate( transcriptId, requestBody, @@ -46,6 +47,12 @@ const TranscriptTitle = (props: TranscriptTitle) => { } }; + const handleBlur = () => { + if (displayedTitle !== preEditTitle) { + updateTitle(displayedTitle, props.transcriptId); + } + setIsEditing(false); + }; const handleChange = (e) => { setDisplayedTitle(e.target.value); }; @@ -63,21 +70,36 @@ const TranscriptTitle = (props: TranscriptTitle) => { return ( <> {isEditing ? ( - ) : ( -

- {displayedTitle} -

+ <> + + {displayedTitle} + + } + aria-label="Edit Transcript Title" + onClick={handleTitleClick} + fontSize={"15px"} + /> + )} ); diff --git a/www/app/theme.ts b/www/app/theme.ts index e951eef0..4dfea21d 100644 --- a/www/app/theme.ts +++ b/www/app/theme.ts @@ -1,7 +1,34 @@ // 1. Import `extendTheme` import { extendTheme } from "@chakra-ui/react"; -// 2. Call `extendTheme` and pass your custom values +import { accordionAnatomy } from "@chakra-ui/anatomy"; +import { createMultiStyleConfigHelpers, defineStyle } from "@chakra-ui/react"; + +const { definePartsStyle, defineMultiStyleConfig } = + createMultiStyleConfigHelpers(accordionAnatomy.keys); + +const custom = definePartsStyle({ + container: { + border: "0", + borderRadius: "8px", + backgroundColor: "white", + mb: 2, + mr: 2, + }, + panel: { + pl: 8, + pb: 0, + }, + button: { + justifyContent: "flex-start", + pl: 2, + }, +}); + +const accordionTheme = defineMultiStyleConfig({ + variants: { custom }, +}); + const theme = extendTheme({ colors: { blue: { @@ -29,6 +56,9 @@ const theme = extendTheme({ light: "#FFFFFF", dark: "#0C0D0E", }, + components: { + Accordion: accordionTheme, + }, }); export default theme;