stage2: add piefed client
This commit is contained in:
137 files changed
+6698
-530
No files matched your search
@@ -1,14 +1,13 @@
|
||||
import { client } from '$lib/client/lemmy.svelte'
|
||||
import type { SubmissionView } from '$lib/lemmy/contentview.js'
|
||||
import type {
|
||||
Comment,
|
||||
CommentView,
|
||||
Community,
|
||||
MyUserInfo,
|
||||
Person,
|
||||
PostView,
|
||||
PrivateMessageView,
|
||||
} from 'lemmy-js-client'
|
||||
} from '$lib/client/types'
|
||||
import type { SubmissionView } from '$lib/lemmy/contentview.js'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
interface Modals {
|
||||
@@ -112,7 +111,7 @@ export const amMod = (me: MyUserInfo, community: Community) =>
|
||||
export const amModOfAny = (me?: MyUserInfo) =>
|
||||
me && (me.moderates.length > 0 || isAdmin(me))
|
||||
|
||||
export const isAdmin = (me: MyUserInfo) => me.local_user_view.local_user.admin
|
||||
export const isAdmin = (me: MyUserInfo) => me.local_user_view.person.admin
|
||||
|
||||
export const removalTemplate = (
|
||||
input: string,
|
||||
|
||||
@@ -20,15 +20,17 @@
|
||||
}: Props = $props()
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col {clazz}">
|
||||
<span class="text-slate-600 dark:text-zinc-400 text-xs {labelClass}">
|
||||
{label}
|
||||
</span>
|
||||
<span class="text-base {contentClass}">
|
||||
{#if formatted}
|
||||
<FormattedNumber number={Number(content)} />
|
||||
{:else}
|
||||
{content}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
{#if content != '-1'}
|
||||
<div class="flex flex-col {clazz}">
|
||||
<span class="text-slate-600 dark:text-zinc-400 text-xs {labelClass}">
|
||||
{label}
|
||||
</span>
|
||||
<span class="text-base {contentClass}">
|
||||
{#if formatted}
|
||||
<FormattedNumber number={Number(content)} />
|
||||
{:else}
|
||||
{content}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -12,6 +12,7 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/state'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { DEFAULT_CLIENT_TYPE } from '$lib/client/lemmy.svelte'
|
||||
|
||||
let { profiles }: { profiles: ProfileInfo[] } = $props()
|
||||
|
||||
@@ -45,7 +46,7 @@
|
||||
<div class="flex-1">
|
||||
<div class="font-medium">{profile.current.username}</div>
|
||||
<div class="text-xs text-slate-500 dark:text-zinc-500">
|
||||
{profile.current.instance}
|
||||
<span class="capitalize">{profile.current.client?.name ?? DEFAULT_CLIENT_TYPE.name}</span> • {profile.current.instance}
|
||||
</div>
|
||||
</div>
|
||||
{#snippet suffix()}
|
||||
@@ -70,7 +71,7 @@
|
||||
<div>
|
||||
<div class="font-medium text-sm">{p.username}</div>
|
||||
<div class="text-xs text-slate-500 dark:text-zinc-500">
|
||||
{p.instance}
|
||||
<span class="capitalize">{p.client?.name ?? DEFAULT_CLIENT_TYPE.name}</span> • {p.instance}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
|
||||
Reference in new issue
Block a user