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>
<img 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"
:alt="alt" :title="alt" decoding="async"/>
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
<span v-else>{{ emoji }}</span>
<img
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"
:alt="alt"
:title="alt"
decoding="async"
/>
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
<span v-else>{{ emoji }}</span>
</template>
<script lang="ts" setup>
import { computed, ref, watch } from 'vue';
import { CustomEmoji } from 'calckey-js/built/entities';
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import { char2filePath } from '@/scripts/twemoji-base';
import { defaultStore } from '@/store';
import { instance } from '@/instance';
import { computed, ref, watch } from "vue";
import { CustomEmoji } from "calckey-js/built/entities";
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
import { char2filePath } from "@/scripts/twemoji-base";
import { defaultStore } from "@/store";
import { instance } from "@/instance";
import { url as instanceUrl } from "@/config";
const props = defineProps<{
@ -39,11 +52,11 @@ const customEmoji = computed(() =>
);
const url = computed(() => {
if (char.value) {
// #v-ifdef VITE_CAPACITOR
//...
// #v-else
// #v-ifdef VITE_CAPACITOR
//...
// #v-else
return char2filePath(char.value);
// #v-endif
// #v-endif
} else {
const rawUrl = defaultStore.state.disableShowingAnimatedImages
? getStaticImageUrl(customEmoji.value.url)

View File

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