mirror of
https://github.com/spchcap/speech.capital.git
synced 2026-01-14 08:38:42 +00:00
Feat: Display user status and logout button
This commit is contained in:
13
index.html
13
index.html
@@ -12,13 +12,16 @@
|
|||||||
<div class="min-h-screen bg-black text-white px-4 py-8 md:py-16">
|
<div class="min-h-screen bg-black text-white px-4 py-8 md:py-16">
|
||||||
<div class="max-w-2xl mx-auto space-y-2">
|
<div class="max-w-2xl mx-auto space-y-2">
|
||||||
|
|
||||||
<div class="flex justify-end pr-2">
|
<div class="flex justify-end pr-2" x-data="{user:null}" x-init="fetch('/api/user').then(r=>r.json()).then(d=>user=d.user)">
|
||||||
<a
|
<a x-show="!user" href="/signup" class="text-yellow-200/80 hover:text-yellow-200">
|
||||||
href="/signup"
|
|
||||||
class="text-yellow-200/80 hover:text-yellow-200 transition-colors"
|
|
||||||
>
|
|
||||||
<i data-lucide="user-plus" class="w-4 h-4"></i>
|
<i data-lucide="user-plus" class="w-4 h-4"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<div x-show="user" class="flex items-center gap-2 text-xs" style="display:none">
|
||||||
|
<span class="text-gray-300">as <strong x-text="user?.username" class="text-yellow-200/80"></strong></span>
|
||||||
|
<a href="/api/logout" class="text-yellow-200/80 hover:text-yellow-200">
|
||||||
|
<i data-lucide="log-out" class="w-4 h-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Subs Container -->
|
<!-- Subs Container -->
|
||||||
|
|||||||
Reference in New Issue
Block a user