mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 07:36:39 +08:00
chore: listening css
This commit is contained in:
parent
b91c224d75
commit
7475519473
@ -75,6 +75,14 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.listening {
|
||||
width: var(--full-width);
|
||||
.text {
|
||||
opacity: 1;
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
--delay: 0.5s;
|
||||
width: var(--full-width);
|
||||
|
@ -370,6 +370,7 @@ export function ChatAction(props: {
|
||||
text: string;
|
||||
icon: JSX.Element;
|
||||
onClick: () => void;
|
||||
isListening: boolean;
|
||||
}) {
|
||||
const iconRef = useRef<HTMLDivElement>(null);
|
||||
const textRef = useRef<HTMLDivElement>(null);
|
||||
@ -391,7 +392,9 @@ export function ChatAction(props: {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${styles["chat-input-action"]} clickable`}
|
||||
className={`${styles["chat-input-action"]} clickable ${
|
||||
props.isListening ? styles["listening"] : ""
|
||||
}`}
|
||||
onClick={() => {
|
||||
props.onClick();
|
||||
setTimeout(updateWidth, 1);
|
||||
@ -838,6 +841,7 @@ export function ChatActions(props: {
|
||||
}
|
||||
text={isListening ? Locale.Chat.StopSpeak : Locale.Chat.StartSpeak}
|
||||
icon={isListening ? <VoiceOpenIcon /> : <VoiceCloseIcon />}
|
||||
isListening={isListening}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user