Mercurial Hosting > chat
comparison src/account.html.luan @ 67:e4e331539146
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 06 Mar 2025 12:13:31 -0700 |
parents | f067de76084c |
children | a47036fd0158 |
comparison
equal
deleted
inserted
replaced
66:f067de76084c | 67:e4e331539146 |
---|---|
108 function doDeleteUser(el) { | 108 function doDeleteUser(el) { |
109 closeModal(el); | 109 closeModal(el); |
110 ajax('delete_user.js'); | 110 ajax('delete_user.js'); |
111 } | 111 } |
112 | 112 |
113 function openUrl() { | |
114 let dialog = document.querySelector('dialog[url]'); | |
115 openModal(dialog); | |
116 } | |
117 | |
113 function init() { | 118 function init() { |
114 showUsername(); | 119 showUsername(); |
115 showNotify(); | 120 showNotify(); |
116 showVoice(); | 121 showVoice(); |
117 } | 122 } |
129 input[name=notify_email] { | 134 input[name=notify_email] { |
130 width: 500px; | 135 width: 500px; |
131 } | 136 } |
132 input[name=voice] { | 137 input[name=voice] { |
133 width: 500px; | 138 width: 500px; |
139 } | |
140 dialog[url] { | |
141 width: 600px; | |
134 } | 142 } |
135 span[note] { | 143 span[note] { |
136 font-size: small; | 144 font-size: small; |
137 } | 145 } |
138 </style> | 146 </style> |
142 <div content> | 150 <div content> |
143 <h1>Your Account</h1> | 151 <h1>Your Account</h1> |
144 <p>Your username is <span username></span> <a href="javascript:editUsername()">Edit</a></p> | 152 <p>Your username is <span username></span> <a href="javascript:editUsername()">Edit</a></p> |
145 <p><span notify></span> <a href="javascript:editNotify()">Edit</a></p> | 153 <p><span notify></span> <a href="javascript:editNotify()">Edit</a></p> |
146 <p><span voice></span> <a href="javascript:editVoice()">Edit</a></p> | 154 <p><span voice></span> <a href="javascript:editVoice()">Edit</a></p> |
147 <p>Your chat URL is <%= base_url() %>/chat?with=<%=user.email%></p> | 155 <p><a href="javascript:openUrl()">Your chat URL</a></p> |
148 <p><a href="javascript:logout()">Logout</a></p> | 156 <p><a href="javascript:logout()">Logout</a></p> |
149 <p><a href="javascript:deleteUser()">Delete account</a></p> | 157 <p><a href="javascript:deleteUser()">Delete account</a></p> |
150 <p> </p> | 158 <p> </p> |
151 <p><a href="about.html">About Luan Chat</a></p> | 159 <p><a href="about.html">About Luan Chat</a></p> |
152 </div> | 160 </div> |
191 <h2>Edit Voice URL</h2> | 199 <h2>Edit Voice URL</h2> |
192 <form action="javascript:saveVoice()"> | 200 <form action="javascript:saveVoice()"> |
193 <p> | 201 <p> |
194 <label>URL for receiving voice calls</label><br> | 202 <label>URL for receiving voice calls</label><br> |
195 <input type=url name=voice><br> | 203 <input type=url name=voice><br> |
196 <span note>Leave blank for no voice URL. We recommend <a href="https://talky.io/">Talky</a>.</span> | 204 <span note>Leave blank for no voice URL. We recommend <a href="https://whereby.com/">Whereby</a>.</span> |
197 </p> | 205 </p> |
198 <div buttons> | 206 <div buttons> |
199 <button type=button onclick="closeModal(this)">Cancel</button> | 207 <button type=button onclick="closeModal(this)">Cancel</button> |
200 <button type=submit>Save</button> | 208 <button type=submit>Save</button> |
201 </div> | 209 </div> |
207 <div buttons> | 215 <div buttons> |
208 <button onclick="closeModal(this)">Cancel</button> | 216 <button onclick="closeModal(this)">Cancel</button> |
209 <button onclick="doDeleteUser(this)">Delete</button> | 217 <button onclick="doDeleteUser(this)">Delete</button> |
210 </div> | 218 </div> |
211 </dialog> | 219 </dialog> |
220 <dialog url> | |
221 <h2>Your chat URL</h2> | |
222 <p><%= base_url() %>/chat?with=<%=user.email%></p> | |
223 <p>Use this URL to link to your chat so that other people can chat with you by clicking on the link.</p> | |
224 <div buttons> | |
225 <button onclick="closeModal(this)">Close</button> | |
226 </div> | |
227 </dialog> | |
212 <script> init(); </script> | 228 <script> init(); </script> |
213 <!-- ID = <%=user.id%> --> | 229 <!-- ID = <%=user.id%> --> |
214 </body> | 230 </body> |
215 </html> | 231 </html> |
216 <% | 232 <% |