Fix a few small bugs

This commit is contained in:
Jonathan Staab 2023-04-19 08:54:14 -05:00
parent 9e18bb1f3e
commit b46fde360b
4 changed files with 16 additions and 15 deletions

View File

@ -181,7 +181,7 @@
<div class="flex justify-between text-gray-1" on:click|stopPropagation> <div class="flex justify-between text-gray-1" on:click|stopPropagation>
<div class="flex"> <div class="flex">
<button <button
class={cx("w-14 text-left", { class={cx("w-16 text-left", {
"pointer-events-none opacity-50": disableActions, "pointer-events-none opacity-50": disableActions,
})} })}
on:click={reply.start}> on:click={reply.start}>
@ -189,7 +189,7 @@
{$repliesCount} {$repliesCount}
</button> </button>
<button <button
class={cx("w-14 text-left", { class={cx("w-16 text-left", {
"pointer-events-none opacity-50": disableActions, "pointer-events-none opacity-50": disableActions,
"text-accent": like, "text-accent": like,
})} })}
@ -201,7 +201,7 @@
{$likesCount} {$likesCount}
</button> </button>
<button <button
class={cx("w-16 text-left", { class={cx("w-20 text-left", {
"pointer-events-none opacity-50": disableActions, "pointer-events-none opacity-50": disableActions,
"text-accent": zap, "text-accent": zap,
})} })}

View File

@ -40,7 +40,9 @@
return toast.show("error", "A name is required for your list") return toast.show("error", "A name is required for your list")
} }
if (find(e => e.id !== list.id && Tags.from(e).getMeta("d") === values.name, user.getLists())) { if (
find(e => e.id !== list?.id && Tags.from(e).getMeta("d") === values.name, user.getLists())
) {
return toast.show("error", "That name is already in use") return toast.show("error", "That name is already in use")
} }

View File

@ -66,16 +66,15 @@
<i slot="before" class={`fa fa-${icon}`} /> <i slot="before" class={`fa fa-${icon}`} />
</Input> </Input>
{/if} {/if}
<div <slot name="button">
on:click={() => { <Anchor
isOpen = true type="button"
}}> on:click={() => {
<slot name="button"> isOpen = true
<Anchor type="button"> }}>
<i class="fa fa-upload" /> <i class="fa fa-upload" />
</Anchor> </Anchor>
</slot> </slot>
</div>
</div> </div>
{#if quote} {#if quote}

View File

@ -35,7 +35,7 @@
trigger: triggerType, trigger: triggerType,
animation: "shift-away", animation: "shift-away",
onShow: () => { onShow: () => {
const [tooltipContents] = tooltip.children const [tooltipContents] = tooltip?.children || []
// If we've already triggered it, tooltipContents will be empty // If we've already triggered it, tooltipContents will be empty
if (tooltipContents) { if (tooltipContents) {