Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
flex-direction: column;
position:fixed;
right: 0px;
top: 0px;
}

.outer{
Expand Down Expand Up @@ -93,11 +94,11 @@
display: none;
}

@media only screen and (min-device-width: 480px) and (max-device-width: 812px) and (orientation: landscape) {
/* @media only screen and (min-device-width: 480px) and (max-device-width: 812px) and (orientation: landscape) {
.sidebar{
top: 0;
}
}
} */

@media screen and (min-width: 1440px){
.wrapper{
Expand All @@ -110,6 +111,7 @@
}

.sidebar{
top: unset;
right: 10px;
}
.tooltip {
Expand Down
5 changes: 4 additions & 1 deletion src/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const Main = (props: IProps) => {
window.location.reload();
}

let h = window.innerHeight;

return (

<div className="App">
Expand All @@ -68,9 +70,10 @@ const Main = (props: IProps) => {
)
})}
</div>
<div className={minimizeChatbot ? "hidden" : "sidebar"}>
<div className={minimizeChatbot ? "hidden" : "sidebar"} style={{height: h}}>
{!props.twoPlayers ?
<Chatbot
height={h}
character={props.dbCharacter}
onHandleResetCards={() => setResetCards(true)}
onWin={onWin}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Chatbot/Chatbot.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.container{
margin: 20px;
border-radius: 10px;
/* margin: 20px; */
/* border-radius: 10px; */
color: black;
background-color: white;
}
Expand All @@ -13,7 +13,7 @@
justify-content: center;
background-color: #ebc934;
height: 70px;
border-radius: 10px 10px 0px 0px;
/* border-radius: 10px 10px 0px 0px; */
width: 100%;
font-size: 14px;
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Chatbot/Chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles from './Chatbot.module.css';
import Question from '../Question/Question';

interface IProps {
height: number;
character: ICharacter | null;
onWin: (win: boolean) => void;
win: boolean | null;
Expand Down Expand Up @@ -42,9 +43,9 @@ const Chatbot = (props: IProps) => {
}, []);

return (
<div className={styles.container}>
<div className={styles.container} style={{height: props.height}}>
<div className={styles.header}><span className={styles['hat-image']}></span>Hat Chat <button onClick={() => props.setMinimize(true)} /></div>
<div className={styles.chat} ref={chatEl}>
<div className={styles.chat} ref={chatEl} style={{height: props.height - 160}}>
{messageState ? messageState.map((m, key) => (
<div key={key} className={!m.fromUser ? styles.chatbox : styles['user-chatbox']}>
<div key={key}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Question/Question.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding: 10px;
height: 70px;
background-color: #ededed;
border-radius: 0px 0px 10px 10px;
/* border-radius: 0px 0px 10px 10px; */
}

.questions div{
Expand Down Expand Up @@ -50,7 +50,7 @@ form button{
border-radius: 0px 10px 10px 0px;
position: absolute;
height: 26px;
right: 30px;
right: 10px;
width: 28px;
border-color: transparent transparent transparent #2F751C;
background-repeat: no-repeat;
Expand Down