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
@@ -31,7 +31,7 @@
|
||||
{@const slctd = selected == option}
|
||||
<button
|
||||
class={[
|
||||
'px-3 py-1 rounded-full text-sm font-medium transition-colors duration-75 relative',
|
||||
'px-3 py-1 rounded-full text-sm font-medium transition-colors duration-75 relative cursor-pointer',
|
||||
slctd
|
||||
? 'bg-primary-900 dark:bg-primary-100 text-slate-50 dark:text-zinc-900'
|
||||
: 'dark:bg-zinc-900/50 bg-white',
|
||||
|
||||
@@ -3,23 +3,21 @@
|
||||
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { settings, type View } from '$lib/settings.svelte.js'
|
||||
import type { CommentView } from 'lemmy-js-client'
|
||||
import { Button, Material } from 'mono-svelte'
|
||||
import { ArrowUturnUp, Icon } from 'svelte-hero-icons'
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
|
||||
interface Props {
|
||||
comment: CommentView
|
||||
view?: View
|
||||
community?: boolean
|
||||
meta?: boolean
|
||||
class?: string
|
||||
commentClass?: string
|
||||
commentClass?: ClassValue
|
||||
}
|
||||
|
||||
let {
|
||||
comment,
|
||||
view = settings.view,
|
||||
community = false,
|
||||
meta = true,
|
||||
class: clazz = '',
|
||||
@@ -29,8 +27,7 @@
|
||||
</script>
|
||||
|
||||
<Material
|
||||
class="flex flex-col flex-1 rounded-none
|
||||
{view == 'compact' ? 'py-4' : 'py-5'} {clazz}"
|
||||
class={['flex flex-col flex-1 rounded-none py-4 list-none', clazz]}
|
||||
color="none"
|
||||
padding="none"
|
||||
>
|
||||
@@ -69,14 +66,12 @@
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="list-none">
|
||||
<Comment
|
||||
postId={comment.post.id}
|
||||
node={{ children: [], comment_view: comment, depth: 1, expanded: true }}
|
||||
replying={false}
|
||||
{meta}
|
||||
{...rest}
|
||||
class={commentClass}
|
||||
/>
|
||||
</div>
|
||||
<Comment
|
||||
postId={comment.post.id}
|
||||
node={{ children: [], comment_view: comment, depth: 1, expanded: true }}
|
||||
replying={false}
|
||||
{meta}
|
||||
{...rest}
|
||||
class={commentClass}
|
||||
/>
|
||||
</Material>
|
||||
@@ -103,12 +103,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul
|
||||
in:fly={{ duration: 500, easing: expoOut, y: -12, opacity: 0 }}
|
||||
class={isParent
|
||||
? 'divide-y dark:divide-zinc-900 divide-slate-100'
|
||||
: ' border-slate-200 dark:border-zinc-800 my-1'}
|
||||
>
|
||||
<ul in:fly={{ duration: 500, easing: expoOut, y: -12, opacity: 0 }}>
|
||||
{#each nodes as node, index (node.comment_view.comment.id)}
|
||||
<Comment
|
||||
postId={post.id}
|
||||
@@ -117,7 +112,7 @@
|
||||
contentClass="{node.children.length > 0 ||
|
||||
node.comment_view.counts.child_count > 0
|
||||
? 'border-l'
|
||||
: ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5 "
|
||||
: ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5"
|
||||
bind:open={() => node.expanded, value => (node.expanded = value)}
|
||||
>
|
||||
{#if node.children?.length > 0}
|
||||
@@ -136,6 +131,7 @@
|
||||
rounding="pill"
|
||||
color="tertiary"
|
||||
class="font-normal text-sm! text-slate-600 dark:text-zinc-400"
|
||||
shadow="none"
|
||||
loaderWidth={16}
|
||||
onclick={() => {
|
||||
if (nodes[index].depth > 4) {
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
let rule: 'blur-sm' | 'hide' | undefined
|
||||
if (settings.nsfwBlur && (post.post.nsfw || post.community.nsfw))
|
||||
rule = 'blur-sm'
|
||||
tagContent.forEach(tag => {
|
||||
if (settings.tagRules?.[tag]) rule = settings.tagRules?.[tag] ?? rule
|
||||
tagContent.forEach(() => {
|
||||
if (rule == 'hide') return rule
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user