Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: attachment folder picker #6082

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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 @@ -11,7 +11,7 @@
<div class="form-group">
<NcInputField v-model="attachmentsFolder"
type="text"
:id="inputId"

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

View workflow job for this annotation

GitHub Actions / NPM lint

Attribute ":id" should go before "type"
:label-outside="true"
@input="debounceSaveAttachmentsFolder(attachmentsFolder)"
@change="debounceSaveAttachmentsFolder(attachmentsFolder)"
Expand All @@ -27,9 +27,9 @@
import debounce from 'debounce'
import { getFilePickerBuilder, showError, showSuccess } from '@nextcloud/dialogs'
import { randomId } from '../../../utils/randomId.js'

import useSettingsStore from '../../../store/settings.js'
import { mapStores, mapState } from 'pinia'
import logger from '../../../utils/logger.js'

export default {
name: 'SettingsAttachmentsFolder',
Expand All @@ -49,8 +49,11 @@
async selectCalendarFolder() {
const picker = getFilePickerBuilder(t('calendar', 'Select the default location for attachments'))
.setMultiSelect(false)
.setModal(true)
.setType(1)
.addButton({
label: t('calendar', 'Pick'),
type: 'primary',
callback: (nodes) => logger.debug('Picked attachment folder', { nodes }),
})

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

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue#L53-L56

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