impr: fixes for fonts, cleanup dead features (#563)
* cleanup: use tailwindcss classes * design: de-emphasize unimportant terms in InboxItem * fix: button shadow appearing in situations it shouldnt * cleanup: remove tag rules * fix: fonts not applying correctly * fix: uncentered settings
This commit is contained in:
1 parent
a7159b0526
commit
472b4b9190
15 files changed
+59
-127
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { notifications, profile } from '$lib/auth.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
import { getClient } from '$lib/lemmy.svelte.js'
|
||||
import {
|
||||
@@ -57,6 +57,14 @@ export async function load({ url, fetch }) {
|
||||
publishedToDate(a.published).getTime(),
|
||||
)
|
||||
|
||||
const totalNotifs = data.filter(i => !i.read).length
|
||||
|
||||
notifications.update(i => ({
|
||||
applications: i.applications,
|
||||
reports: i.reports,
|
||||
inbox: totalNotifs,
|
||||
}))
|
||||
|
||||
return {
|
||||
unreadOnly: unreadOnly,
|
||||
type: type,
|
||||
|
||||
@@ -72,24 +72,24 @@
|
||||
alt={item.creator.name}
|
||||
/>
|
||||
<div class="flex flex-col">
|
||||
<div class="text-sm font-normal">
|
||||
<div class="text-sm font-normal text-slate-600 dark:text-zinc-400">
|
||||
{#if item.type == 'comment_reply'}
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html $t('routes.inbox.item.reply', {
|
||||
user: `<span class="font-medium">${item.creator.name}</span>`,
|
||||
post: `<span class="font-medium">${escapeHtml(item.item.post.name)}</span>`,
|
||||
user: `<strong>${item.creator.name}</strong>`,
|
||||
post: `<strong>${escapeHtml(item.item.post.name)}</strong>`,
|
||||
})}
|
||||
{:else if item.type == 'person_mention'}
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html $t('routes.inbox.item.mention', {
|
||||
user: `<span class="font-medium">${item.creator.name}</span>`,
|
||||
post: `<span class="font-medium">${escapeHtml(item.item.post.name)}</span>`,
|
||||
user: `<strong>${item.creator.name}</strong>`,
|
||||
post: `<strong>${escapeHtml(item.item.post.name)}</strong>`,
|
||||
})}
|
||||
{:else if item.type == 'private_message'}
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html $t('routes.inbox.item.message', {
|
||||
user: `<span class="font-medium">${item.item.creator.name}</span>`,
|
||||
recipient: `<span class="font-medium">${item.item.recipient.name}</span>`,
|
||||
user: `<strong>${item.item.creator.name}</strong>`,
|
||||
recipient: `<strong>${item.item.recipient.name}</strong>`,
|
||||
})}
|
||||
{/if}
|
||||
</div>
|
||||
@@ -167,13 +167,23 @@
|
||||
<CommentItem
|
||||
comment={item.item}
|
||||
community={false}
|
||||
view="cozy"
|
||||
meta={false}
|
||||
commentClass="pt-0! pb-0"
|
||||
class="pt-0"
|
||||
class="py-0!"
|
||||
commentClass="py-0!"
|
||||
/>
|
||||
{:else}
|
||||
<PrivateMessage message={item.item} meta={false} />
|
||||
{/if}
|
||||
{/snippet}
|
||||
</Expandable>
|
||||
|
||||
<style>
|
||||
:global(strong) {
|
||||
font-weight: 600;
|
||||
color: var(--color-primary-900);
|
||||
}
|
||||
|
||||
:global(.dark strong) {
|
||||
color: var(--color-primary-100);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user