Open file preview in new windows
This commit is contained in:
parent
a09dfa8d9f
commit
8ee4d63622
@ -1,37 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="item"
|
class="item"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
:draggable="isDraggable"
|
:draggable="isDraggable"
|
||||||
@dragstart="dragStart"
|
@dragstart="dragStart"
|
||||||
@dragover="dragOver"
|
@dragover="dragOver"
|
||||||
@drop="drop"
|
@drop="drop"
|
||||||
@click="itemClick"
|
@click="itemClick"
|
||||||
:data-dir="isDir"
|
:data-dir="isDir"
|
||||||
:data-type="type"
|
:data-type="type"
|
||||||
:aria-label="name"
|
:aria-label="name"
|
||||||
:aria-selected="isSelected"
|
:aria-selected="isSelected"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img
|
||||||
v-if="readOnly == undefined && type === 'image' && isThumbsEnabled"
|
v-if="readOnly == undefined && type === 'image' && isThumbsEnabled"
|
||||||
v-lazy="thumbnailUrl"
|
v-lazy="thumbnailUrl"
|
||||||
/>
|
/>
|
||||||
<i v-else class="material-icons"></i>
|
<i v-else class="material-icons"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p class="name">{{ name }}</p>
|
||||||
|
|
||||||
|
<p v-if="isDir" class="size" data-order="-1">—</p>
|
||||||
|
<p v-else class="size" :data-order="humanSize()">{{ humanSize() }}</p>
|
||||||
|
|
||||||
|
<p class="modified">
|
||||||
|
<time :datetime="modified">{{ humanTime() }}</time>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<p class="name">{{ name }}</p>
|
|
||||||
|
|
||||||
<p v-if="isDir" class="size" data-order="-1">—</p>
|
|
||||||
<p v-else class="size" :data-order="humanSize()">{{ humanSize() }}</p>
|
|
||||||
|
|
||||||
<p class="modified">
|
|
||||||
<time :datetime="modified">{{ humanTime() }}</time>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -242,8 +242,10 @@ export default {
|
|||||||
this.addSelected(this.index);
|
this.addSelected(this.index);
|
||||||
},
|
},
|
||||||
open: function () {
|
open: function () {
|
||||||
this.$router.push({ path: this.url });
|
// this.$router.push({ path: this.url });
|
||||||
},
|
const routeData = this.$router.resolve({ path: this.url });
|
||||||
|
window.open(routeData.href);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -344,8 +344,9 @@ export default {
|
|||||||
close() {
|
close() {
|
||||||
this.$store.commit("updateRequest", {});
|
this.$store.commit("updateRequest", {});
|
||||||
|
|
||||||
let uri = url.removeLastDir(this.$route.path) + "/";
|
// let uri = url.removeLastDir(this.$route.path) + "/";
|
||||||
this.$router.push({ path: uri });
|
// this.$router.push({ path: uri });
|
||||||
|
window.close();
|
||||||
},
|
},
|
||||||
download() {
|
download() {
|
||||||
window.open(this.downloadUrl);
|
window.open(this.downloadUrl);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user