Fix issues from FilePreview v0.2

This commit is contained in:
Miloš Holba
2020-08-20 18:50:07 +02:00
parent 59ca45e9b1
commit f79973e922
6 changed files with 206 additions and 170 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div>
<div v-if="filteredFiles.length > 1">
<chevron-left-icon
class="prev"
@click.prevent="prev"
@@ -16,6 +16,7 @@
<script>
import { events } from '@/bus';
import { mapGetters } from "vuex";
import { ChevronLeftIcon, ChevronRightIcon } from 'vue-feather-icons';
export default {
@@ -23,6 +24,19 @@ export default {
ChevronLeftIcon,
ChevronRightIcon,
},
computed: {
...mapGetters(["fileInfoDetail", "data"]),
filteredFiles() {
let filteredData = []
this.data.filter((element) => {
if (element.type == this.fileInfoDetail.type) {
filteredData.push(element);
}
});
return filteredData
},
},
methods: {
next: function() {
@@ -59,9 +73,11 @@ export default {
}
.next {
right: 0;
margin-right: 10px;
}
.prev {
left: 0;
margin-left: 10px;
}
@media (prefers-color-scheme: dark) {