refactor and fix all references to emojis

This commit is contained in:
Moon.eth
2026-07-30 17:59:15 +09:00
parent b814d79f19
commit 49c9c2ba57
28 changed files with 422 additions and 77 deletions
+8 -3
View File
@@ -7,23 +7,28 @@
* an unverified link that looks verified is a phishing surface.
*/
import type { ProfileField } from '$lib/util/profile'
import type { CustomEmoji } from '$lib/api/types'
import Module from '../common/Module.svelte'
import EmojiText from '../common/EmojiText.svelte'
interface Props {
title: string
fields: ProfileField[]
emojis?: CustomEmoji[]
}
let { title, fields }: Props = $props()
let { title, fields, emojis }: Props = $props()
</script>
{#if fields.length > 0}
<Module {title} flush>
<Module {title} titleEmojis={emojis} flush>
<table class="data-table details-table">
<tbody>
{#each fields as field, index (`${field.name}:${index}`)}
<tr class="details-row" data-verified={field.verified ? 'true' : 'false'}>
<th class="data-table-label details-label" scope="row">{field.name}</th>
<th class="data-table-label details-label" scope="row">
<EmojiText text={field.name} {emojis} />
</th>
<td class="data-table-value details-value" data-verified={field.verified ? 'true' : 'false'}>
{#if field.verified}
<span class="verified-mark" title="Ownership of this link is verified"></span>