formatting

This commit is contained in:
Kainoa Kanter 2023-04-07 23:20:17 -07:00
parent 980bf31ce0
commit 4210c35a5a
2 changed files with 49 additions and 34 deletions

View File

@ -1,19 +1,32 @@
<template> <template>
<img v-if="customEmoji" class="mk-emoji custom" :class="{ normal, noStyle }" :src="url" :alt="alt" :title="alt" decoding="async"/> <img
<img v-else-if="char && !useOsNativeEmojis" class="mk-emoji" v-if="customEmoji"
class="mk-emoji custom"
:class="{ normal, noStyle }"
:src="url"
:alt="alt"
:title="alt"
decoding="async"
/>
<img
v-else-if="char && !useOsNativeEmojis"
class="mk-emoji"
:src="char2filePath(char) || url" :src="char2filePath(char) || url"
:alt="alt" :title="alt" decoding="async"/> :alt="alt"
:title="alt"
decoding="async"
/>
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span> <span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
<span v-else>{{ emoji }}</span> <span v-else>{{ emoji }}</span>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref, watch } from 'vue'; import { computed, ref, watch } from "vue";
import { CustomEmoji } from 'calckey-js/built/entities'; import { CustomEmoji } from "calckey-js/built/entities";
import { getStaticImageUrl } from '@/scripts/get-static-image-url'; import { getStaticImageUrl } from "@/scripts/get-static-image-url";
import { char2filePath } from '@/scripts/twemoji-base'; import { char2filePath } from "@/scripts/twemoji-base";
import { defaultStore } from '@/store'; import { defaultStore } from "@/store";
import { instance } from '@/instance'; import { instance } from "@/instance";
import { url as instanceUrl } from "@/config"; import { url as instanceUrl } from "@/config";
const props = defineProps<{ const props = defineProps<{

View File

@ -10,15 +10,15 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import XEntrance from './welcome.entrance.a.vue'; import XEntrance from "./welcome.entrance.a.vue";
// #v-ifdef VITE_CAPACITOR // #v-ifdef VITE_CAPACITOR
//... //...
// #v-else // #v-else
import { computed } from 'vue'; import { computed } from "vue";
import XSetup from './welcome.setup.vue'; import XSetup from "./welcome.setup.vue";
import { instanceName } from '@/config'; import { instanceName } from "@/config";
import * as os from '@/os'; import * as os from "@/os";
import { definePageMetadata } from '@/scripts/page-metadata'; import { definePageMetadata } from "@/scripts/page-metadata";
let meta = $ref(null); let meta = $ref(null);
@ -30,9 +30,11 @@ const headerActions = $computed(() => []);
const headerTabs = $computed(() => []); const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({ definePageMetadata(
computed(() => ({
title: instanceName, title: instanceName,
icon: null, icon: null,
}))); }))
);
// #v-endif // #v-endif
</script> </script>