GUI Functionality

This commit is contained in:
Leon Etienne (ubuntu wsl)
2020-09-30 20:57:12 +02:00
parent ad7eac5343
commit c33216f2dd
40 changed files with 4727 additions and 44 deletions

View File

@@ -2,7 +2,7 @@
<div class="download-box">
<h2 v-if="false" class="no-dls-yet mt-2">No downloads yet...</h2>
<DownloadEntry v-for="(nObj, nIdx) in downloads_c" :downloadEntry="nObj" :key="nIdx" />
<DownloadEntry v-for="(nObj, nIdx) in dlcache" :downloadEntry="nObj" :key="nIdx" />
</div>
</template>
@@ -17,8 +17,8 @@ export default {
},
computed: {
downloads_c: function() {
return this.downloads;
dlcache: function() {
return this.$store.state.dlcache.cache;
}
},
@@ -30,15 +30,10 @@ export default {
mounted() {
const that = this;
axios.get("/rest-dummies/cache.json", {
responseType: 'text'
}).then(function(response){
if (response.data.status === "OK") {
console.log(response.data);
that.downloads = response.data.cache;
}
});
this.$store.dispatch("dlcache/update", this);
setInterval(function(){
that.$store.dispatch("dlcache/update", that);
}, 1000);
return;
}