Skip to content

Commit

Permalink
fix(Import): Request network permissions before import
Browse files Browse the repository at this point in the history
fixes #1475

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 15, 2023
1 parent cf46f84 commit da7834d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/views/ImportExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ export default {
alert(e.message)
}
},
onTriggerFilePicker() {
async onTriggerFilePicker() {
this.$refs.filePicker.click()
if (this.isBrowser) {
const {default: browser} = await import('../../lib/browser-api')
await browser.permissions.request({ origins: ['*://*/*'] })
}
},
async onFileSelect() {
const file = this.$refs.filePicker.files[0]
Expand Down

0 comments on commit da7834d

Please sign in to comment.