Replace the input with a "Login to chat" button for logged-out users
This commit is contained in:
parent
dc164bd8e2
commit
55e6ed2ca8
1 changed files with 9 additions and 2 deletions
|
|
@ -456,7 +456,14 @@
|
||||||
{sendError}
|
{sendError}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if joinToChat}
|
{#if !auth.user}
|
||||||
|
<button
|
||||||
|
onclick={openLogin}
|
||||||
|
class="bg-accent hover:bg-accent-hover w-full rounded px-3 py-2 text-sm font-medium text-white"
|
||||||
|
>
|
||||||
|
Login to chat
|
||||||
|
</button>
|
||||||
|
{:else if joinToChat}
|
||||||
<button
|
<button
|
||||||
onclick={onJoinToChat}
|
onclick={onJoinToChat}
|
||||||
class="bg-accent hover:bg-accent-hover w-full rounded px-3 py-2 text-sm font-medium text-white"
|
class="bg-accent hover:bg-accent-hover w-full rounded px-3 py-2 text-sm font-medium text-white"
|
||||||
|
|
@ -473,7 +480,7 @@
|
||||||
autoGrow
|
autoGrow
|
||||||
maxRows={10}
|
maxRows={10}
|
||||||
disabled={sending}
|
disabled={sending}
|
||||||
placeholder={auth.user ? "Message..." : "Login to send messages"}
|
placeholder="Message..."
|
||||||
{contextPubkeys}
|
{contextPubkeys}
|
||||||
textareaClass="block w-full resize-none rounded border border-neutral-200 dark:border-neutral-700 py-2 pl-3 pr-11 text-sm focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50"
|
textareaClass="block w-full resize-none rounded border border-neutral-200 dark:border-neutral-700 py-2 pl-3 pr-11 text-sm focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue