Merge branch 'develop' of misskey-dev into merge-upstream
This commit is contained in:
		| @@ -39,7 +39,10 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 				</MkInput> | ||||
| 				<MkInput v-model="aliases" autocapitalize="off"> | ||||
| 					<template #label>{{ i18n.ts.tags }}</template> | ||||
| 					<template #caption>{{ i18n.ts.setMultipleBySeparatingWithSpace }}</template> | ||||
| 					<template #caption> | ||||
| 						{{ i18n.ts.theKeywordWhenSearchingForCustomEmoji }}<br/> | ||||
| 						{{ i18n.ts.setMultipleBySeparatingWithSpace }} | ||||
| 					</template> | ||||
| 				</MkInput> | ||||
| 				<MkTextarea v-model="license"> | ||||
| 					<template #label>{{ i18n.ts.license }}</template> | ||||
| @@ -100,6 +103,7 @@ import MkTextarea from '@/components/MkTextarea.vue'; | ||||
| import MkInfo from '@/components/MkInfo.vue'; | ||||
| import MkFolder from '@/components/MkFolder.vue'; | ||||
| import * as os from '@/os.js'; | ||||
| import { misskeyApi } from '@/scripts/misskey-api.js'; | ||||
| import { i18n } from '@/i18n.js'; | ||||
| import { customEmojiCategories } from '@/custom-emojis.js'; | ||||
| import MkSwitch from '@/components/MkSwitch.vue'; | ||||
| @@ -124,11 +128,11 @@ const rolesThatCanNotBeUsedThisEmojiAsReaction = ref<Misskey.entities.Role[]>([] | ||||
| const file = ref<Misskey.entities.DriveFile>(); | ||||
|  | ||||
| watch(roleIdsThatCanBeUsedThisEmojiAsReaction, async () => { | ||||
| 	rolesThatCanBeUsedThisEmojiAsReaction.value = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.value.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null); | ||||
| 	rolesThatCanBeUsedThisEmojiAsReaction.value = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.value.map((id) => misskeyApi('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null); | ||||
| }, { immediate: true }); | ||||
|  | ||||
| watch(roleIdsThatCanNotBeUsedThisEmojiAsReaction, async () => { | ||||
| 	rolesThatCanNotBeUsedThisEmojiAsReaction.value = (await Promise.all(roleIdsThatCanNotBeUsedThisEmojiAsReaction.value.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null); | ||||
| 	rolesThatCanNotBeUsedThisEmojiAsReaction.value = (await Promise.all(roleIdsThatCanNotBeUsedThisEmojiAsReaction.value.map((id) => misskeyApi('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null); | ||||
| }, { immediate: true }); | ||||
|  | ||||
| const imgUrl = computed(() => file.value ? file.value.url : props.emoji ? `/emoji/${props.emoji.name}.webp` : null); | ||||
| @@ -147,7 +151,7 @@ async function changeImage(ev) { | ||||
| } | ||||
|  | ||||
| async function addRole(type: boolean) { | ||||
| 	const roles = await os.api('admin/roles/list'); | ||||
| 	const roles = await misskeyApi('admin/roles/list'); | ||||
| 	const currentRoleIds = type ? rolesThatCanBeUsedThisEmojiAsReaction.value.map(x => x.id) : rolesThatCanNotBeUsedThisEmojiAsReaction.value.map(x => x.id); | ||||
|  | ||||
| 	const { canceled, result: role } = await os.select({ | ||||
| @@ -212,7 +216,7 @@ async function del() { | ||||
| 	}); | ||||
| 	if (canceled) return; | ||||
|  | ||||
| 	os.api('admin/emoji/delete', { | ||||
| 	misskeyApi('admin/emoji/delete', { | ||||
| 		id: props.emoji.id, | ||||
| 	}).then(() => { | ||||
| 		emit('done', { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 まっちゃとーにゅ
					まっちゃとーにゅ