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