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