Skip to content

Commit

Permalink
fix: new file menu context
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Aug 23, 2023
1 parent 4ef50b5 commit 03f8d83
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/components/UploadPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:key="entry.id"
:icon="entry.iconClass"
class="upload-picker__menu-entry"
@click="entry.handler">
@click="onActionClick(entry)">
<template #icon>
<NcIconSvgWrapper :svg="entry.iconSvgInline" />
</template>
Expand Down Expand Up @@ -72,8 +72,7 @@
</template>

<script>
import { getNewFileMenuEntries, Folder } from '@nextcloud/files'
import { getUploader } from '../index.js'
import { getNewFileMenuEntries, Folder, getNavigation } from '@nextcloud/files'
import makeEta from 'simple-eta'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
Expand All @@ -86,9 +85,10 @@ import Cancel from 'vue-material-design-icons/Cancel.vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import Upload from 'vue-material-design-icons/Upload.vue'
import { getUploader } from '../index.js'
import { Status } from '../uploader.ts'
import { Status as UploadStatus } from '../upload.js'
import { t } from '../utils/l10n.ts'
import { Status } from '../uploader.ts'
import logger from '../utils/logger.ts'
export default {
Expand Down Expand Up @@ -280,6 +280,11 @@ export default {
this.uploadManager.destination = destination
this.newFileMenuEntries = getNewFileMenuEntries(destination)
},
onActionClick(action) {
const navigation = getNavigation()
action.handler(this.destination, navigation?.active)
},
},
}
</script>
Expand Down

0 comments on commit 03f8d83

Please sign in to comment.