Skip to content

Commit

Permalink
Disable downloading files from albums as it it not supported yet
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Sep 20, 2022
1 parent 0299bbd commit bd038c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/shared_albums.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,21 @@ describe('Manage shared albums', () => {
cy.logout()
})

it('Download a file from a shared album', () => {
xit('Download a file from a shared album', () => {
cy.goToSharedAlbum('shared_album_test2')
cy.selectMedia([0])
cy.downloadSelection()
cy.unselectMedia([0])
})

it('Download multiple files from a shared album', () => {
xit('Download multiple files from a shared album', () => {
cy.goToSharedAlbum('shared_album_test2')
cy.selectMedia([1, 2])
cy.downloadSelection()
cy.unselectMedia([1, 2])
})

it('Download all files from a shared album', () => {
xit('Download all files from a shared album', () => {
cy.goToSharedAlbum('shared_album_test2')
cy.downloadAllFiles()
})
Expand Down
20 changes: 10 additions & 10 deletions src/views/SharedAlbumContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
</NcButton>

<NcActions :force-menu="true" :aria-label="t('photos', 'Open actions menu')">
<ActionDownload v-if="albumFileIds.length > 0"
<!-- <ActionDownload v-if="albumFileIds.length > 0"
:selected-file-ids="albumFileIds"
:title="t('photos', 'Download all files in album')">
<DownloadMultiple slot="icon" />
</ActionDownload>
</ActionDownload> -->

<NcActionButton :close-after-click="true"
@click="handleDeleteAlbum">
Expand All @@ -70,9 +70,9 @@
<template v-if="selectedFileIds.length > 0">
<NcActionSeparator />

<ActionDownload :selected-file-ids="selectedFileIds" :title="t('photos', 'Download selected files')">
<!-- <ActionDownload :selected-file-ids="selectedFileIds" :title="t('photos', 'Download selected files')">
<Download slot="icon" />
</ActionDownload>
</ActionDownload> -->

<NcActionButton :close-after-click="true"
@click="handleRemoveFilesFromAlbum(selectedFileIds)">
Expand Down Expand Up @@ -120,8 +120,8 @@ import Plus from 'vue-material-design-icons/Plus'
import Delete from 'vue-material-design-icons/Delete'
import ImagePlus from 'vue-material-design-icons/ImagePlus'
import Close from 'vue-material-design-icons/Close'
import Download from 'vue-material-design-icons/Download'
import DownloadMultiple from 'vue-material-design-icons/DownloadMultiple'
// import Download from 'vue-material-design-icons/Download'
// import DownloadMultiple from 'vue-material-design-icons/DownloadMultiple'

import { NcActions, NcActionButton, NcButton, NcModal, NcEmptyContent, NcActionSeparator, isMobile } from '@nextcloud/vue'
import { getCurrentUser } from '@nextcloud/auth'
Expand All @@ -132,7 +132,7 @@ import FetchFilesMixin from '../mixins/FetchFilesMixin.js'
import AbortControllerMixin from '../mixins/AbortControllerMixin.js'
import CollectionContent from '../components/Collection/CollectionContent.vue'
import HeaderNavigation from '../components/HeaderNavigation.vue'
import ActionDownload from '../components/Actions/ActionDownload.vue'
// import ActionDownload from '../components/Actions/ActionDownload.vue'
import FilesPicker from '../components/FilesPicker.vue'
import logger from '../services/logger.js'
import client from '../services/DavClient.js'
Expand All @@ -145,8 +145,8 @@ export default {
MapMarker,
Plus,
Close,
Download,
DownloadMultiple,
// Download,
// DownloadMultiple,
Delete,
ImagePlus,
NcEmptyContent,
Expand All @@ -156,7 +156,7 @@ export default {
NcButton,
NcModal,
CollectionContent,
ActionDownload,
// ActionDownload,
FilesPicker,
HeaderNavigation,
},
Expand Down

0 comments on commit bd038c8

Please sign in to comment.