misc: add login message to post create
This commit is contained in:
1 parent
128167bfe9
commit
f90ecb703c
4 files changed
+18
-3
No files matched your search
@@ -6,7 +6,9 @@
|
||||
|
||||
<a
|
||||
{href}
|
||||
class="flex flex-row gap-2 {highlight ? 'text-sky-500' : ''} hover:underline"
|
||||
class="inline-flex flex-row gap-2 {highlight
|
||||
? 'text-sky-500'
|
||||
: ''} hover:underline"
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot name="icon" />
|
||||
|
||||
@@ -98,10 +98,15 @@
|
||||
<span class="hidden md:inline">Create</span>
|
||||
</Button>
|
||||
<li class="text-xs opacity-80 text-left mx-4 my-1 py-1">Create</li>
|
||||
<MenuButton link href="/create/post">
|
||||
<MenuButton link href="/create/post" disabled={$authData == undefined}>
|
||||
<Icon src={PencilSquare} mini width={16} />
|
||||
Post
|
||||
</MenuButton>
|
||||
{#if !$authData}
|
||||
<span class="text-sm mx-4 my-1 py-1">
|
||||
<Link highlight href="/login">Log in</Link> to create content.
|
||||
</span>
|
||||
{/if}
|
||||
</Menu>
|
||||
</div>
|
||||
<Menu let:toggleOpen alignment="bottom-right" itemsClass="!h-8">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{href}
|
||||
class="flex flex-row gap-2 items-center px-4 py-2 w-full text-sm transition-colors {buttonColors[
|
||||
color
|
||||
]}"
|
||||
]} {disabled ? 'opacity-50 pointer-events-none' : ''}"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user