feat: add instance community browsing
This commit is contained in:
5 files changed
+54
-14
No files matched your search
@@ -26,6 +26,7 @@
|
||||
selected = $bindable(),
|
||||
navigate = true,
|
||||
showLabel = true,
|
||||
children,
|
||||
...rest
|
||||
}: Props = $props()
|
||||
</script>
|
||||
@@ -63,4 +64,5 @@
|
||||
>
|
||||
{$t('filter.location.moderator')}
|
||||
</Option>
|
||||
{@render children?.()}
|
||||
</Select>
|
||||
@@ -14,7 +14,8 @@
|
||||
value: optionElement?.value ?? '',
|
||||
label: optionElement?.innerText?.trim() ?? '',
|
||||
icon: icon,
|
||||
disabled: false,
|
||||
disabled: optionElement?.disabled,
|
||||
isLabel: optionElement?.getAttribute('data-label') != null,
|
||||
})
|
||||
|
||||
interface SelectContext {
|
||||
@@ -22,7 +23,8 @@
|
||||
value: string
|
||||
label: string
|
||||
icon?: IconSource
|
||||
disabled: boolean
|
||||
disabled?: boolean
|
||||
isLabel?: boolean
|
||||
}[]
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
label: string
|
||||
icon?: IconSource
|
||||
disabled?: boolean
|
||||
isLabel?: boolean
|
||||
}[]
|
||||
}
|
||||
|
||||
@@ -141,10 +142,14 @@
|
||||
}}
|
||||
size="custom"
|
||||
disabled={option.disabled}
|
||||
color="none"
|
||||
class={[
|
||||
'min-h-0! py-[5px]!',
|
||||
'min-h-0! py-[5px]! hover:bg-slate-100 dark:hover:bg-zinc-800',
|
||||
option.value == value &&
|
||||
'bg-slate-100! dark:bg-zinc-800! text-primary-900 dark:text-primary-100 font-medium!',
|
||||
'bg-slate-100 dark:bg-zinc-800 text-primary-900 dark:text-primary-100 font-medium',
|
||||
option.disabled &&
|
||||
'pointer-events-none text-slate-600 dark:text-zinc-400',
|
||||
option.isLabel && 'text-xs mt-2',
|
||||
]}
|
||||
>
|
||||
{#if option.value == value}
|
||||
|
||||
Reference in new issue
Block a user