+17
-22
src/components/BskyPost.svelte
+17
-22
src/components/BskyPost.svelte
···
324
onClick,
325
isFull,
326
hasSolid,
327
-
canBeDisabled = true
328
}: {
329
name: string;
330
icon: string;
···
332
isFull?: boolean;
333
hasSolid?: boolean;
334
canBeDisabled?: boolean;
335
})}
336
<button
337
class="
338
-
px-2 py-1.5 text-(--nucleus-fg)/90 transition-all
339
duration-100 not-disabled:hover:[backdrop-filter:brightness(120%)]
340
disabled:cursor-not-allowed!
341
"
342
onclick={(e) => onClick(e)}
343
-
style="color: {isFull ? color : 'color-mix(in srgb, var(--nucleus-fg) 90%, transparent)'}"
344
title={name}
345
disabled={canBeDisabled ? selectedDid === null : false}
346
>
···
410
{/if}
411
412
{#snippet trigger()}
413
-
<div
414
-
class="
415
-
w-fit items-center rounded-sm transition-opacity
416
-
duration-100 ease-in-out group-hover:opacity-100
417
-
{!actionsOpen && !Device.isMobile ? 'opacity-0' : ''}
418
-
"
419
-
style="background: {color}1f;"
420
-
>
421
-
{@render control({
422
-
name: 'actions',
423
-
icon: 'heroicons:ellipsis-horizontal-16-solid',
424
-
onClick: (e: MouseEvent) => {
425
-
e.stopPropagation();
426
-
actionsOpen = !actionsOpen;
427
-
actionsPos = { x: 0, y: 0 };
428
-
},
429
-
canBeDisabled: false
430
-
})}
431
-
</div>
432
{/snippet}
433
</Dropdown>
434
</div>
···
324
onClick,
325
isFull,
326
hasSolid,
327
+
canBeDisabled = true,
328
+
iconColor = color
329
}: {
330
name: string;
331
icon: string;
···
333
isFull?: boolean;
334
hasSolid?: boolean;
335
canBeDisabled?: boolean;
336
+
iconColor?: string;
337
})}
338
<button
339
class="
340
+
px-1.75 py-1.5 text-(--nucleus-fg)/90 transition-all
341
duration-100 not-disabled:hover:[backdrop-filter:brightness(120%)]
342
disabled:cursor-not-allowed!
343
"
344
onclick={(e) => onClick(e)}
345
+
style="color: {isFull ? iconColor : 'color-mix(in srgb, var(--nucleus-fg) 90%, transparent)'}"
346
title={name}
347
disabled={canBeDisabled ? selectedDid === null : false}
348
>
···
412
{/if}
413
414
{#snippet trigger()}
415
+
{@render control({
416
+
name: 'actions',
417
+
icon: 'heroicons:ellipsis-horizontal-16-solid',
418
+
onClick: (e: MouseEvent) => {
419
+
e.stopPropagation();
420
+
actionsOpen = !actionsOpen;
421
+
actionsPos = { x: 0, y: 0 };
422
+
},
423
+
canBeDisabled: false,
424
+
isFull: true,
425
+
iconColor: 'color-mix(in srgb, var(--nucleus-fg) 70%, transparent)'
426
+
})}
427
{/snippet}
428
</Dropdown>
429
</div>