Skip to content

Commit

Permalink
Merge pull request #219 from apecloud/feat/chat
Browse files Browse the repository at this point in the history
feat: chat css
  • Loading branch information
zhouxiny1 authored Mar 14, 2024
2 parents eeb69ce + 1f2120c commit c87661e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/chatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const TypeWriterInput = () => {
const [chatReady, setChatReady] = useState<boolean>(false);
const [currentTips, setTips] = useState <string>('');



useEffect(() => {
document.getElementsByTagName('kube-chat')[0].logo.style.opacity = 0
document.getElementsByTagName('kube-chat')[0].style.display= 'none'
const chatTips = () => {
const tips1 = "how to install kubeblocks".split(/\s/);
const tips2 = "how to create a mysql cluster".split(/\s/);
Expand Down Expand Up @@ -58,6 +60,7 @@ const TypeWriterInput = () => {

const handleClick = (event) => {
event.preventDefault();
document.getElementsByTagName('kube-chat')[0].style.display= 'block'
document.getElementsByTagName('kube-chat')[0].setBotExpand(true);
document.getElementsByTagName('kube-chat')[0].askQuestion(currentTips)
};
Expand All @@ -77,6 +80,7 @@ const TypeWriterInput = () => {
}}
onClose={() => {
setOpen(false);
document.getElementsByTagName('kube-chat')[0].style.display= 'none'
}}
onReady={() => {
setChatReady(true);
Expand Down

0 comments on commit c87661e

Please sign in to comment.