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
85 changes: 85 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Node Chat</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="login-screen" id="loginScreen">
<h1>Welcome to Node Chat</h1>
<div class="login-form">
<input type="text" id="usernameInput" placeholder="Enter your username" maxlength="20">
<button id="setUsernameBtn">Join Chat</button>
</div>
</div>

<div class="chat-app" id="chatApp" style="display: none;">
<div class="sidebar">
<div class="user-info">
<span>Welcome, <strong id="currentUsername"></strong></span>
<button id="logoutBtn">Logout</button>
</div>

<div class="rooms-section">
<div class="rooms-header">
<h3>Rooms</h3>
<button id="createRoomBtn">+ Create Room</button>
</div>
<div class="rooms-list" id="roomsList">
</div>
</div>
</div>

<div class="chat-section">
<div class="chat-header">
<h2 id="currentRoomName">Select a room</h2>
<div class="room-actions">
<button id="renameRoomBtn" style="display: none;">Rename</button>
<button id="deleteRoomBtn" style="display: none;">Delete</button>
</div>
</div>

<div class="messages-container" id="messagesContainer">
<div class="no-room-message">
<p>Please select or create a room to start chatting</p>
</div>
</div>

<div class="message-input-container" id="messageInputContainer" style="display: none;">
<input type="text" id="messageInput" placeholder="Type your message..." maxlength="500">
<button id="sendMessageBtn">Send</button>
</div>
</div>
</div>
</div>

<!-- Modals -->
<div class="modal" id="createRoomModal">
<div class="modal-content">
<h3>Create New Room</h3>
<input type="text" id="newRoomNameInput" placeholder="Room name" maxlength="30">
<div class="modal-actions">
<button id="confirmCreateRoomBtn">Create</button>
<button id="cancelCreateRoomBtn">Cancel</button>
</div>
</div>
</div>

<div class="modal" id="renameRoomModal">
<div class="modal-content">
<h3>Rename Room</h3>
<input type="text" id="renameRoomInput" placeholder="New room name" maxlength="30">
<div class="modal-actions">
<button id="confirmRenameRoomBtn">Rename</button>
<button id="cancelRenameRoomBtn">Cancel</button>
</div>
</div>
</div>

<script src="/socket.io/socket.io.js"></script>
<script src="script.js"></script>
</body>
</html>
Loading