2024-06-03 19:23:14 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>LinkUp</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="style.css">
|
|
|
|
<script type="module" src="./app.js"></script>
|
2024-06-04 00:26:32 -04:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
|
2024-06-10 16:32:52 -04:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/atom-one-dark.min.css">
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
|
2024-06-03 19:23:14 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
2024-06-09 01:55:39 -04:00
|
|
|
<pear-ctrl></pear-ctrl>
|
|
|
|
<div id="linkup-text">LinkUp</div>
|
2024-06-03 19:23:14 -04:00
|
|
|
</header>
|
|
|
|
<main>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="sidebar">
|
|
|
|
<ul id="room-list">
|
|
|
|
<!-- Room list will be populated dynamically -->
|
|
|
|
</ul>
|
|
|
|
<button id="toggle-setup-btn">Create/Join Room</button>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="content">
|
|
|
|
<div id="register" class="hidden">
|
|
|
|
<form id="register-form">
|
|
|
|
<input required id="reg-username" type="text" placeholder="Username" />
|
|
|
|
<input type="file" id="avatar-file" accept="image/*" style="display: none;" />
|
|
|
|
<button type="button" id="select-avatar">Select Avatar</button>
|
|
|
|
<input type="submit" value="Register" />
|
|
|
|
</form>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="setup" class="hidden">
|
|
|
|
<div id="user-info">
|
|
|
|
<!-- User info will be populated dynamically -->
|
|
|
|
</div>
|
|
|
|
<button id="create-chat-room">Create Room</button>
|
|
|
|
<div id="or">- or -</div>
|
|
|
|
<div id="join-chat-room-container">
|
|
|
|
<label for="connection-topic">Topic:</label>
|
|
|
|
<input type="text" id="join-chat-room-topic" placeholder="connection topic">
|
|
|
|
<button id="join-chat-room">Join Room</button>
|
|
|
|
</div>
|
2024-06-03 23:16:22 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="chat" class="hidden">
|
|
|
|
<div id="header">
|
|
|
|
<div id="details">
|
|
|
|
<div>
|
|
|
|
Topic: <span id="chat-room-topic"></span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
Peers: <span id="peers-count">0</span>
|
|
|
|
</div>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="user-list">
|
|
|
|
<!-- User list will be populated here -->
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="messages-container">
|
|
|
|
<div id="messages"></div>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<form id="message-form">
|
|
|
|
<textarea id="message" rows="4"></textarea>
|
2024-06-09 02:22:46 -04:00
|
|
|
<input type="file" id="file-input" style="display:none;">
|
|
|
|
<button type="button" id="attach-file">Attach File</button>
|
2024-06-08 01:21:25 -04:00
|
|
|
<input type="submit" value="Send" />
|
|
|
|
</form>
|
|
|
|
<button id="remove-room-btn">Leave Room</button>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
2024-06-08 01:21:25 -04:00
|
|
|
<div id="loading" class="hidden">Loading ...</div>
|
2024-06-03 19:23:14 -04:00
|
|
|
</div>
|
|
|
|
</main>
|
2024-06-04 00:03:14 -04:00
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
const messageInput = document.getElementById('message');
|
|
|
|
messageInput.addEventListener('keydown', function(event) {
|
|
|
|
if (event.key === 'Enter' && !event.shiftKey) {
|
2024-06-08 01:21:25 -04:00
|
|
|
event.preventDefault();
|
|
|
|
document.getElementById('message-form').dispatchEvent(new Event('submit'));
|
2024-06-04 00:03:14 -04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2024-06-03 19:23:14 -04:00
|
|
|
</body>
|
2024-06-08 01:21:25 -04:00
|
|
|
</html>
|