Convert emojis to twemojis

To provide the same emoji experience on all browsers and OS we use
Twemoji and replace all emojis where possible.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2022-11-15 15:10:48 +01:00
parent ae9d9b4024
commit cd60ad7298
34 changed files with 247 additions and 58 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
import Readme from "@app/base/projects/Readme.svelte";
import HeaderToggleLabel from "@app/base/projects/HeaderToggleLabel.svelte";
import ProjectLink from "@app/router/ProjectLink.svelte";
import { isMarkdownPath, scrollIntoView } from "@app/utils";
import { isMarkdownPath, scrollIntoView, twemoji } from "@app/utils";
import { updateProjectRoute } from "@app/router";
export let blob: Blob;
@@ -201,7 +201,7 @@
<div class="container">
{#if blob.binary}
<div class="binary">
<div>👀</div>
<div use:twemoji>👀</div>
<span class="txt-tiny">Binary content</span>
</div>
{:else if showMarkdown}
+2 -2
View File
@@ -208,7 +208,7 @@
{:then blob}
<Blob {line} {blob} {getImage} {activeRoute} />
{:catch}
<Placeholder icon="🍂">
<Placeholder emoji="🍂">
<span slot="title">
{#if path !== "/"}
<div class="txt-monospace">{path}</div>
@@ -226,7 +226,7 @@
</div>
{:else}
<div class="placeholder">
<Placeholder icon="👀">
<Placeholder emoji="👀">
<span slot="title">Nothing to show</span>
<span slot="body">We couldn't find any files at this revision.</span>
</Placeholder>
+5 -3
View File
@@ -1,9 +1,11 @@
<script lang="ts">
import { onMount } from "svelte";
import { formatObjectId } from "@app/cobs";
import type { Issue } from "@app/issue";
import type { Wallet } from "@app/wallet";
import { Profile, ProfileType } from "@app/profile";
import { formatObjectId } from "@app/cobs";
import { onMount } from "svelte";
import { twemoji } from "@app/utils";
import Authorship from "@app/Authorship.svelte";
@@ -122,7 +124,7 @@
{#if commentCount > 0}
<div class="column-right">
<div class="comment-count">
<span class="txt-tiny emoji">💬</span>
<span class="txt-tiny emoji" use:twemoji>💬</span>
<span>{commentCount}</span>
</div>
</div>
+1 -1
View File
@@ -90,7 +90,7 @@
{/each}
</div>
{:else}
<Placeholder icon="🍣">
<Placeholder emoji="🍣">
<div slot="title">{capitalize(state)} issues</div>
<div slot="body">No issues matched the current filter</div>
</Placeholder>
+1 -1
View File
@@ -142,7 +142,7 @@
stats={revision.changeset.stats}
on:browse={e => onBrowse(e, revision.oid)} />
{:else if activeTab === PatchTab.Diff}
<Placeholder icon="🍳">
<Placeholder emoji="🍳">
<span slot="title">No changeset found</span>
<span slot="body">
We couldn't find a changeset related to this patch or revision
+5 -3
View File
@@ -1,9 +1,11 @@
<script lang="ts">
import { onMount } from "svelte";
import { formatObjectId } from "@app/cobs";
import type { Patch } from "@app/patch";
import type { Wallet } from "@app/wallet";
import { Profile, ProfileType } from "@app/profile";
import { formatObjectId } from "@app/cobs";
import { onMount } from "svelte";
import { twemoji } from "@app/utils";
import Authorship from "@app/Authorship.svelte";
@@ -122,7 +124,7 @@
{#if commentCount > 0}
<div class="column-right">
<div class="comment-count">
<span class="txt-tiny emoji">💬</span>
<span class="txt-tiny emoji" use:twemoji>💬</span>
<span>{commentCount}</span>
</div>
</div>
+1 -1
View File
@@ -87,7 +87,7 @@
{/each}
</div>
{:else}
<Placeholder icon="🍖">
<Placeholder emoji="🍖">
<div slot="title">{capitalize(state)} patches</div>
<div slot="body">No patches matched the current filter</div>
</Placeholder>
+2 -2
View File
@@ -176,7 +176,7 @@
{:catch e}
<div class="message">
{#if peer}
<Placeholder icon="🍂">
<Placeholder emoji="🍂">
<span slot="title">
<span class="txt-monospace">{formatSeedId(peer)}</span>
</span>
@@ -188,7 +188,7 @@
</span>
</Placeholder>
{:else}
<Placeholder icon="🍂">
<Placeholder emoji="🍂">
<span slot="body">
<span style="display: block">Couldn't load source tree.</span>
<span>{e.message}</span>