design: improve comments
This commit is contained in:
1 parent
eef339bf4c
commit
3e2ccbd220
6 files changed
+24
-18
No files matched your search
@@ -67,11 +67,13 @@
|
||||
{:else if type == 'instance'}
|
||||
<Search
|
||||
search={async (q) => {
|
||||
const results = await instances || {}
|
||||
const results = (await instances) || {}
|
||||
|
||||
return q ? (results.federated_instances?.linked || []).filter(
|
||||
(i) => i.software === 'lemmy' && i.domain.includes(q)
|
||||
) : []
|
||||
return q
|
||||
? (results.federated_instances?.linked || []).filter(
|
||||
(i) => i.software === 'lemmy' && i.domain.includes(q)
|
||||
)
|
||||
: []
|
||||
}}
|
||||
extractName={(i) => `${i.domain}`}
|
||||
on:select
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
import { page } from '$app/stores'
|
||||
import { onMount } from 'svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import { slide } from 'svelte/transition'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
|
||||
export let node: CommentNodeI
|
||||
export let postId: number
|
||||
@@ -176,6 +178,7 @@
|
||||
{#if replying}
|
||||
<div
|
||||
class="max-w-full my-2 border-l border-slate-200 dark:border-zinc-800 pl-4"
|
||||
transition:slide={{ axis: 'y', duration: 400, easing: expoOut }}
|
||||
>
|
||||
<h1 class="font-bold text-sm mb-2">{$t('comment.reply')}</h1>
|
||||
<CommentForm
|
||||
|
||||
@@ -142,7 +142,10 @@
|
||||
}}
|
||||
>
|
||||
<Icon src={ChevronDoubleDown} mini size="16" slot="prefix" />
|
||||
{node.comment_view.counts.child_count} more
|
||||
{$t('comment.more', {
|
||||
// @ts-ignore
|
||||
comments: node.comment_view.counts.child_count,
|
||||
})}
|
||||
</Button>
|
||||
</svelte:element>
|
||||
{/if}
|
||||
|
||||
@@ -183,7 +183,8 @@ overflow-hidden transition-colors"
|
||||
{#if tools}
|
||||
<!--Toolbar-->
|
||||
<div
|
||||
class="[&>*]:flex-shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 {$$props.disabled
|
||||
class="[&>*]:flex-shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 border-b
|
||||
border-slate-200 dark:border-zinc-900 {$$props.disabled
|
||||
? 'opacity-60 pointer-events-none'
|
||||
: ''}"
|
||||
>
|
||||
|
||||
@@ -413,7 +413,8 @@
|
||||
"label": "Actions",
|
||||
"link": "Copy Link"
|
||||
},
|
||||
"locked": "This post is locked."
|
||||
"locked": "This post is locked.",
|
||||
"more": "{{comments:number}} more"
|
||||
},
|
||||
"moderation": {
|
||||
"report": "Report",
|
||||
|
||||
+7
-11
@@ -29,29 +29,25 @@ export const fullCommunityName = (name: string, actorId: string) =>
|
||||
`${name}@${new URL(actorId).hostname}`
|
||||
|
||||
export const placeholders = {
|
||||
url: ['https://notas.cam', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
|
||||
url: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
|
||||
post: [
|
||||
'Is starting nuclear warfare illegal?',
|
||||
'A cool photo I took before the destruction of mankind!',
|
||||
'AITA for ending all contention and causing world peace?',
|
||||
"AITA for making somebody's day?",
|
||||
'BREAKING NEWS: Police break into gun shop, find weapons',
|
||||
'How do I make sure my pet rock stays alive?',
|
||||
'My cat just invented a time machine, what do I do?',
|
||||
'Unpopular opinion: world peace and global happiness would be beneficial to humanity',
|
||||
'Unpopular opinion: world peace would be beneficial to humanity',
|
||||
'LPT: The smaller weights are easier to lift than the bigger weights in a gym',
|
||||
'javascript bad',
|
||||
'ELI5: What is 4 + 8?',
|
||||
],
|
||||
comment: [
|
||||
'aint no way',
|
||||
'what?',
|
||||
'new response just dropped',
|
||||
'<insert funny joke here>',
|
||||
'say, why did we name restaurant staff after computers, anyway?',
|
||||
`this.\nedit: thanks for 1 upvote😃😃😃!`,
|
||||
'Officer, I drop kicked that child in self defense! You gotta believe me man.',
|
||||
"i did not read this post at all and i'm about to give my opinion on it.",
|
||||
'this comment placeholder is very important dont forget',
|
||||
'As Abraham Lincoln once said, "don\'t believe everything you see on the internet."',
|
||||
'huh. i did not understand any of that.',
|
||||
'existential crisis in progress',
|
||||
'hello user i am a sentient placeholder. please dont type anything or i disappear forever. thanks',
|
||||
],
|
||||
get: (type: 'url' | 'post' | 'comment') => {
|
||||
return get(userSettings)?.randomPlaceholders
|
||||
|
||||
Reference in new issue
Block a user