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
@@ -11,7 +11,7 @@
|
||||
</script>
|
||||
|
||||
<Header pageHeader>{$t('routes.profile.media.title')}</Header>
|
||||
<div class="media-grid">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each data.images as image (image.local_image.pictrs_delete_token)}
|
||||
<div animate:flip={{ duration: 500, easing: expoInOut }}>
|
||||
<PictrsImage
|
||||
@@ -37,25 +37,3 @@
|
||||
href={page => `?page=${page}`}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -11,7 +11,7 @@
|
||||
</script>
|
||||
|
||||
<Header pageHeader>{$t('routes.admin.media.title')}</Header>
|
||||
<div class="media-grid">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each data.images as image (image.local_image.pictrs_delete_token)}
|
||||
<div animate:flip={{ duration: 500, easing: expoInOut }}>
|
||||
<PictrsImage
|
||||
@@ -36,25 +36,3 @@
|
||||
href={page => `?page=${page}`}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -434,35 +434,11 @@
|
||||
title={$t('settings.app.duplicateTitles.title')}
|
||||
description={$t('settings.app.duplicateTitles.description')}
|
||||
/>
|
||||
<div>
|
||||
<ToggleSetting
|
||||
title={$t('settings.app.titleTags.title')}
|
||||
description={$t('settings.app.titleTags.description')}
|
||||
bind:checked={settings.parseTags}
|
||||
/>
|
||||
<Setting>
|
||||
{#snippet title()}
|
||||
{$t('settings.app.titleTags.rules.title')}
|
||||
{/snippet}
|
||||
<div
|
||||
class="flex flex-col divide-y *:py-2 items-end divide-slate-200 dark:divide-zinc-800"
|
||||
>
|
||||
{#each Object.keys(settings.tagRules) as rule (rule)}
|
||||
<div class="flex flex-row flex-wrap items-center gap-2">
|
||||
<span class="text-lg font-medium">{rule}</span>
|
||||
<MultiSelect
|
||||
bind:selected={settings.tagRules[rule]}
|
||||
options={['blur-sm', 'hide']}
|
||||
optionNames={[
|
||||
$t('settings.app.titleTags.rules.blur-sm'),
|
||||
$t('settings.app.titleTags.rules.hide'),
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</Setting>
|
||||
</div>
|
||||
<ToggleSetting
|
||||
title={$t('settings.app.titleTags.title')}
|
||||
description={$t('settings.app.titleTags.description')}
|
||||
bind:checked={settings.parseTags}
|
||||
/>
|
||||
</Section>
|
||||
|
||||
<Section id="embeds" title={$t('settings.embeds.title')}>
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
class="flex flex-col @md/setting:flex-row items-center gap-2 {itemsClass}"
|
||||
>
|
||||
<div class="flex flex-col gap-0.5 flex-2 w-full shrink-0 min-w-48 {clazz}">
|
||||
<h1 class="font-medium text-base">{@render title?.()}</h1>
|
||||
<h1 class="font-medium text-base">
|
||||
{@render title?.()}
|
||||
</h1>
|
||||
{#if description}
|
||||
<div class="text-slate-600 dark:text-zinc-400 text-sm">
|
||||
{@render description?.()}
|
||||
|
||||
Reference in new issue
Block a user