Skip to content

Commit

Permalink
Improve usability
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsc0301 committed Jul 4, 2023
1 parent f7115e0 commit 582f7af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span class="welcomeMessage"></span>
<canvas id="app" width="640" height="360"></canvas>
<form id="loginForm">
<input type="text" placeholder="ip-address:port" value="https://best-multiplayer-game-possible-pvenbf56dq-uc.a.run.app/" readonly disabled>
<input type="text" placeholder="ip-address:port" value="https://best-multiplayer-game-possible-pvenbf56dq-uc.a.run.app/">
<input type="text" autocomplete="false" placeholder="Your username"><input type="submit" value="GO!">
<span class="error"></span>
</form>
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const server = {
get URL() {
if(!this.ipAddress) return false;

return `http://${this.ipAddress}`;
return this.ipAddress;
}
};

Expand All @@ -34,7 +34,7 @@ let currentRoom;

let gameplayLoop;
function init() {
welcomeMessage.innerHTML = 'Insert your username to start';
welcomeMessage.innerHTML = 'Insert the IP address and your Username to start';

loginForm.addEventListener('submit', e => {
e.preventDefault();
Expand Down
6 changes: 4 additions & 2 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ body {

#loginForm {
position: relative;
display: flex;
justify-content: center;
width: 640px;

display: grid;
grid-template-columns: 3fr 2fr 1fr;
gap: 8px;
padding: 32px 0;

Expand Down

0 comments on commit 582f7af

Please sign in to comment.