File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
apps/files_versions/src/components Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1919 <div >
2020 <NcListItem class =" version"
2121 :title =" versionLabel"
22- :href = " downloadURL "
22+ @click = " openVersion "
2323 :force-display-actions =" true"
2424 data-files-versions-version >
2525 <template #icon >
@@ -122,6 +122,7 @@ import { translate } from '@nextcloud/l10n'
122122import { joinPaths } from ' @nextcloud/paths'
123123import { generateUrl } from ' @nextcloud/router'
124124import { loadState } from ' @nextcloud/initial-state'
125+ import { emit } from ' @nextcloud/event-bus'
125126
126127export default {
127128 name: ' Version' ,
@@ -238,6 +239,19 @@ export default {
238239 },
239240 },
240241 methods: {
242+ openVersion (e ) {
243+ e .preventDefault ()
244+ const openVersionEvent = {
245+ preventDefault: false ,
246+ fileInfo: this .fileInfo ,
247+ version: this .version ,
248+ }
249+ emit (' files_versions:view:open' , openVersionEvent)
250+ if (openVersionEvent .preventDefault ) {
251+ return
252+ }
253+ window .location .href = this .downloadURL
254+ },
241255 openVersionLabelModal () {
242256 this .showVersionLabelForm = true
243257 this .$nextTick (() => {
You can’t perform that action at this time.
0 commit comments