misc: redesign placeholders
This commit is contained in:
5 files changed
+17
-15
No files matched your search
@@ -5,7 +5,7 @@
|
|||||||
import { backOut } from 'svelte/easing'
|
import { backOut } from 'svelte/easing'
|
||||||
import { fly } from 'svelte/transition'
|
import { fly } from 'svelte/transition'
|
||||||
import { page as pageData } from '$app/state'
|
import { page as pageData } from '$app/state'
|
||||||
import { invalidate, invalidateAll } from '$app/navigation'
|
import { invalidate } from '$app/navigation'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
page?: number
|
page?: number
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
current.delete(Array.from(newParams.keys())[0])
|
current.delete(Array.from(newParams.keys())[0])
|
||||||
current.append(
|
current.append(
|
||||||
Array.from(newParams.keys())[0][0],
|
Array.from(newParams.entries())[0][0],
|
||||||
Array.from(newParams.keys())[0][1],
|
Array.from(newParams.entries())[0][1],
|
||||||
)
|
)
|
||||||
|
|
||||||
return `?${current.toString()}`
|
return `?${current.toString()}`
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<Button
|
<Button
|
||||||
href={customHref(href?.(cursor?.back ?? page - 1))}
|
href={customHref(href?.(cursor?.back ?? page - 1))}
|
||||||
color="ghost"
|
color="ghost"
|
||||||
onclick={() => invalidateAll()}
|
onclick={() => invalidate(pageData.url)}
|
||||||
title={$t('common.back')}
|
title={$t('common.back')}
|
||||||
size="square-md"
|
size="square-md"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<Button
|
<Button
|
||||||
href={customHref(href?.(cursor?.next ?? page + 1))}
|
href={customHref(href?.(cursor?.next ?? page + 1))}
|
||||||
color="ghost"
|
color="ghost"
|
||||||
onclick={() => invalidateAll()}
|
onclick={() => invalidate(pageData.url)}
|
||||||
title={$t('common.next')}
|
title={$t('common.next')}
|
||||||
size="square-md"
|
size="square-md"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
|
|||||||
@@ -23,22 +23,22 @@
|
|||||||
<div
|
<div
|
||||||
class="text-slate-700 dark:text-zinc-300 flex flex-col w-max mx-auto items-center gap-4 {clazz}"
|
class="text-slate-700 dark:text-zinc-300 flex flex-col w-max mx-auto items-center gap-4 {clazz}"
|
||||||
>
|
>
|
||||||
<div class="flex flex-row gap-4 items-center max-w-sm">
|
<div class="flex flex-col gap-2 items-center max-w-sm">
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<div
|
<div class="bg-slate-100 dark:bg-zinc-950 p-3 rounded-full">
|
||||||
class="border border-slate-200 dark:border-zinc-800 dark:bg-zinc-900 p-3 rounded-full"
|
<Icon src={icon} size="28" solid />
|
||||||
>
|
|
||||||
<Icon src={icon} size="28" />
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class={clazz}>
|
<div class={clazz}>
|
||||||
<h1 class="text-slate-900 dark:text-zinc-100 text-lg font-medium">
|
<h1
|
||||||
|
class="text-slate-900 dark:text-zinc-100 text-base font-medium text-center"
|
||||||
|
>
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
</h1>
|
||||||
{#if description}
|
{#if description}
|
||||||
<p class="text-sm {center ? 'text-center' : 'text-left'} font-normal">
|
<!-- <p class="text-sm text-center font-normal">
|
||||||
{description}
|
{description}
|
||||||
</p>
|
</p> -->
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -255,7 +255,7 @@
|
|||||||
"federating": "Federating",
|
"federating": "Federating",
|
||||||
"query": "Query",
|
"query": "Query",
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": "No Results",
|
"title": "No results",
|
||||||
"description": "There are no results that match that filter. Try refining your search.",
|
"description": "There are no results that match that filter. Try refining your search.",
|
||||||
"alt": "Search across the fediverse"
|
"alt": "Search across the fediverse"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ items-center px-2 w-max"
|
|||||||
icon={Inbox}
|
icon={Inbox}
|
||||||
title={$t('routes.inbox.empty.title')}
|
title={$t('routes.inbox.empty.title')}
|
||||||
description={$t('routes.inbox.empty.description')}
|
description={$t('routes.inbox.empty.description')}
|
||||||
|
class="self-center justify-self-center my-auto"
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
{#each inbox as item, index (item.id)}
|
{#each inbox as item, index (item.id)}
|
||||||
|
|||||||
@@ -145,14 +145,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if !data.results}
|
{#if !data.results}
|
||||||
|
<div class="my-auto">
|
||||||
<Placeholder
|
<Placeholder
|
||||||
icon={MagnifyingGlass}
|
icon={MagnifyingGlass}
|
||||||
title={$t('routes.search.noResults.title')}
|
title={$t('routes.search.noResults.title')}
|
||||||
description={query == ''
|
description={query == ''
|
||||||
? $t('routes.search.noResults.alt')
|
? $t('routes.search.noResults.alt')
|
||||||
: $t('routes.search.noResults.description')}
|
: $t('routes.search.noResults.description')}
|
||||||
class="pt-4"
|
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
{#await data.streamed.object}
|
{#await data.streamed.object}
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in new issue
Block a user