This repository has been archived by the owner on Apr 15, 2021. It is now read-only.
-
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.
Adds settings for the owner and a defined owner!
- Loading branch information
Showing
7 changed files
with
121 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const socket = io('http://localhost:3000') | ||
const settingsForm = document.getElementById('settings'); | ||
const back = document.getElementById('back') | ||
|
||
back.addEventListener('click', () => { | ||
window.location.href = `/${roomName}/owner`; | ||
}); | ||
|
||
settingsForm.addEventListener('submit', e => { | ||
e.preventDefault() | ||
socket.emit('privacy-change', roomName, document.getElementById('private').value) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Chat App</title> | ||
<script> | ||
const roomName = "<%= roomName %>" | ||
</script> | ||
<script defer src="http://localhost:3000/socket.io/socket.io.js"></script> | ||
<script defer src="../script.js"></script> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | ||
</head> | ||
|
||
<body> | ||
<nav> | ||
<div class='nav-wrapper'> | ||
<a class="waves-effect waves-light btn" id='back'>Back To Home</a> | ||
<a class="waves-effect waves-light btn" id='name'>Change Your Name</a> | ||
<a class="waves-effect waves-light btn" id='settings'>Settings</a> | ||
<a class="brand-logo center" id="title"><%= roomName %></a> | ||
</div> | ||
</nav> | ||
<br> | ||
<div id='user-contaner'> | ||
<p>Members In <%= roomName %></p> | ||
</div> | ||
<br> | ||
<div id='message-contaner'> | ||
<p>Start Of Chat</p> | ||
</div> | ||
<form id='send-message-form' align="center"> | ||
|
||
<textarea placeholder="Message" rows="4" cols="50" form="send-message-form" id="message-input" required></textarea> | ||
<button type='submit' id='send-message' class="waves-effect waves-light btn">Send</button> | ||
</form> | ||
</body> | ||
|
||
</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
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,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Chat App</title> | ||
<script> | ||
const roomName = "<%= roomName %>" | ||
</script> | ||
<script defer src="http://localhost:3000/socket.io/socket.io.js"></script> | ||
<script defer src="../settings.js"></script> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | ||
</head> | ||
|
||
<body> | ||
<nav> | ||
<div class='nav-wrapper'> | ||
<a class="waves-effect waves-light btn" id='back'>Back To <%= roomName %></a> | ||
<a class="brand-logo center" id="title"><%= roomName %> Settings</a> | ||
</div> | ||
</nav> | ||
<br> | ||
<div align="center"> | ||
<form id='settings'> | ||
<div class="switch"> | ||
<label> | ||
Public | ||
<input type="checkbox" id='private'> | ||
<span class="lever"></span> | ||
Private | ||
</label> | ||
</div> | ||
<br> | ||
<button type="submit" class="waves-effect waves-light btn">Save</button> | ||
</form> | ||
</div> | ||
</body> | ||
|
||
</html> |