i18n: localize inbox
This commit is contained in:
1 parent
4441896134
commit
92c57db80b
4 files changed
+28
-17
No files matched your search
@@ -1,3 +1,3 @@
|
|||||||
<h1 class="text-3xl font-bold flex items-center gap-2">
|
<h1 class="text-3xl font-bold flex items-center gap-2 {$$props.class ?? ''}">
|
||||||
<slot />
|
<slot />
|
||||||
</h1>
|
</h1>
|
||||||
@@ -90,7 +90,13 @@
|
|||||||
"legacy": "Legacy"
|
"legacy": "Legacy"
|
||||||
},
|
},
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"filter": "Filter"
|
"filter": "Filter",
|
||||||
|
"unread": "Unread",
|
||||||
|
"inbox": {
|
||||||
|
"messages": "Messages",
|
||||||
|
"replies": "Replies",
|
||||||
|
"mentions": "Mentions"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
@@ -226,6 +232,7 @@
|
|||||||
"back": "Back",
|
"back": "Back",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"debug": "Debug",
|
"debug": "Debug",
|
||||||
"refresh": "Refresh"
|
"refresh": "Refresh",
|
||||||
|
"jump": "Jump"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
import { searchParam } from '$lib/util.js'
|
import { searchParam } from '$lib/util.js'
|
||||||
import { Button, Select } from 'mono-svelte'
|
import { Button, Select } from 'mono-svelte'
|
||||||
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
||||||
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -51,11 +53,11 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<h1 class="font-bold text-3xl mr-auto">Inbox</h1>
|
<Header class="mr-auto">{$t('routes.inbox.title')}</Header>
|
||||||
<Button
|
<Button
|
||||||
on:click={() => goto($page.url, { invalidateAll: true })}
|
on:click={() => goto($page.url, { invalidateAll: true })}
|
||||||
size="square-md"
|
size="square-md"
|
||||||
title="Refresh"
|
title={$t('common.refresh')}
|
||||||
>
|
>
|
||||||
<Icon src={ArrowPath} size="16" mini slot="prefix" />
|
<Icon src={ArrowPath} size="16" mini slot="prefix" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -67,7 +69,7 @@
|
|||||||
class="!h-8"
|
class="!h-8"
|
||||||
>
|
>
|
||||||
<Icon src={Check} width={16} mini slot="prefix" />
|
<Icon src={Check} width={16} mini slot="prefix" />
|
||||||
Mark All Read
|
{$t('routes.inbox.markAsRead')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4" />
|
<div class="mt-4" />
|
||||||
@@ -84,10 +86,10 @@
|
|||||||
>
|
>
|
||||||
<span slot="label" class="flex items-center gap-1">
|
<span slot="label" class="flex items-center gap-1">
|
||||||
<Icon src={Funnel} size="15" mini />
|
<Icon src={Funnel} size="15" mini />
|
||||||
Filter
|
{$t('filter.filter')}
|
||||||
</span>
|
</span>
|
||||||
<option value="false">All</option>
|
<option value="false">{$t('filter.location.all')}</option>
|
||||||
<option value="true">Unread</option>
|
<option value="true">{$t('filter.unread')}</option>
|
||||||
</Select>
|
</Select>
|
||||||
<Select
|
<Select
|
||||||
bind:value={data.type}
|
bind:value={data.type}
|
||||||
@@ -95,20 +97,20 @@
|
|||||||
>
|
>
|
||||||
<span slot="label" class="flex items-center gap-1">
|
<span slot="label" class="flex items-center gap-1">
|
||||||
<Icon src={AdjustmentsHorizontal} size="15" mini />
|
<Icon src={AdjustmentsHorizontal} size="15" mini />
|
||||||
Type
|
{$t('filter.type')}
|
||||||
</span>
|
</span>
|
||||||
<option value="all">All</option>
|
<option value="all">{$t('filter.location.all')}</option>
|
||||||
<option value="mentions">Mentions</option>
|
<option value="mentions">{$t('filter.inbox.mentions')}</option>
|
||||||
<option value="replies">Replies</option>
|
<option value="replies">{$t('filter.inbox.replies')}</option>
|
||||||
<option value="messages">Messages</option>
|
<option value="messages">{$t('filter.inbox.messages')}</option>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-4 list-none my-4 flex-1 h-full">
|
<div class="flex flex-col gap-4 list-none my-4 flex-1 h-full">
|
||||||
{#if !data.data || (data.data?.length ?? 0) == 0}
|
{#if !data.data || (data.data?.length ?? 0) == 0}
|
||||||
<Placeholder
|
<Placeholder
|
||||||
icon={Inbox}
|
icon={Inbox}
|
||||||
title="No new notifications"
|
title={$t('routes.inbox.empty.title')}
|
||||||
description="Messages, replies, and mentions will appear here."
|
description={$t('routes.inbox.empty.description')}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
{#each data.data as item}
|
{#each data.data as item}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
import type { InboxItem } from '$lib/lemmy/inbox.js'
|
import type { InboxItem } from '$lib/lemmy/inbox.js'
|
||||||
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
|
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
|
||||||
import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte'
|
import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
export let item: InboxItem
|
export let item: InboxItem
|
||||||
|
|
||||||
@@ -104,6 +105,7 @@
|
|||||||
{loading}
|
{loading}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
on:click={() => markAsRead(!item.read)}
|
on:click={() => markAsRead(!item.read)}
|
||||||
|
title={$t('post.actions.more.markRead')}
|
||||||
>
|
>
|
||||||
<Icon slot="prefix" src={Check} mini size="16" />
|
<Icon slot="prefix" src={Check} mini size="16" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -117,7 +119,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<Button
|
<Button
|
||||||
title="Jump"
|
title={$t('common.jump')}
|
||||||
href="/comment/{item.item.comment.id}"
|
href="/comment/{item.item.comment.id}"
|
||||||
size="square-md"
|
size="square-md"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user