lint fix
This commit is contained in:
parent
57331536f2
commit
c0c6b87c94
|
@ -97,7 +97,6 @@ import { customEmojiCategories } from '@/custom-emojis.js';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import { selectFile, selectFiles } from '@/scripts/select-file.js';
|
import { selectFile, selectFiles } from '@/scripts/select-file.js';
|
||||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||||
import { $i } from '@/account';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
emoji?: any,
|
emoji?: any,
|
||||||
|
@ -117,6 +116,7 @@ let file = $ref<Misskey.entities.DriveFile>();
|
||||||
let chooseFile: DriveFile|null = $ref(null);
|
let chooseFile: DriveFile|null = $ref(null);
|
||||||
let draft = $ref(props.emoji ? props.emoji.draft : false);
|
let draft = $ref(props.emoji ? props.emoji.draft : false);
|
||||||
let isRequest = $ref(props.isRequest);
|
let isRequest = $ref(props.isRequest);
|
||||||
|
let url;
|
||||||
|
|
||||||
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
||||||
rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
|
rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
|
||||||
|
@ -242,8 +242,8 @@ async function done() {
|
||||||
dialog.close();
|
dialog.close();
|
||||||
} else {
|
} else {
|
||||||
const created = isRequest
|
const created = isRequest
|
||||||
? await os.apiWithDialog('admin/emoji/add-draft', params)
|
? await os.apiWithDialog('admin/emoji/add-draft', params)
|
||||||
: await os.apiWithDialog('admin/emoji/add', params);
|
: await os.apiWithDialog('admin/emoji/add', params);
|
||||||
|
|
||||||
emit('done', {
|
emit('done', {
|
||||||
created: created,
|
created: created,
|
||||||
|
|
|
@ -85,19 +85,11 @@ const headerTabs = $computed(() => [{
|
||||||
}]);
|
}]);
|
||||||
const filteredCategories = computed(() => {
|
const filteredCategories = computed(() => {
|
||||||
return customEmojiCategories.value.filter((category: any) => {
|
return customEmojiCategories.value.filter((category: any) => {
|
||||||
return customEmojis.value.some((e: any) => e.category === category && !e.draft);
|
return customEmojis.value.some((em: any) => em.category === category && !em.draft);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
definePageMetadata(ref({}));
|
definePageMetadata(ref({}));
|
||||||
|
|
||||||
const pagination = {
|
|
||||||
endpoint: 'admin/emoji/list' as const,
|
|
||||||
limit: 30,
|
|
||||||
params: computed(() => ({
|
|
||||||
query: (query.value && query.value !== '') ? query.value : null,
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
|
|
||||||
let q = $ref('');
|
let q = $ref('');
|
||||||
let searchEmojis = $ref<Misskey.entities.CustomEmoji[]>(null);
|
let searchEmojis = $ref<Misskey.entities.CustomEmoji[]>(null);
|
||||||
let selectedTags = $ref(new Set());
|
let selectedTags = $ref(new Set());
|
||||||
|
|
|
@ -273,7 +273,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
||||||
<template #label>{{ i18n.ts.enable }}</template>
|
<template #label>{{ i18n.ts.enable }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :text-converter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
||||||
<template #label>{{ i18n.ts._role.priority }}</template>
|
<template #label>{{ i18n.ts._role.priority }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
</div>
|
</div>
|
||||||
|
@ -293,7 +293,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
||||||
<template #label>{{ i18n.ts.enable }}</template>
|
<template #label>{{ i18n.ts.enable }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :text-converter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
||||||
<template #label>{{ i18n.ts._role.priority }}</template>
|
<template #label>{{ i18n.ts._role.priority }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
</div>
|
</div>
|
||||||
|
@ -313,7 +313,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
<MkSwitch v-model="role.policies.canRequestCustomEmojis.value" :disabled="role.policies.canRequestCustomEmojis.useDefault" :readonly="readonly">
|
||||||
<template #label>{{ i18n.ts.enable }}</template>
|
<template #label>{{ i18n.ts.enable }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :text-converter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
<MkRange v-model="role.policies.canRequestCustomEmojis.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
||||||
<template #label>{{ i18n.ts._role.priority }}</template>
|
<template #label>{{ i18n.ts._role.priority }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,14 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<button v-if="emoji.draft" class="zuvgdzyu _button emoji-draft" @click="menu">
|
<button v-if="emoji.draft" class="zuvgdzyu _button emoji-draft" @click="menu">
|
||||||
<img style="max-height: 64px;object-fit: contain;" :src="emoji.url" class="img" loading="lazy"/>
|
<img style="max-height: 64px;object-fit: contain;" :src="emoji.url" class="img" loading="lazy"/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="name _monospace">{{ emoji.name + ' (draft)' }}</div>
|
<div class="name _monospace">{{ emoji.name + ' (draft)' }}</div>
|
||||||
<div class="info">{{ emoji.aliases.join(' ') }}</div>
|
<div class="info">{{ emoji.aliases.join(' ') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button v-else class="_button" :class="$style.root" @click="menu">
|
<button v-else class="_button" :class="$style.root" @click="menu">
|
||||||
<img :src="emoji.url" :class="$style.img" loading="lazy"/>
|
<img :src="emoji.url" :class="$style.img" loading="lazy"/>
|
||||||
<div :class="$style.body">
|
<div :class="$style.body">
|
||||||
<div :class="$style.name" >{{ emoji.name }}</div>
|
<div :class="$style.name">{{ emoji.name }}</div>
|
||||||
<div :class="$style.info">{{ emoji.aliases.join(' ') }}</div>
|
<div :class="$style.info">{{ emoji.aliases.join(' ') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue