Enhance upload functionality with genre selection and validation; refactor session cookie handling
CI/CD / WebPlayer (push) Successful in 39s
CI/CD / Deploy (push) Canceled after 0s
CI/CD / BackEnd (push) Canceled after 39s

This commit is contained in:
2026-09-23 18:33:21 +02:00
parent 5efd59826b
commit a7929c0ac9
11 changed files with 200 additions and 23 deletions
@@ -3,20 +3,21 @@
interface Props {
selected?: boolean;
disabled?: boolean;
count?: number;
href?: string;
onclick?: () => void;
children: Snippet;
}
let { selected = false, count, href, onclick, children }: Props = $props();
let { selected = false, disabled = false, count, href, onclick, children }: Props = $props();
const classes = $derived(
href
? 'rounded-full border border-line-strong px-3.5 py-2 text-xs text-fg-2 transition-colors hover:bg-hover hover:text-fg'
: `flex items-center gap-2 rounded-full px-3.5 py-2 text-xs font-medium transition ${
selected ? 'bg-cta-strong text-ink' : 'bg-btn text-fg-2 hover:bg-btn-hover hover:text-fg'
}`
} ${disabled ? 'cursor-not-allowed opacity-40' : ''}`
);
</script>
@@ -30,5 +31,5 @@
{#if href}
<a {href} class={classes}>{@render content()}</a>
{:else}
<button type="button" {onclick} class={classes}>{@render content()}</button>
<button type="button" {onclick} {disabled} class={classes}>{@render content()}</button>
{/if}