Spaces:
Running
Running
Create static/index.html
Browse files- static/index.html +111 -0
static/index.html
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
|
| 6 |
+
<title>InfinityChat</title>
|
| 7 |
+
<link rel="stylesheet" href="/static/style.css">
|
| 8 |
+
</head>
|
| 9 |
+
<body class="theme-light">
|
| 10 |
+
<div id="app">
|
| 11 |
+
<!-- AUTH SCREEN -->
|
| 12 |
+
<div id="auth-screen" class="screen">
|
| 13 |
+
<div class="auth-container">
|
| 14 |
+
<h1>∞ InfinityChat</h1>
|
| 15 |
+
<div class="auth-tabs">
|
| 16 |
+
<button id="login-tab" class="tab active">Login</button>
|
| 17 |
+
<button id="signup-tab" class="tab">Sign Up</button>
|
| 18 |
+
</div>
|
| 19 |
+
<form id="auth-form">
|
| 20 |
+
<input type="text" id="auth-username" placeholder="Username" required autocomplete="username">
|
| 21 |
+
<input type="password" id="auth-password" placeholder="Password" required autocomplete="current-password">
|
| 22 |
+
<div id="display-name-group" style="display:none">
|
| 23 |
+
<input type="text" id="auth-display-name" placeholder="Display Name (optional)">
|
| 24 |
+
</div>
|
| 25 |
+
<button type="submit" id="auth-submit">Login</button>
|
| 26 |
+
</form>
|
| 27 |
+
<div id="auth-error" class="error-msg"></div>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
<!-- CHAT SCREEN -->
|
| 32 |
+
<div id="chat-screen" class="screen hidden">
|
| 33 |
+
<header class="chat-header">
|
| 34 |
+
<div class="header-left">
|
| 35 |
+
<button id="settings-btn" class="icon-btn">⚙️</button>
|
| 36 |
+
</div>
|
| 37 |
+
<div class="header-title">InfinityChat <span id="online-count">0</span></div>
|
| 38 |
+
<div class="header-right">
|
| 39 |
+
<button id="logout-btn" class="icon-btn">🚪</button>
|
| 40 |
+
</div>
|
| 41 |
+
</header>
|
| 42 |
+
<div id="typing-indicator"></div>
|
| 43 |
+
<div id="messages-container">
|
| 44 |
+
<div id="messages-list"></div>
|
| 45 |
+
<div id="load-more">
|
| 46 |
+
<button id="load-older-btn" class="hidden">Load older messages</button>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<!-- Reply preview -->
|
| 51 |
+
<div id="reply-preview" class="hidden">
|
| 52 |
+
<span id="reply-preview-text"></span>
|
| 53 |
+
<button id="cancel-reply">✕</button>
|
| 54 |
+
</div>
|
| 55 |
+
|
| 56 |
+
<!-- Compose area -->
|
| 57 |
+
<form id="compose-form">
|
| 58 |
+
<div class="compose-area">
|
| 59 |
+
<button type="button" id="attach-btn">📎</button>
|
| 60 |
+
<input type="file" id="file-input" multiple style="display:none">
|
| 61 |
+
<textarea id="message-input" placeholder="Type a message…" rows="1"></textarea>
|
| 62 |
+
<button type="submit" id="send-btn">➤</button>
|
| 63 |
+
</div>
|
| 64 |
+
<div id="upload-progress" class="hidden">
|
| 65 |
+
<progress id="upload-bar" value="0" max="100"></progress>
|
| 66 |
+
<span id="upload-filename"></span>
|
| 67 |
+
</div>
|
| 68 |
+
</form>
|
| 69 |
+
</div>
|
| 70 |
+
|
| 71 |
+
<!-- SETTINGS MODAL -->
|
| 72 |
+
<div id="settings-modal" class="modal hidden">
|
| 73 |
+
<div class="modal-content">
|
| 74 |
+
<h2>Settings</h2>
|
| 75 |
+
<div class="setting-group">
|
| 76 |
+
<label>Display Name</label>
|
| 77 |
+
<input type="text" id="setting-display-name">
|
| 78 |
+
</div>
|
| 79 |
+
<div class="setting-group">
|
| 80 |
+
<label>Avatar</label>
|
| 81 |
+
<input type="file" id="setting-avatar">
|
| 82 |
+
<img id="avatar-preview" class="avatar-preview" src="" style="display:none">
|
| 83 |
+
</div>
|
| 84 |
+
<div class="setting-group">
|
| 85 |
+
<label>Theme</label>
|
| 86 |
+
<select id="theme-select">
|
| 87 |
+
<option value="theme-light">Light</option>
|
| 88 |
+
<option value="theme-dark">Dark</option>
|
| 89 |
+
<option value="theme-custom">Custom</option>
|
| 90 |
+
</select>
|
| 91 |
+
</div>
|
| 92 |
+
<div id="custom-theme-settings" class="hidden">
|
| 93 |
+
<label>Self Bubble</label>
|
| 94 |
+
<input type="color" id="custom-self-color" value="#25D366">
|
| 95 |
+
<label>Other Bubble</label>
|
| 96 |
+
<input type="color" id="custom-other-color" value="#E5E5EA">
|
| 97 |
+
<label>Text Color</label>
|
| 98 |
+
<input type="color" id="custom-text-color" value="#000000">
|
| 99 |
+
</div>
|
| 100 |
+
<div class="modal-actions">
|
| 101 |
+
<button id="save-settings">Save</button>
|
| 102 |
+
<button id="close-settings">Cancel</button>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<!-- Vanilla JS – loaded at end of body -->
|
| 109 |
+
<script src="/static/script.js"></script>
|
| 110 |
+
</body>
|
| 111 |
+
</html>
|