impr: add inert property to disclosures for closed
This commit is contained in:
4 files changed
+20
-11
No files matched your search
@@ -165,7 +165,7 @@
|
||||
{#if node.comment_view.creator_is_moderator}
|
||||
<Icon
|
||||
src={ShieldCheck}
|
||||
size="14"
|
||||
size="16"
|
||||
micro
|
||||
class="text-green-500"
|
||||
aria-label={$t('class.moderator')}
|
||||
@@ -242,12 +242,12 @@
|
||||
</label>
|
||||
{/if}
|
||||
<input
|
||||
class="hidden comment-expand"
|
||||
class="appearance-none absolute inset-0 pointer-events-none comment-expand"
|
||||
type="checkbox"
|
||||
id="comment-expand-{node.comment_view.comment.id}"
|
||||
bind:checked={open}
|
||||
/>
|
||||
<div class={['expand max-w-full', contentClass]}>
|
||||
<div class={['expand max-w-full', contentClass]} inert={!open}>
|
||||
<div id="comment-content">
|
||||
<div
|
||||
class={[
|
||||
|
||||
@@ -22,13 +22,18 @@
|
||||
const id = $props.id()
|
||||
</script>
|
||||
|
||||
<div {...rest} class={['w-full', clazz]}>
|
||||
<div {...rest} class={['w-full relative', clazz]}>
|
||||
<label for={id} class="w-full">
|
||||
{@render summary?.({ open })}
|
||||
</label>
|
||||
{@render extended?.()}
|
||||
<input {id} class="hidden input" type="checkbox" bind:checked={open} />
|
||||
<div class="expand">
|
||||
<input
|
||||
{id}
|
||||
class="appearance-none absolute w-full h-full inset-0 pointer-events-none"
|
||||
type="checkbox"
|
||||
bind:checked={open}
|
||||
/>
|
||||
<div class="expand" inert={!open}>
|
||||
{@render children?.({ open })}
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,7 +47,7 @@
|
||||
transition: grid-template-rows 0.5s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
}
|
||||
|
||||
.input:checked + .expand {
|
||||
input:checked + .expand {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
>
|
||||
<div
|
||||
bind:this={el}
|
||||
use:trapFocus
|
||||
use:trapFocus={true}
|
||||
transition:scale|global={{
|
||||
start: 0.97,
|
||||
easing: backOut,
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
</script>
|
||||
|
||||
{#snippet itemInfo()}
|
||||
<Button color="primary" rounding="pill" class="w-max" href={item.link}>
|
||||
{$t('common.jump')}
|
||||
</Button>
|
||||
{#if item.link}
|
||||
<Button color="primary" rounding="pill" class="w-max" href={item.link}>
|
||||
{$t('common.jump')}
|
||||
</Button>
|
||||
{/if}
|
||||
{#if item.moderatee}
|
||||
<UserLink avatar user={item.moderatee} />
|
||||
{/if}
|
||||
@@ -71,6 +73,8 @@
|
||||
>
|
||||
{$t('common.info')}
|
||||
</Button>
|
||||
{:else if item.moderatee}
|
||||
<UserLink user={item.moderatee} />
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
Reference in new issue
Block a user