Skip to content

Commit

Permalink
fix: attachment folder picker
Browse files Browse the repository at this point in the history
There were some breaking changes in the dialogs library we missed.

Signed-off-by: Richard Steinmetz <[email protected]>
  • Loading branch information
st3iny committed Jun 25, 2024
1 parent 8ef6476 commit 0b8d036
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
42 changes: 29 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@nextcloud/calendar-availability-vue": "^2.2.1",
"@nextcloud/calendar-js": "^7.0.0",
"@nextcloud/cdav-library": "^1.4.0",
"@nextcloud/dialogs": "^5.3.2",
"@nextcloud/dialogs": "^5.3.4",
"@nextcloud/event-bus": "^3.3.1",
"@nextcloud/initial-state": "^2.2.0",
"@nextcloud/l10n": "^2.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
import debounce from 'debounce'
import { mapState } from 'vuex'
import { getFilePickerBuilder, showError, showSuccess } from '@nextcloud/dialogs'
import logger from '../../../utils/logger.js'

Check warning on line 28 in src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue#L28

Added line #L28 was not covered by tests

export default {
name: 'SettingsAttachmentsFolder',
Expand All @@ -40,8 +41,11 @@ export default {
async selectCalendarFolder() {
const picker = getFilePickerBuilder(t('calendar', 'Select the default location for attachments'))
.setMultiSelect(false)
.setModal(true)
.setType(1)
.addButton({

Check warning on line 44 in src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue#L44

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

Check warning on line 48 in src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue#L46-L48

Added lines #L46 - L48 were not covered by tests
.addMimeTypeFilter('httpd/unix-directory')
.allowDirectories()
.build()
Expand Down

0 comments on commit 0b8d036

Please sign in to comment.