formatting
This commit is contained in:
parent
980bf31ce0
commit
4210c35a5a
|
@ -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"
|
||||||
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
|
:title="alt"
|
||||||
<span v-else>{{ emoji }}</span>
|
decoding="async"
|
||||||
|
/>
|
||||||
|
<span v-else-if="char && useOsNativeEmojis">{{ char }}</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<{
|
||||||
|
@ -39,11 +52,11 @@ const customEmoji = computed(() =>
|
||||||
);
|
);
|
||||||
const url = computed(() => {
|
const url = computed(() => {
|
||||||
if (char.value) {
|
if (char.value) {
|
||||||
// #v-ifdef VITE_CAPACITOR
|
// #v-ifdef VITE_CAPACITOR
|
||||||
//...
|
//...
|
||||||
// #v-else
|
// #v-else
|
||||||
return char2filePath(char.value);
|
return char2filePath(char.value);
|
||||||
// #v-endif
|
// #v-endif
|
||||||
} else {
|
} else {
|
||||||
const rawUrl = defaultStore.state.disableShowingAnimatedImages
|
const rawUrl = defaultStore.state.disableShowingAnimatedImages
|
||||||
? getStaticImageUrl(customEmoji.value.url)
|
? getStaticImageUrl(customEmoji.value.url)
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- #v-ifdef VITE_CAPACITOR -->
|
<!-- #v-ifdef VITE_CAPACITOR -->
|
||||||
<XEntrance />
|
<XEntrance />
|
||||||
<!-- #v-else -->
|
<!-- #v-else -->
|
||||||
<div v-if="meta">
|
<div v-if="meta">
|
||||||
<XSetup v-if="meta.requireSetup"/>
|
<XSetup v-if="meta.requireSetup" />
|
||||||
<XEntrance v-else/>
|
<XEntrance v-else />
|
||||||
</div>
|
</div>
|
||||||
<!-- #v-endif -->
|
<!-- #v-endif -->
|
||||||
</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>
|
||||||
|
|
Loading…
Reference in New Issue