mirror of
https://git.shipoclu.com/moon/plspace.git
synced 2026-08-13 02:42:30 +00:00
refactor and fix all references to emojis
This commit is contained in:
+24
-8
@@ -15,12 +15,13 @@
|
||||
instanceThumbnail,
|
||||
} from '$lib/api/endpoints'
|
||||
import { displayNameOf, fallbackMood, formatCount, profilePath } from '$lib/util/profile'
|
||||
import { toPlainText } from '$lib/util/html'
|
||||
import { escapeHtml, toPlainText } from '$lib/util/html'
|
||||
import { relativeTime, shortDate, stampDate } from '$lib/util/time'
|
||||
import { useTimelineRefresh } from '$lib/timeline-refresh'
|
||||
import { reconcileRefreshItems } from '$lib/stores/feed.svelte'
|
||||
import Module from '$components/common/Module.svelte'
|
||||
import Avatar from '$components/common/Avatar.svelte'
|
||||
import EmojiText from '$components/common/EmojiText.svelte'
|
||||
import RichText from '$components/common/RichText.svelte'
|
||||
import MfmContent from '$components/common/MfmContent.svelte'
|
||||
import Composer from '$components/blog/Composer.svelte'
|
||||
@@ -217,7 +218,11 @@
|
||||
</div>
|
||||
{:else}
|
||||
<h1 class="page-title">
|
||||
{#if me}Hello, {displayNameOf(me).split(/\s+/)[0]}!{:else}{domain}{/if}
|
||||
{#if me}
|
||||
Hello, <EmojiText text={displayNameOf(me).split(/\s+/)[0]} emojis={me.emojis} />!
|
||||
{:else}
|
||||
{domain}
|
||||
{/if}
|
||||
</h1>
|
||||
{#if me}
|
||||
<p class="page-subtitle">
|
||||
@@ -243,7 +248,9 @@
|
||||
<Avatar account={me} size="friend" />
|
||||
</p>
|
||||
<p class="center">
|
||||
<a href={profilePath(me)}>{displayNameOf(me)}</a>
|
||||
<a href={profilePath(me)}>
|
||||
<EmojiText text={displayNameOf(me)} emojis={me.emojis} />
|
||||
</a>
|
||||
</p>
|
||||
<p class="center muted">
|
||||
Profile views: {formatCount(me.statuses_count)} entries
|
||||
@@ -327,10 +334,10 @@
|
||||
<Avatar account={entry.account} />
|
||||
<div class="status-line-body">
|
||||
<a class="status-line-author" href={profilePath(entry.account)}>
|
||||
{displayNameOf(entry.account)}
|
||||
<EmojiText text={displayNameOf(entry.account)} emojis={entry.account.emojis} />
|
||||
</a>
|
||||
<MfmContent
|
||||
html={entry.spoiler_text ? `<p>${entry.spoiler_text}</p>` : entry.content}
|
||||
html={entry.spoiler_text ? `<p>${escapeHtml(entry.spoiler_text)}</p>` : entry.content}
|
||||
emojis={entry.emojis}
|
||||
mentions={entry.mentions}
|
||||
tags={entry.tags}
|
||||
@@ -376,12 +383,17 @@
|
||||
{@const entry = status.reblog ?? status}
|
||||
<tr>
|
||||
<td class="bulletin-from">
|
||||
<a href={profilePath(entry.account)}>{displayNameOf(entry.account)}</a>
|
||||
<a href={profilePath(entry.account)}>
|
||||
<EmojiText text={displayNameOf(entry.account)} emojis={entry.account.emojis} />
|
||||
</a>
|
||||
</td>
|
||||
<td class="bulletin-date">{stampDate(entry.created_at)}</td>
|
||||
<td class="bulletin-subject">
|
||||
<a href={`#/blog/${entry.id}`}>
|
||||
{toPlainText(entry.spoiler_text || entry.content).slice(0, 90) || '(no text)'}
|
||||
<EmojiText
|
||||
text={toPlainText(entry.spoiler_text || entry.content).slice(0, 90) || '(no text)'}
|
||||
emojis={entry.emojis}
|
||||
/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -407,7 +419,11 @@
|
||||
{#each following as friend (friend.id)}
|
||||
<li class="friend-card" data-account={friend.acct}>
|
||||
<a class="friend-card-link" href={profilePath(friend)}>
|
||||
<span class="friend-card-name">{displayNameOf(friend)}</span>
|
||||
<EmojiText
|
||||
class="friend-card-name"
|
||||
text={displayNameOf(friend)}
|
||||
emojis={friend.emojis}
|
||||
/>
|
||||
<img
|
||||
class="friend-card-photo"
|
||||
src={friend.avatar_static || friend.avatar}
|
||||
|
||||
Reference in New Issue
Block a user