diff --git a/front/src/components/channels/UploadForm.vue b/front/src/components/channels/UploadForm.vue index c4a33d334..5abb1152a 100644 --- a/front/src/components/channels/UploadForm.vue +++ b/front/src/components/channels/UploadForm.vue @@ -34,7 +34,7 @@ interface Events { interface Props { channel: Channel | null, - filter: 'podcast' | 'music' + filter: 'podcast' | 'music' | undefined, } interface QuotaStatus { diff --git a/front/src/ui/modals/Upload.vue b/front/src/ui/modals/Upload.vue index e8d2c1834..fb172765a 100644 --- a/front/src/ui/modals/Upload.vue +++ b/front/src/ui/modals/Upload.vue @@ -22,9 +22,9 @@ import LibraryWidget from '~/components/federation/LibraryWidget.vue' const { t } = useI18n() const store = useStore() -onKeyboardShortcut('u', () => useModal('upload').toggle()) +const { isOpen, toggle } = useModal('upload') -const isOpen = useModal('upload').isOpen +onKeyboardShortcut('u', toggle) type UploadDestination = | { type: 'channel', channel?: Channel | null, filter?: 'podcast' | 'music' } @@ -47,7 +47,7 @@ const pages = ['selectDestination', 'uploadFiles', 'uploadsInProgress'] as const // Step 1 const destinationSelected = (destination: UploadDestination) => - state.value = {...state.value, uploadDestination:destination, page:'uploadFiles' } + state.value = {...state.value, uploadDestination: destination, page:'uploadFiles' } // Wait for pablo: If no channel exists, auto-create an empty channel @@ -76,6 +76,7 @@ const channelUpload = ref(); @@ -87,7 +88,7 @@ const channelUpload = ref(); solid title="Music" icon="bi-upload" - @click="destinationSelected('library')" + @click="destinationSelected({ type: 'library' })" >