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 -1
View File
@@ -3,6 +3,7 @@
import type { Wallet } from "@app/wallet";
import { onMount } from "svelte";
import { twemoji } from "@app/utils";
import * as router from "@app/router";
import Button from "@app/Button.svelte";
@@ -64,7 +65,7 @@
on:close={back} />
{:else}
<Modal>
<span slot="title">
<span slot="title" use:twemoji>
{#if state.status === Status.Success}
<div>🎉</div>
{:else}
+2 -2
View File
@@ -8,7 +8,7 @@
import Widget from "@app/base/projects/Widget.svelte";
import config from "@app/config.json";
import { Project } from "@app/project";
import { setOpenGraphMetaTag } from "@app/utils";
import { setOpenGraphMetaTag, twemoji } from "@app/utils";
setOpenGraphMetaTag([
{ prop: "og:title", content: "Radicle Interface" },
@@ -92,7 +92,7 @@
<main>
<div class="blurb">
<p>
<p use:twemoji>
Radicle 🌱 enables developers 🧙 to securely collaborate 🔐 on software
over a peer-to-peer network 🌐 built on Git.
</p>
+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>
+2 -2
View File
@@ -9,7 +9,7 @@
import Loading from "@app/Loading.svelte";
import Message from "@app/Message.svelte";
import Modal from "@app/Modal.svelte";
import { formatAddress } from "@app/utils";
import { formatAddress, twemoji } from "@app/utils";
import { registrar } from "./registrar";
import { session } from "@app/session";
@@ -80,7 +80,7 @@
<Modal narrow>
<span slot="title">
<div>🌐</div>
<div use:twemoji>🌐</div>
<span>Register a name</span>
</span>
+7 -2
View File
@@ -10,7 +10,12 @@
import ErrorModal from "@app/ErrorModal.svelte";
import Loading from "@app/Loading.svelte";
import Modal from "@app/Modal.svelte";
import { registerName, State, state } from "./registrar";
import {
registerName,
State,
state,
} from "@app/base/registrations/registrar";
import { twemoji } from "@app/utils";
export let wallet: Wallet;
export let name: string;
@@ -75,7 +80,7 @@
})} />
{:else}
<Modal>
<span slot="title">
<span slot="title" use:twemoji>
{#if $state.connection === State.Registered}
<div>🎉</div>
{:else}
+7 -5
View File
@@ -1,14 +1,16 @@
<script lang="ts" strictEvents>
import { onMount, createEventDispatcher } from "svelte";
import { setRecords } from "./resolver";
import type { EnsRecord } from "./resolver";
import type { Registration } from "./registrar";
import type { Wallet } from "@app/wallet";
import type { State } from "@app/utils";
import Button from "@app/Button.svelte";
import Loading from "@app/Loading.svelte";
import Modal from "@app/Modal.svelte";
import type { State } from "@app/utils";
import { Status } from "@app/utils";
import Button from "@app/Button.svelte";
import { onMount, createEventDispatcher } from "svelte";
import { setRecords } from "./resolver";
import { twemoji } from "@app/utils";
export let domain: string;
export let wallet: Wallet;
@@ -52,7 +54,7 @@
<Modal floating error={state.status === Status.Failed}>
<span slot="title">
<div>🧾</div>
<div use:twemoji>🧾</div>
<div>Update registration</div>
</span>
<span slot="subtitle">
+2 -2
View File
@@ -18,7 +18,7 @@
import { assert } from "@app/error";
import { defaultHttpApiPort } from "@app/base/seeds/Seed";
import { getRegistration, getOwner } from "./registrar";
import { isAddressEqual, isReverseRecordSet } from "@app/utils";
import { isAddressEqual, isReverseRecordSet, twemoji } from "@app/utils";
import { session } from "@app/session";
enum Status {
@@ -239,7 +239,7 @@
{:else if state.status === Status.NotFound}
<Modal subtle>
<span slot="title" class="txt-highlight">
<div>🍄</div>
<div use:twemoji>🍄</div>
{domain}
</span>
+2 -2
View File
@@ -2,7 +2,7 @@
import type { Wallet } from "@app/wallet";
import type { Stats } from "@app/base/seeds/Seed";
import type { ProjectInfo } from "@app/project";
import { formatSeedId, formatSeedHost } from "@app/utils";
import { formatSeedId, formatSeedHost, twemoji } from "@app/utils";
import { Seed } from "@app/base/seeds/Seed";
import Loading from "@app/Loading.svelte";
import SeedAddress from "@app/SeedAddress.svelte";
@@ -122,7 +122,7 @@
<span class="title txt-title">
<span class="txt-bold">
{hostName}
<span class="layout-desktop-inline">{seed.emoji}</span>
<span class="layout-desktop-inline" use:twemoji>{seed.emoji}</span>
</span>
</span>
<!-- User Session -->