misc: Change the way buttons are handled

This commit is contained in:
Xyphyn committed 2023-07-19 13:43:18 -07:00
1 parent d8ac0d807a
commit e243848e17
30 files changed
+215 -152

No files matched your search

@@ -17,9 +17,7 @@
</script>
<li
class="py-2 {$page.url.hash == `#${node.comment_view.comment.id}`
? 'bg-slate-200 dark:bg-zinc-800'
: ''} {node.depth == 0
class="py-2 {node.depth == 0
? 'border-b border-slate-200 dark:border-zinc-800'
: ''}"
id="#{node.comment_view.comment.id.toString()}"
@@ -83,7 +81,7 @@
node.children = [
{
children: [],
depth: node.depth,
depth: node.depth + 1,
comment_view: e.detail.comment_view,
},
...node.children,
@@ -55,15 +55,14 @@
class="bg-slate-100 dark:bg-zinc-900"
bind:value={newComment}
/>
<div
class="w-full ml-auto flex flex-row gap-2 md:w-24 md:absolute md:bottom-0 md:right-0 md:m-2"
>
<div class="sm:ml-auto sm:w-28">
<Button
large
on:click={submit}
color={Color.accent}
color="primary"
size="lg"
class="w-full"
{loading}
disabled={loading}
>
Submit
</Button>
@@ -17,6 +17,7 @@
if (isParent && $page.url.hash) {
document.getElementById($page.url.hash)?.scrollIntoView({
behavior: 'smooth',
block: 'center',
})
}
})
@@ -80,7 +81,7 @@
disabled={loadingChildren}
on:click={() => fetchChildren(node)}
>
<Icon src={ChevronDown} width={16} mini />
<Icon src={ChevronDown} width={16} mini slot="icon" />
{node.comment_view.counts.child_count} more
</Button>
</div>