127 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
			
		
		
	
	
			127 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
| <!DOCTYPE html>
 | |
| <html lang="en">
 | |
|   <head>
 | |
|     <script src="/openpgp.min.js"></script>
 | |
|     <script src="/socket.io.min.v4.6.1.js"></script>
 | |
|     <script src="/aes.js"></script>
 | |
|     <script src="/chat.js"></script>
 | |
|     <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>vybe</title>
 | |
|     <style>
 | |
|       * {
 | |
|         font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
 | |
|           Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
 | |
|           sans-serif;
 | |
|       }
 | |
|       body,
 | |
|       button,
 | |
|       input {
 | |
|         background: #020202;
 | |
|         color: #eaeaea;
 | |
|       }
 | |
|       body {
 | |
|         display: flex;
 | |
|         align-items: stretch;
 | |
|         margin: 0;
 | |
|         min-width: min-content;
 | |
|         padding: 0 20px;
 | |
|       }
 | |
|       .column {
 | |
|         flex: 1;
 | |
|         max-width: 50vw;
 | |
|         overflow: hidden;
 | |
|       }
 | |
|       button {
 | |
|         border-color: #767676;
 | |
|       }
 | |
|       .hidden {
 | |
|         display: none;
 | |
|       }
 | |
|       #msginput {
 | |
|         margin-top: 15px;
 | |
|       }
 | |
|       .message {
 | |
|         margin-bottom: 5px;
 | |
|         overflow-wrap: break-word;
 | |
|       }
 | |
|       #loadmore {
 | |
|         margin-bottom: 10px;
 | |
|       }
 | |
|       .channel {
 | |
|         font-weight: normal;
 | |
|       }
 | |
|       .member {
 | |
|         margin: 5px 0;
 | |
|       }
 | |
|     </style>
 | |
|   </head>
 | |
|   <body>
 | |
|     <div id="register" class="hidden">
 | |
|       <h1>welcome to vybe</h1>
 | |
|       <h3>a communication network (beta)</h3>
 | |
|       <p>
 | |
|         to get started, you'll need an account. we use public key cryptography
 | |
|         for security, rather than passwords. for now your keys are stored in
 | |
|         your browser storage only.
 | |
|       </p>
 | |
|       <form id="registerform">
 | |
|         <label for="name">name/username: </label>
 | |
|         <input type="text" id="name" />
 | |
|         <button id="submit" type="submit">generate keys & register</button>
 | |
|       </form>
 | |
|     </div>
 | |
|     <div id="threads" class="column hidden">
 | |
|       <h1>vybe</h1>
 | |
|       <h3>threads</h3>
 | |
|       <div id="threadlist">loading...</div>
 | |
|       <h3>create thread</h3>
 | |
|       <form id="createthread">
 | |
|         <label for="newthreadname">thread name</label>
 | |
|         <input type="text" id="newthreadname" /><br /><br />
 | |
|         <span>thread permissions</span><br />
 | |
|         <input type="radio" id="public" name="permissions" value="public" />
 | |
|         <label for="public">anyone can view and post</label><br />
 | |
|         <input
 | |
|           type="radio"
 | |
|           id="private_post"
 | |
|           name="permissions"
 | |
|           value="private_post"
 | |
|         />
 | |
|         <label for="private_post">only members can post, anyone can view</label
 | |
|         ><br />
 | |
|         <input
 | |
|           type="radio"
 | |
|           id="private_view"
 | |
|           name="permissions"
 | |
|           value="private_view"
 | |
|         />
 | |
|         <label for="private_view">only members can view and post</label
 | |
|         ><br /><br />
 | |
|         <span>members</span><br />
 | |
|         <input type="text" id="membername" placeholder="username" /><button
 | |
|           id="addmember"
 | |
|         >
 | |
|           add
 | |
|         </button>
 | |
|         <div id="memberlist"></div>
 | |
|         <br />
 | |
|         <button id="submitthread" type="submit">create</button>
 | |
|       </form>
 | |
|     </div>
 | |
|     <div id="chat" class="column hidden">
 | |
|       <h3 class="thread">
 | |
|         current thread: <strong id="threadname">meow</strong>
 | |
|       </h3>
 | |
|       <h3>messages will appear below as they are sent</h3>
 | |
|       <button id="loadmore" class="hidden">load more messages</button>
 | |
|       <div id="messages"></div>
 | |
|       <form id="msginput">
 | |
|         <input type="text" placeholder="write a message..." id="msg" />
 | |
|         <button type="submit" class="hidden" id="sendmsg"></button>
 | |
|       </form>
 | |
|     </div>
 | |
|   </body>
 | |
| </html>
 |