design: update header button design
This commit is contained in:
7 files changed
+36
-71
No files matched your search
@@ -37,7 +37,7 @@
|
|||||||
{...rest}
|
{...rest}
|
||||||
{href}
|
{href}
|
||||||
class="{highlight
|
class="{highlight
|
||||||
? 'text-blue-500'
|
? 'text-sky-500'
|
||||||
: ''} hover:underline max-w-full inline-flex items-center gap-1 {clazz}"
|
: ''} hover:underline max-w-full inline-flex items-center gap-1 {clazz}"
|
||||||
>
|
>
|
||||||
{@render icon?.()}
|
{@render icon?.()}
|
||||||
|
|||||||
@@ -46,17 +46,8 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<Entity name={site.site.name} label={new URL(site.site.actor_id).hostname}>
|
<Avatar width={32} url={site.site.icon} alt="" circle={false} />
|
||||||
{#snippet customIcon()}
|
<h2 class="font-medium text-lg -my-2">{site.site.name}</h2>
|
||||||
<Avatar
|
|
||||||
width={32}
|
|
||||||
url={site.site.icon}
|
|
||||||
alt={site.site.name}
|
|
||||||
circle={false}
|
|
||||||
/>
|
|
||||||
{/snippet}
|
|
||||||
</Entity>
|
|
||||||
|
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
{#if taglines && taglines.length > 0}
|
{#if taglines && taglines.length > 0}
|
||||||
<Markdown
|
<Markdown
|
||||||
@@ -78,6 +69,15 @@
|
|||||||
<Markdown source={site.site.description} />
|
<Markdown source={site.site.description} />
|
||||||
<div class="my-4"></div>
|
<div class="my-4"></div>
|
||||||
<Markdown source={site.site.sidebar} />
|
<Markdown source={site.site.sidebar} />
|
||||||
|
|
||||||
|
{#if version}
|
||||||
|
<div class="w-max">
|
||||||
|
<Badge label="Lemmy version">
|
||||||
|
<Icon src={ServerStack} micro size="14" />
|
||||||
|
{version}
|
||||||
|
</Badge>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
</Expandable>
|
</Expandable>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-row flex-wrap gap-1">
|
<div class="flex flex-row flex-wrap gap-1 my-2 text-xs">
|
||||||
<Link highlight href="/modlog">
|
<Link highlight href="/modlog">
|
||||||
{$t('routes.modlog.title')}
|
{$t('routes.modlog.title')}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -145,14 +145,5 @@
|
|||||||
{$t('routes.instances')}
|
{$t('routes.instances')}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if version}
|
|
||||||
<div class="w-max">
|
|
||||||
<Badge label="Lemmy version">
|
|
||||||
<Icon src={ServerStack} micro size="14" />
|
|
||||||
{version}
|
|
||||||
</Badge>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</StickyCard>
|
</StickyCard>
|
||||||
@@ -126,14 +126,14 @@
|
|||||||
<Button
|
<Button
|
||||||
disabled={subscribing}
|
disabled={subscribing}
|
||||||
loading={subscribing}
|
loading={subscribing}
|
||||||
size="lg"
|
|
||||||
color={subscribed == 'NotSubscribed' ? 'primary' : 'secondary'}
|
color={subscribed == 'NotSubscribed' ? 'primary' : 'secondary'}
|
||||||
onclick={async () => {
|
onclick={async () => {
|
||||||
subscribed =
|
subscribed =
|
||||||
(await subscribe())?.community_view.subscribed ??
|
(await subscribe())?.community_view.subscribed ??
|
||||||
'NotSubscribed'
|
'NotSubscribed'
|
||||||
}}
|
}}
|
||||||
class="relative px-8 z-[inherit]"
|
class="relative z-[inherit]"
|
||||||
|
rounding="pill"
|
||||||
>
|
>
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon
|
<Icon
|
||||||
@@ -154,21 +154,21 @@
|
|||||||
.map(c => c.community.id)
|
.map(c => c.community.id)
|
||||||
.includes(community.id)}
|
.includes(community.id)}
|
||||||
<Button
|
<Button
|
||||||
size="square-lg"
|
|
||||||
color="secondary"
|
color="secondary"
|
||||||
rounding="xl"
|
size="custom"
|
||||||
|
rounding="pill"
|
||||||
|
class="h-9 aspect-square"
|
||||||
href="/c/{fullCommunityName(
|
href="/c/{fullCommunityName(
|
||||||
community.name,
|
community.name,
|
||||||
community.actor_id,
|
community.actor_id,
|
||||||
)}/settings"
|
)}/settings"
|
||||||
style="height: 38px; width: 38px;"
|
|
||||||
>
|
>
|
||||||
<Icon src={Cog6Tooth} size="16" mini />
|
<Icon src={Cog6Tooth} size="16" mini />
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Menu placement="top-end">
|
<Menu placement="top-end">
|
||||||
{#snippet target()}
|
{#snippet target()}
|
||||||
<Button rounding="xl" size="custom" style="height: 38px; width: 38px;">
|
<Button size="custom" rounding="pill" class="h-8.5 aspect-square">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={EllipsisHorizontal} size="16" mini />
|
<Icon src={EllipsisHorizontal} size="16" mini />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|||||||
@@ -97,34 +97,7 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if profileData.profiles.length == 0}
|
<div class="flex flex-col h-full gap-4">
|
||||||
<div class="h-max flex items-center justify-center my-auto">
|
|
||||||
<div
|
|
||||||
class="flex flex-col justify-center items-center py-8 gap-4
|
|
||||||
my-auto"
|
|
||||||
>
|
|
||||||
<div class="flex flex-col items-center">
|
|
||||||
<Icon src={ArrowLeftOnRectangle} size="48" solid />
|
|
||||||
<h1 class="font-bold text-3xl">No accounts</h1>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-row items-center gap-2">
|
|
||||||
<Button href="/accounts/login" size="lg">
|
|
||||||
{#snippet prefix()}
|
|
||||||
<Icon src={ArrowLeftOnRectangle} size="16" micro />
|
|
||||||
{/snippet}
|
|
||||||
Log in
|
|
||||||
</Button>
|
|
||||||
<Button href="/signup" size="lg">
|
|
||||||
{#snippet prefix()}
|
|
||||||
<Icon src={Identification} size="16" micro />
|
|
||||||
{/snippet}
|
|
||||||
Sign up
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{:else}
|
|
||||||
<div class="flex flex-col h-full gap-4">
|
|
||||||
<Header pageHeader>
|
<Header pageHeader>
|
||||||
{$t('routes.accounts')}
|
{$t('routes.accounts')}
|
||||||
{#snippet extended()}
|
{#snippet extended()}
|
||||||
@@ -132,8 +105,8 @@
|
|||||||
<div class="flex gap-2 mr-auto">
|
<div class="flex gap-2 mr-auto">
|
||||||
<Button
|
<Button
|
||||||
href="/accounts/login"
|
href="/accounts/login"
|
||||||
size="lg"
|
rounding="pill"
|
||||||
class="flex-1 px-8"
|
class="px-4"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
@@ -142,7 +115,7 @@
|
|||||||
{$t('account.login')}
|
{$t('account.login')}
|
||||||
</Button>
|
</Button>
|
||||||
{#if !LINKED_INSTANCE_URL}
|
{#if !LINKED_INSTANCE_URL}
|
||||||
<Button href="/accounts/login/guest" size="lg">
|
<Button href="/accounts/login/guest" rounding="pill">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={Plus} size="16" micro />
|
<Icon src={Plus} size="16" micro />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
@@ -258,5 +231,4 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
@@ -116,12 +116,13 @@ items-center px-2 w-max top-6 lg:top-22"
|
|||||||
<Header pageHeader class="lg:flex-row justify-between flex-col">
|
<Header pageHeader class="lg:flex-row justify-between flex-col">
|
||||||
{$t('routes.inbox.title')}
|
{$t('routes.inbox.title')}
|
||||||
|
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2 tracking-normal">
|
||||||
<Button
|
<Button
|
||||||
onclick={() => goto(page.url, { invalidateAll: true })}
|
onclick={() => goto(page.url, { invalidateAll: true })}
|
||||||
size="square-lg"
|
size="custom"
|
||||||
rounding="xl"
|
class="rounded-2xl h-9 aspect-square"
|
||||||
title={$t('common.refresh')}
|
rounding="none"
|
||||||
|
aria-label={$t('common.refresh')}
|
||||||
>
|
>
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={ArrowPath} size="16" mini />
|
<Icon src={ArrowPath} size="16" mini />
|
||||||
@@ -130,9 +131,9 @@ items-center px-2 w-max top-6 lg:top-22"
|
|||||||
<Button
|
<Button
|
||||||
onclick={markAllAsRead}
|
onclick={markAllAsRead}
|
||||||
loading={markingAsRead}
|
loading={markingAsRead}
|
||||||
disabled={markingAsRead}
|
disabled={markingAsRead || data.inbox.value.length == 0}
|
||||||
size="lg"
|
rounding="pill"
|
||||||
class="h-10"
|
color="primary"
|
||||||
>
|
>
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={Check} width={16} mini />
|
<Icon src={Check} width={16} mini />
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
{#snippet startChat()}
|
{#snippet startChat()}
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
size="lg"
|
rounding="pill"
|
||||||
onclick={() => (searchModal.open = !searchModal.open)}
|
onclick={() => (searchModal.open = !searchModal.open)}
|
||||||
>
|
>
|
||||||
<Icon src={ChatBubbleOvalLeftEllipsis} size="18" mini />
|
<Icon src={ChatBubbleOvalLeftEllipsis} size="18" mini />
|
||||||
|
|||||||
@@ -91,10 +91,11 @@
|
|||||||
</Select>
|
</Select>
|
||||||
<Button
|
<Button
|
||||||
loading={batch.progress >= 0}
|
loading={batch.progress >= 0}
|
||||||
disabled={batch.progress >= 0}
|
disabled={batch.progress >= 0 || data.items.value?.length == 0}
|
||||||
onclick={markAllAsResolved}
|
onclick={markAllAsResolved}
|
||||||
class="h-max ml-auto"
|
class="h-max ml-auto"
|
||||||
rounding="xl"
|
rounding="pill"
|
||||||
|
color="primary"
|
||||||
>
|
>
|
||||||
<Icon src={Check} size="16" mini />
|
<Icon src={Check} size="16" mini />
|
||||||
{$t('routes.moderation.markAll')}
|
{$t('routes.moderation.markAll')}
|
||||||
|
|||||||
Reference in new issue
Block a user