-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Louis Charnay <[email protected]>
- Loading branch information
1 parent
d28b1f7
commit 1971da8
Showing
9 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
atelier3/gateway-server/src/main/resources/static/pages/game-room.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Room</title> | ||
<link rel="stylesheet" href="../css/styles.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
</head> | ||
<body> | ||
<div class="profile"> | ||
<span>User</span> | ||
<strong class="admin">[ADMIN]</strong> | ||
<img src="../images/default-user.png" alt="Profile Icon" width="30"> | ||
</div> | ||
<div id="header"></div> | ||
<script> | ||
$(function() { | ||
$("#header").load("../components/header.html"); | ||
}); | ||
</script> | ||
<div class="container"> | ||
<h1 id="title"></h1> | ||
</div> | ||
<script src="../script/environment.js"></script> | ||
<script src="../script/handletoken.js"></script> | ||
<script src="../script/game-room.js"></script> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
atelier3/gateway-server/src/main/resources/static/script/game-room.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function getRoomFromAPI() { | ||
const pathname = window.location.pathname; | ||
const parts = pathname.split('/'); | ||
const roomId = parts[2]; | ||
|
||
fetch(`/api/game-rooms/${roomId}`) | ||
.then(response => response.json()) | ||
.then(data => { | ||
console.log(data); | ||
document.getElementById('title').innerText = data.name; | ||
}); | ||
} | ||
|
||
getRoomFromAPI(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters