Enhance(frontend): MFMや絵文字が使える入力ボックスでオートコンプリートを使えるように (#12643)
* rich autocomplete for use in profiles, announcements, and channel descriptions * implementation omissions * add tab, apply to page editor, and fix something * componentization * fix nyaize doesn't working in profile preview * detach autocomplete instance when unmounted * fix: mismatched camelCase * remove unused / unnecessary styles * update CHANGELOG.md * fix lint * remove dump.rdb * props.richAutocomplete -> autocomplete * Update packages/frontend/src/scripts/autocomplete.ts * clarify namings メンションなども「MFM」に含まれるのか自信がなかったのでrichSyntaxなどとぼかしていましたが、含むようなので変更しました * tweak * Update MkFormDialog.vue * rename --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
		| @@ -13,11 +13,11 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 		<MkButton primary rounded :class="$style.bannerEdit" @click="changeBanner">{{ i18n.ts._profile.changeBanner }}</MkButton> | ||||
| 	</div> | ||||
|  | ||||
| 	<MkInput v-model="profile.name" :max="30" manualSave> | ||||
| 	<MkInput v-model="profile.name" :max="30" manualSave :mfmAutocomplete="['emoji']"> | ||||
| 		<template #label>{{ i18n.ts._profile.name }}</template> | ||||
| 	</MkInput> | ||||
|  | ||||
| 	<MkTextarea v-model="profile.description" :max="500" tall manualSave> | ||||
| 	<MkTextarea v-model="profile.description" :max="500" tall manualSave mfmAutocomplete :mfmPreview="true" :nyaize="$i?.isCat ? 'respect' : undefined" :author="($i as Misskey.entities.UserLite)"> | ||||
| 		<template #label>{{ i18n.ts._profile.description }}</template> | ||||
| 		<template #caption>{{ i18n.ts._profile.youCanIncludeHashtags }}</template> | ||||
| 	</MkTextarea> | ||||
| @@ -112,10 +112,10 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { computed, reactive, ref, watch, defineAsyncComponent } from 'vue'; | ||||
| import Misskey from 'misskey-js'; | ||||
| import XAvatarDecoration from './profile.avatar-decoration.vue'; | ||||
| import MkButton from '@/components/MkButton.vue'; | ||||
| import MkInput from '@/components/MkInput.vue'; | ||||
| import MkTextarea from '@/components/MkTextarea.vue'; | ||||
| import MkSwitch from '@/components/MkSwitch.vue'; | ||||
| import MkSelect from '@/components/MkSelect.vue'; | ||||
| import FormSplit from '@/components/form/split.vue'; | ||||
| @@ -130,6 +130,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js'; | ||||
| import { claimAchievement } from '@/scripts/achievements.js'; | ||||
| import { defaultStore } from '@/store.js'; | ||||
| import MkInfo from '@/components/MkInfo.vue'; | ||||
| import MkTextarea from '@/components/MkTextarea.vue'; | ||||
|  | ||||
| const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default)); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 1STEP621
					1STEP621