design: redesign blocked pages to not look like buns
This commit is contained in:
16 files changed
+336
-271
No files matched your search
@@ -1,19 +1,25 @@
|
||||
<script lang="ts">
|
||||
import { Button } from 'mono-svelte'
|
||||
import type { Snippet } from 'svelte'
|
||||
import { CommonList } from '../layout'
|
||||
import Avatar from './Avatar.svelte'
|
||||
|
||||
interface Props {
|
||||
items: {
|
||||
avatar?: string
|
||||
name: string
|
||||
instance?: string
|
||||
id: number
|
||||
url: string
|
||||
}[]
|
||||
type Item = {
|
||||
avatar?: string
|
||||
name: string
|
||||
instance?: string
|
||||
id: number
|
||||
url?: string
|
||||
circle?: boolean
|
||||
}
|
||||
|
||||
let { items }: Props = $props()
|
||||
interface Props {
|
||||
items: Item[]
|
||||
link?: boolean
|
||||
action?: Snippet<[Item]>
|
||||
}
|
||||
|
||||
let { items, link, action }: Props = $props()
|
||||
</script>
|
||||
|
||||
<CommonList animate={false} class="px-1 py-0.5" size="xs" {items}>
|
||||
@@ -23,7 +29,7 @@
|
||||
gap="lg"
|
||||
color="none"
|
||||
alignment="left"
|
||||
href={item.url}
|
||||
href={link ? item.url : undefined}
|
||||
>
|
||||
<div class="flex-none">
|
||||
<Avatar
|
||||
@@ -31,7 +37,7 @@
|
||||
alt={item.name}
|
||||
title={item.name}
|
||||
width={24}
|
||||
circle={false}
|
||||
circle={item.circle ?? false}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col max-w-full break-words">
|
||||
@@ -42,6 +48,10 @@
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{#if action}
|
||||
<div class="flex-1"></div>
|
||||
{@render action(item)}
|
||||
{/if}
|
||||
</Button>
|
||||
{/snippet}
|
||||
</CommonList>
|
||||
Reference in new issue
Block a user