fix code style
This commit is contained in:
parent
24d4124ffc
commit
ac4a001e9f
@ -4,77 +4,81 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkModalWindow ref="dialogEl" @close="cancel()" @closed="$emit('closed')">
|
<MkModalWindow ref="dialogEl" @close="cancel()" @closed="$emit('closed')">
|
||||||
<template #header>:{{ emoji.name }}:</template>
|
<template #header>:{{ emoji.name }}:</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<MkSpacer>
|
<MkSpacer>
|
||||||
<div style="display: flex; flex-direction: column; gap: 1em;">
|
<div style="display: flex; flex-direction: column; gap: 1em;">
|
||||||
<div :class="$style.emojiImgWrapper">
|
<div :class="$style.emojiImgWrapper">
|
||||||
<MkCustomEmoji :name="emoji.name" :normal="true" :useOriginalSize="true" style="height: 100%;"></MkCustomEmoji>
|
<MkCustomEmoji :name="emoji.name" :normal="true" :useOriginalSize="true" style="height: 100%;"></MkCustomEmoji>
|
||||||
</div>
|
</div>
|
||||||
<MkKeyValue :copy="`:${emoji.name}:`">
|
<MkKeyValue :copy="`:${emoji.name}:`">
|
||||||
<template #key>{{ i18n.ts.name }}</template>
|
<template #key>{{ i18n.ts.name }}</template>
|
||||||
<template #value>{{ emoji.name }}</template>
|
<template #value>{{ emoji.name }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue>
|
<MkKeyValue>
|
||||||
<template #key>{{ i18n.ts.tags }}</template>
|
<template #key>{{ i18n.ts.tags }}</template>
|
||||||
<template #value>
|
<template #value>
|
||||||
<div v-if="emoji.aliases.length === 0">{{ i18n.ts.none }}</div>
|
<div v-if="emoji.aliases.length === 0">{{ i18n.ts.none }}</div>
|
||||||
<div v-else :class="$style.aliases">
|
<div v-else :class="$style.aliases">
|
||||||
<span v-for="alias in emoji.aliases" :key="alias" :class="$style.alias">
|
<span v-for="alias in emoji.aliases" :key="alias" :class="$style.alias">
|
||||||
{{ alias }}
|
{{ alias }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue>
|
<MkKeyValue>
|
||||||
<template #key>{{ i18n.ts.category }}</template>
|
<template #key>{{ i18n.ts.category }}</template>
|
||||||
<template #value>{{ emoji.category ?? i18n.ts.none }}</template>
|
<template #value>{{ emoji.category ?? i18n.ts.none }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue>
|
<MkKeyValue>
|
||||||
<template #key>{{ i18n.ts.sensitive }}</template>
|
<template #key>{{ i18n.ts.sensitive }}</template>
|
||||||
<template #value>{{ emoji.isSensitive ? i18n.ts.yes : i18n.ts.no }}</template>
|
<template #value>{{ emoji.isSensitive ? i18n.ts.yes : i18n.ts.no }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue>
|
<MkKeyValue>
|
||||||
<template #key>{{ i18n.ts.localOnly }}</template>
|
<template #key>{{ i18n.ts.localOnly }}</template>
|
||||||
<template #value>{{ emoji.localOnly ? i18n.ts.yes : i18n.ts.no }}</template>
|
<template #value>{{ emoji.localOnly ? i18n.ts.yes : i18n.ts.no }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue>
|
<MkKeyValue>
|
||||||
<template #key>{{ i18n.ts.license }}</template>
|
<template #key>{{ i18n.ts.license }}</template>
|
||||||
<template #value><Mfm :text="emoji.license ?? i18n.ts.none" /></template>
|
<template #value><Mfm :text="emoji.license ?? i18n.ts.none"/></template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkKeyValue :copy="emoji.url">
|
<MkKeyValue :copy="emoji.url">
|
||||||
<template #key>{{ i18n.ts.emojiUrl }}</template>
|
<template #key>{{ i18n.ts.emojiUrl }}</template>
|
||||||
<template #value>
|
<template #value>
|
||||||
<MkLink :url="emoji.url" target="_blank">{{ emoji.url }}</MkLink>
|
<MkLink :url="emoji.url" target="_blank">{{ emoji.url }}</MkLink>
|
||||||
</template>
|
</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
</div>
|
</div>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</template>
|
</template>
|
||||||
</MkModalWindow>
|
</MkModalWindow>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { defineProps, shallowRef } from 'vue';
|
import { defineProps, shallowRef } from 'vue';
|
||||||
|
import MkLink from '@/components/MkLink.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
import MkLink from './MkLink.vue';
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
emoji: Misskey.entities.EmojiDetailed,
|
emoji: Misskey.entities.EmojiDetailed,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'ok', cropped: Misskey.entities.DriveFile): void;
|
(ev: 'ok', cropped: Misskey.entities.DriveFile): void;
|
||||||
(ev: 'cancel'): void;
|
(ev: 'cancel'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialogEl = shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialogEl = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
const cancel = () => {
|
|
||||||
|
function cancel() {
|
||||||
emit('cancel');
|
emit('cancel');
|
||||||
dialogEl.value!.close();
|
dialogEl.value!.close();
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
Loading…
Reference in New Issue
Block a user