Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
placeholder="No message generated."
:disabled="false"
:heading-buttons="false"
:on-image-upload="onUploadHandler"
/>
<StyledInput
v-else
Expand Down Expand Up @@ -288,6 +289,7 @@
:max-height="300"
:disabled="false"
:heading-buttons="false"
:on-image-upload="onUploadHandler"
@input="persistState"
/>
</template>
Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down
Loading