diff --git a/frontend/src/components/input/editor/TipTap.vue b/frontend/src/components/input/editor/TipTap.vue index e9ea1ba79..caefa4c01 100644 --- a/frontend/src/components/input/editor/TipTap.vue +++ b/frontend/src/components/input/editor/TipTap.vue @@ -167,7 +167,7 @@ import {Node} from '@tiptap/pm/model' import Commands from './commands' import suggestionSetup from './suggestion' -import mentionSuggestionSetup from './mentionSuggestion' +import mentionSuggestionSetup from './mention/mentionSuggestion' import {common, createLowlight} from 'lowlight' diff --git a/frontend/src/components/input/editor/MentionList.vue b/frontend/src/components/input/editor/mention/MentionList.vue similarity index 100% rename from frontend/src/components/input/editor/MentionList.vue rename to frontend/src/components/input/editor/mention/MentionList.vue diff --git a/frontend/src/components/input/editor/mentionSuggestion.ts b/frontend/src/components/input/editor/mention/mentionSuggestion.ts similarity index 99% rename from frontend/src/components/input/editor/mentionSuggestion.ts rename to frontend/src/components/input/editor/mention/mentionSuggestion.ts index 5540b1850..208e9d81d 100644 --- a/frontend/src/components/input/editor/mentionSuggestion.ts +++ b/frontend/src/components/input/editor/mention/mentionSuggestion.ts @@ -7,6 +7,7 @@ import ProjectUserService from '@/services/projectUsers' import { fetchAvatarBlobUrl, getDisplayName } from '@/models/user' import type { IUser } from '@/modelTypes/IUser' import type { MentionNodeAttrs } from '@tiptap/extension-mention' + interface MentionItem extends MentionNodeAttrs { id: string label: string @@ -25,7 +26,7 @@ async function searchUsersForProject(projectId: number, query: string): Promise< users.map(async (user) => { const avatarUrl = await fetchAvatarBlobUrl(user, 32) return { - id: String(user.id), + id: user.username, label: getDisplayName(user), username: user.username, avatarUrl: avatarUrl as string,