57 lines
1005 B
Vue
Raw Normal View History

2020-09-28 01:53:26 +02:00
<template>
<div class="download-box">
<h2 v-if="false" class="no-dls-yet mt-2">No downloads yet...</h2>
2020-09-30 20:57:12 +02:00
<DownloadEntry v-for="(nObj, nIdx) in dlcache" :downloadEntry="nObj" :key="nIdx" />
2020-09-28 01:53:26 +02:00
</div>
</template>
<script>
import DownloadEntry from "~/components/DownloadEntry";
import axios from "axios";
export default {
components: {
DownloadEntry,
},
computed: {
2020-09-30 20:57:12 +02:00
dlcache: function() {
return this.$store.state.dlcache.cache;
}
},
data() {
return {
downloads: {type: Array}
};
},
mounted() {
const that = this;
2020-10-02 18:09:51 +02:00
this.$store.dispatch("dlcache/update");
2020-09-30 20:57:12 +02:00
setInterval(function(){
2020-10-02 18:09:51 +02:00
that.$store.dispatch("dlcache/update");
2020-09-30 20:57:12 +02:00
}, 1000);
return;
}
}
</script>
2020-09-28 01:53:26 +02:00
<style lang="scss" scoped>
.download-box {
width: 100%;
min-height: 600px;
border-radius: 5px;
padding: 20px;
2020-09-28 01:53:26 +02:00
background-color: #fff5;
}
.no-dls-yet {
color: theme("colors.text-gray-1");
font-size: 34pt;
text-align: center;
}
</style>