Skip to content

Commit

Permalink
fix: Open viewer on simple file widget
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Mar 11, 2024
1 parent 53220d0 commit bcfaceb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/files/src/views/ReferenceFileWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ export default defineComponent({
event.stopPropagation()
event.preventDefault()
this.openFilePicker()
} else if (window?.OCA?.Viewer?.mimetypes.indexOf(this.richObject.mimetype) !== -1 && !window?.OCA?.Viewer?.file) {
event.stopPropagation()
event.preventDefault()
window?.OCA?.Viewer?.open({ path: this.richObject.path })
}
},
Expand Down

0 comments on commit bcfaceb

Please sign in to comment.