diff options
Diffstat (limited to 'web')
| -rw-r--r-- | web/templates/index.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/web/templates/index.html b/web/templates/index.html index 617ccfe..2cd4c59 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -84,6 +84,48 @@ </div> </div> + <!-- Bug Report Button --> + <button onclick="document.getElementById('bug-modal').classList.remove('hidden')" + class="fixed bottom-4 right-4 bg-red-500 hover:bg-red-600 text-white p-3 rounded-full shadow-lg no-print" + title="Report a bug"> + 🐛 + </button> + + <!-- Bug Report Modal --> + <div id="bug-modal" class="hidden fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50"> + <div class="bg-white rounded-lg shadow-xl max-w-md w-full max-h-[80vh] overflow-hidden"> + <div class="p-4 border-b border-gray-200 flex justify-between items-center"> + <h2 class="font-semibold text-gray-900">Report Bug</h2> + <button onclick="document.getElementById('bug-modal').classList.add('hidden')" + class="text-gray-400 hover:text-gray-600">✕</button> + </div> + <div class="p-4"> + <form hx-post="/bugs" + hx-target="#bug-list" + hx-swap="innerHTML" + hx-on::after-request="if(event.detail.successful) this.reset()"> + <textarea name="description" + placeholder="Describe the bug..." + class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm mb-3 h-24" + required></textarea> + <button type="submit" + class="w-full bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium"> + Submit Bug Report + </button> + </form> + <div class="mt-4 border-t border-gray-200 pt-4"> + <h3 class="text-sm font-medium text-gray-700 mb-2">Recent Reports</h3> + <div id="bug-list" + class="max-h-48 overflow-y-auto" + hx-get="/bugs" + hx-trigger="load"> + <p class="text-gray-400 text-sm">Loading...</p> + </div> + </div> + </div> + </div> + </div> + <script src="/static/js/htmx.min.js"></script> <script src="/static/js/app.js"></script> </body> |
