Refactor layout (#1063)

* sidebar collapsable

* resizable panel for audio page

* rename components

* refacotr

* refactor media panels

* refactor

* auto resize waveform

* refactor: rename files

* refactor media components

* refactor

* rename

* fix media provider

* refactor wavefor action buttons

* clean code

* refactor media recording player

* clean up

* fix hotkeys

* refactor

* fix style

* fix style

* fix chat input

* fix shadow player in course

* fix style

* fix style
This commit is contained in:
an-lee
2024-09-12 06:48:19 +08:00
committed by GitHub
parent 4741d5be7c
commit fbc1394a70
59 changed files with 1830 additions and 1691 deletions

View File

@@ -51,6 +51,7 @@ export const ChatInput = () => {
isPaused,
askAgent,
onCreateMessage,
shadowing,
} = useContext(ChatSessionProviderContext);
const { EnjoyApp } = useContext(AppSettingsProviderContext);
const inputRef = useRef<HTMLTextAreaElement>(null);
@@ -96,6 +97,7 @@ export const ChatInput = () => {
useHotkeys(
currentHotkeys.StartOrStopRecording,
() => {
if (shadowing) return;
if (isRecording) {
stopRecording();
} else {
@@ -107,9 +109,16 @@ export const ChatInput = () => {
}
);
useHotkeys(currentHotkeys.PlayNextSegment, () => askAgent(), {
preventDefault: true,
});
useHotkeys(
currentHotkeys.PlayNextSegment,
() => {
if (shadowing) return;
askAgent();
},
{
preventDefault: true,
}
);
if (isRecording) {
return (