From a5c7881d6f8168a26706c8b27634f949c6a9438c Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 12 Feb 2026 11:50:17 +0000 Subject: [PATCH] feat: implement image uploading for markdowneditor in checklist --- .../ui/moderation/checklist/ModerationChecklist.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/frontend/src/components/ui/moderation/checklist/ModerationChecklist.vue b/apps/frontend/src/components/ui/moderation/checklist/ModerationChecklist.vue index f33081a2d3..f3a13772bc 100644 --- a/apps/frontend/src/components/ui/moderation/checklist/ModerationChecklist.vue +++ b/apps/frontend/src/components/ui/moderation/checklist/ModerationChecklist.vue @@ -148,6 +148,7 @@ placeholder="No message generated." :disabled="false" :heading-buttons="false" + :on-image-upload="onUploadHandler" /> @@ -485,6 +487,7 @@ import { useGeneratedState } from '~/composables/generated' import { getProjectTypeForUrlShorthand } from '~/helpers/projects.js' import { useModerationStore } from '~/store/moderation.ts' +import { useImageUpload } from '~/composables/image-upload.ts' import KeybindsModal from './ChecklistKeybindsModal.vue' import ModpackPermissionsFlow from './ModpackPermissionsFlow.vue' @@ -675,6 +678,14 @@ const isModpackPermissionsStage = computed(() => { return currentStageObj.value.id === 'modpack-permissions' }) +async function onUploadHandler(file: File) { + const response = await useImageUpload(file, { + context: 'thread_message', + projectID: projectV2.value.id, + }) + return response.url +} + const useSimpleEditor = ref(false) const message = ref('') const generatedMessage = ref(false)