mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 13:19:16 +00:00
Code clean-up and some fit and finish
- Add a lot more suggestions cards, improve mobile rendering of suggestion cards, improve alignment of chat input, shift message when starts recording voice, remove dead code
This commit is contained in:
@@ -258,7 +258,7 @@ export default function ChatInputArea(props: ChatInputProps) {
|
||||
useEffect(() => {
|
||||
if (!chatInputRef.current) return;
|
||||
chatInputRef.current.style.height = 'auto';
|
||||
chatInputRef.current.style.height = Math.max(chatInputRef.current.scrollHeight-24, 64) + 'px';
|
||||
chatInputRef.current.style.height = Math.max(chatInputRef.current.scrollHeight - 24, 64) + 'px';
|
||||
}, [message]);
|
||||
|
||||
return (
|
||||
@@ -398,7 +398,9 @@ export default function ChatInputArea(props: ChatInputProps) {
|
||||
<Button
|
||||
variant={'ghost'}
|
||||
className="!bg-none p-1 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
|
||||
onClick={() => setRecording(!recording)}
|
||||
onClick={() => {
|
||||
setRecording(!recording);
|
||||
}}
|
||||
disabled={props.sendDisabled}
|
||||
>
|
||||
<Stop weight='fill' className={`${props.isMobileWidth ? 'w-6 h-6' : 'w-8 h-8'}`} />
|
||||
@@ -420,7 +422,10 @@ export default function ChatInputArea(props: ChatInputProps) {
|
||||
<Button
|
||||
variant={'ghost'}
|
||||
className="!bg-none p-1 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500"
|
||||
onClick={() => setRecording(!recording)}
|
||||
onClick={() => {
|
||||
setMessage("Listening...");
|
||||
setRecording(!recording);
|
||||
}}
|
||||
disabled={props.sendDisabled}
|
||||
>
|
||||
<Microphone weight='fill' className={`${props.isMobileWidth ? 'w-6 h-6' : 'w-8 h-8'}`} />
|
||||
|
||||
Reference in New Issue
Block a user