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:
Xylight authored and GitHub committed 2025-06-10 12:51:00 -07:00
1 parent a7159b0526
commit 472b4b9190
15 files changed
+59 -127

No files matched your search

+1 -1
View File
@@ -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) {
+1 -2
View File
@@ -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
})
+1 -1
View File
@@ -149,7 +149,7 @@
rounding = size == 'lg' ? 'xl' : 'lg',
roundingSide = 'all',
alignment = 'center',
shadow = 'sm',
shadow = color != 'tertiary' ? 'sm' : 'none',
column = false,
disabled,
loaderWidth = undefined,
+1 -1
View File
@@ -17,7 +17,7 @@
</script>
<label
class="font-normal cursor-pointer flex flex-row items-start gap-4 group {clazz}"
class="font-normal cursor-pointer flex flex-row items-center gap-4 group {clazz}"
>
<div
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-xs
+1 -1
View File
@@ -73,7 +73,7 @@
placeholder = undefined,
label = undefined,
size = 'md',
shadow = 'none',
shadow = 'sm',
id = generateID(),
class: clazz = '',
baseClass = '',
-8
View File
@@ -96,9 +96,6 @@ interface Settings {
language: string | null
useRtl: boolean
parseTags: boolean
tagRules: {
[key: string]: 'hide' | 'blur-sm'
}
logoColorMonth: number | null
}
@@ -173,11 +170,6 @@ export const defaultSettings: Settings = {
language: env.PUBLIC_LANGUAGE ?? null,
useRtl: false,
parseTags: true,
tagRules: {
cw: 'blur-sm',
nsfl: 'blur-sm',
nsfw: 'blur-sm',
},
logoColorMonth: null,
}