+
+
Welcome to KAEPS!
+
Here are some guides for playing this game:
+
+ - Speaker: Receives a word, records it, inverts the audio, and sends it to other players.
+ - Challenger: Listens to the inverted audio and tries to guess the original word.
+ - Scoring: Correctly deciphering the word scores you points.
+ - Turns: Each round has one Speaker and multiple Challengers. Players take turns to be the Speaker.
+
+
Join a room or create one to play with friends!
+
+
diff --git a/src/components/views/Profile.tsx b/src/components/views/Profile.tsx
index bbd2161..141464d 100644
--- a/src/components/views/Profile.tsx
+++ b/src/components/views/Profile.tsx
@@ -10,7 +10,7 @@ import { User } from "types";
const Profile = () => {
const navigate = useNavigate();
const { id } = useParams<{ id: string }>();
- const localId = parseInt(sessionStorage.getItem("id") ?? "0", 10);
+ const localId = sessionStorage.getItem("id");
const [user, setUser] = useState("");
useEffect(() => {
diff --git a/src/stomp_types.ts b/src/stomp_types.ts
index bd87a24..dab19ab 100644
--- a/src/stomp_types.ts
+++ b/src/stomp_types.ts
@@ -8,21 +8,21 @@ export type Timestamped = {
}
export type PlayerAudio = {
- userID: number;
+ userID: string;
audioData: Base64audio;
}
export type PlayerAndRoomID = {
- userID: number;
- roomID: number;
+ userID: string;
+ roomID: string;
}
export type AnswerGuess = {
- userID: number;
- roomID: number;
+ userID: string;
+ roomID: string;
guess: string;
roundNum: number;
- currentSpeakerID: number;
+ currentSpeakerID: string;
}
export type StompResponse = {
diff --git a/src/styles/ui/VolumeBar.scss b/src/styles/ui/VolumeBar.scss
index 7e07a88..2e5ea9f 100644
--- a/src/styles/ui/VolumeBar.scss
+++ b/src/styles/ui/VolumeBar.scss
@@ -13,8 +13,11 @@ $backgroundColor: $darkBlue;
width: fit-content;
// only apply padding in horizontal direction
padding: 2px 10px;
- cursor: pointer;
+ // cursor: pointer;
transition: background-color 0.3s ease;
+ input {
+ cursor: pointer;
+ }
&.toggle-mute{
height: 20px;
align-items: center;
diff --git a/src/styles/ui/WavePlayer.scss b/src/styles/ui/WavePlayer.scss
index b54e676..bee5170 100644
--- a/src/styles/ui/WavePlayer.scss
+++ b/src/styles/ui/WavePlayer.scss
@@ -23,7 +23,7 @@
}
.no-audio-placeholder {
position: absolute;
- left: 1.5rem;
+ left: 2.5rem;
font-size: 1.5rem;
animation: pulse 10s infinite;
color: $classicYellow;
diff --git a/src/styles/views/Gameroom.scss b/src/styles/views/Gameroom.scss
index 5fb0178..48d681e 100644
--- a/src/styles/views/Gameroom.scss
+++ b/src/styles/views/Gameroom.scss
@@ -21,13 +21,21 @@
flex-direction: row;
justify-content: space-between;
overflow: auto;
+ .header.container{
+ padding-left: 10%;
+ }
+ }
+ &.left-area{
+ display: flex;
+ height: 100%;
+ flex-direction: column;
}
&.right-area{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
- margin-top: 5vh;
+ // margin-top: 5vh;
flex-grow: 1;
// height: 100%;
.inputarea {
@@ -79,9 +87,10 @@
&.playercontainer {
// position: relative;
// top:5vh;
- margin-top: 5vh;
+ // margin-top: 5vh;
left: 0;
- width: 28vw;
+ // width: 28vw;
+ width: 100%;
min-width: min-content;
// height: 100%;
background: $classicYellow;
@@ -91,15 +100,17 @@
align-items: flex-start; /* Align items to the start (left) */
justify-content: flex-start; /* Align content to the start (left) */
box-shadow: $dropShadow;
+ flex-grow: 1;
gap: 1rem;
}
&.roominfocontainer {
z-index:999;
- position: fixed;
+ // position: fixed;
+ position: sticky;
left:0;
top:0;
height: 5vh;
- width: 28vw;
+ width: 100%;
display: flex;
flex-wrap: nowrap;
align-items: center;
@@ -116,8 +127,7 @@
font-family: 'Inter';
font-style: normal;
font-weight: bold;
- font-size: 1.6rem
- ;
+ font-size: 1.6rem;
color: $darkBlue;
}
&.singlePlayerContainer {
@@ -288,10 +298,12 @@
.readybutton {
background-color: $classicYellow;
+ border:0;
}
.cancelbutton {
background-color: rgba(129, 129, 129, 1);
+ border:0;
}
.readybutton:hover {
@@ -411,7 +423,7 @@
border-radius: 22px;
background-color: $whiteYellow;
display: grid;
- grid-template-columns: repeat(auto-fill, minmax(4vw, 1fr));
+ grid-template-columns: minmax(5vw, 5vw) minmax(5vw, 5vw) minmax(5vw, 5vw) minmax(5vw, 5vw) repeat(auto-fit, minmax(6vw, 6vw));
gap: 0.5rem;
}
&.ldPlayerAvatar {
@@ -543,6 +555,8 @@
font-weight: 700;
font-size: 0.8rem;
color:lighten($darkBlue,20%);
+ max-width: 100%;
+ word-wrap: break-word;
}
&.currentAnswer {
position: relative;
@@ -555,7 +569,7 @@
.validateForm {
background-color: $whiteYellow;
border-radius: 5%;
- width: 200%;
+ width: 80%;
padding:0 0.6rem;
padding-right: 2rem;
border: 1px solid $classicYellow;
@@ -566,7 +580,7 @@
margin-left: 5%;
border-radius: 15%;
border: 0px;
- width: 40%;
+ width: 20%;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/styles/views/Header.scss b/src/styles/views/Header.scss
index 1cc845a..79dfb1d 100644
--- a/src/styles/views/Header.scss
+++ b/src/styles/views/Header.scss
@@ -2,11 +2,11 @@
.header {
&.container {
- position: fixed;
+ position: sticky;
top:0;
left: 0;
background-color: $greyBlue;
- width: 100vw;
+ width: 100%;
height: 5vh;
display: flex;
align-content: center;
diff --git a/src/styles/views/Lobby.scss b/src/styles/views/Lobby.scss
index d2fffbb..252a785 100644
--- a/src/styles/views/Lobby.scss
+++ b/src/styles/views/Lobby.scss
@@ -61,9 +61,9 @@
justify-content: center;
height: auto;
width: 100%;
- bottom: 3%;
+ bottom: 1.5%;
left: 0%;
- margin-top: 2%;
+ margin-top: 30px;
flex-grow: 1;
.create-room-btn{
bottom: 0%;
@@ -83,6 +83,25 @@
// make the text bold
font-weight: bolder;
}
+ .reload-room-btn{
+ margin-left: 20px;
+ bottom: 0%;
+ min-width: fit-content;
+ width: 20%;
+ min-height: 50px;
+ display: flex;
+ justify-items: center;
+ align-items: center;
+ justify-content: center;
+ align-content: center;
+ font-size: 1.3em;
+ background-color: $darkBlue;
+ color: white;
+ // dont capitalize the text
+ text-transform: none;
+ // make the text bold
+ font-weight: bolder;
+ }
}
}
&.user-list {
@@ -109,11 +128,13 @@
margin-inline: 5%;
justify-content: space-between;
flex-direction: row;
+ text-align: center;
}
.room {
background-color: #fff;
margin-bottom: 10px;
border-radius: 8px;
+ text-align: center;
//overflow: hidden;
.room-header{
@@ -124,6 +145,7 @@
align-items: center; // Center the items horizontally
justify-content: center; // Center the items vertically
padding: 10px;
+ text-align: center;
}
@@ -148,6 +170,7 @@
flex-direction: column; /* 堆叠子元素 */
align-items: center; /* 水平居中 */
justify-content: center; /* 垂直居中 */
+ text-align: center;
padding: 10px; // Align the room details to the end of the flex container
}
@@ -279,7 +302,7 @@
position: absolute; // 使用绝对定位
left: 15%; // 定位到zuo边
top: 25%; // 从顶部留下10%的空间以居中显示
- font-size: 20rem; /* 设定容器的字体大小 */
+ font-size: 15vw; /* 设定容器的字体大小 */
}
.big-title {
@@ -305,13 +328,36 @@
//padding: 0.25rem; /* 小间距增加点击区域 */
cursor: pointer;
}
+.intro-popup{
+ height:55%;
+ //width: 500px;
+ &.btn-container{
+ width: 200px;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: flex-end;
+ //margin-top: 10%;
+ Button{
+ height: auto;
+ font-size: 1em;
+ padding: 0.6em;
+ margin: 0 10px;
+ color: white;
+ background-color: $classicYellow;
+ }
+ }
+}
+.intro-cnt{
+ width: 450px;
+}
.profile-popup{
- height:50%;
+ height:70%;
&.content{
display: flex;
flex-direction: column;
flex-grow: 1;
- font-size: 2em;
+ font-size: 1.5em;
.title{
font-size: 1.5em;
margin-bottom: 20px;
@@ -374,7 +420,7 @@
}
.room-creation-popup{
- height: 50%;
+ height: 80%;
&.content{
display: flex;
flex-direction: column;
@@ -388,7 +434,7 @@
}
input {
height: 100px;
- width: 800px;
+ width: 600px;
padding-left: 1px;
margin-left: 4px;
border: 1px solid black;
@@ -403,9 +449,10 @@
display: flex;
align-items: center;
justify-items: center;
- width: 800px;
+ width: 600px;
height: 100px;
- margin-bottom: 20px;
+ margin-top: 20px;
+ margin-bottom: 40px;
select{
appearance: none;
-webkit-appearance: none;
diff --git a/src/types.ts b/src/types.ts
index 4ccbe4e..1c8d1df 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -3,7 +3,7 @@ export type User = {
username: string;
avatar: string;
name: string;
- id: number;
+ id: string;
registerDate: Date;
birthday: Date;
};
@@ -20,4 +20,5 @@ export type Room = {
playToOuted: boolean | null;
};
-export type Base64audio = `data:audio/${string};base64,${string}`;
+// export type Base64audio = `data:audio/${string};base64,${string}`;
+export type Base64audio = string;