Skip to content

Commit

Permalink
fix(attachments): add missing file picker confirm
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Oct 1, 2024
1 parent 172b33f commit df34ac0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Editor/Attachments/AttachmentsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,14 @@ export default {
})
},
async openFilesModal() {
const picker = getFilePickerBuilder(t('calendar', 'Choose a file to add as attachment')).setMultiSelect(false).build()
const picker = getFilePickerBuilder(t('calendar', 'Choose a file to add as attachment'))
.setMultiSelect(false)

Check warning on line 158 in src/components/Editor/Attachments/AttachmentsList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Attachments/AttachmentsList.vue#L158

Added line #L158 was not covered by tests
.addButton({
label: t('calendar', 'Pick'),
type: 'primary',
callback: (nodes) => logger.debug('Picked attachment', { nodes }),
})
.build()

Check warning on line 164 in src/components/Editor/Attachments/AttachmentsList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Attachments/AttachmentsList.vue#L164

Added line #L164 was not covered by tests
try {
const filename = await picker.pick(t('calendar', 'Choose a file to share as a link'))
if (!this.isDuplicateAttachment(filename)) {
Expand Down

0 comments on commit df34ac0

Please sign in to comment.