Automatisches Reload für Vertretungsplan eingebaut

This commit is contained in:
Daniel Spittank 2021-11-14 23:02:47 +01:00
parent 420b4ef469
commit 57c2f90036

View file

@ -40,6 +40,7 @@
elevation="2"
>
<Vertretungsplan
ref="vp"
vpUrl="/stundenplan/proxy.php?file=G014"
/>
</v-sheet>
@ -54,6 +55,7 @@
elevation="2"
>
<Newsreader
ref="nr"
:feedUrls="['/stundenplan/proxy.php?file=rsslul', '/stundenplan/proxy.php?file=rsssul']"
/>
</v-sheet>
@ -84,16 +86,25 @@ export default {
'Vertretungsplan',
'Stundenpläne'
],
reloadTime: 600000
}),
props: {
msg: String
},
components: {
Newsreader,
Vertretungsplan
},
created() {
setTimeout(this.onTimeout, this.reloadTime)
},
methods: {
onTimeout () {
// Reload-Event einrichten
this.$refs.nr.reload()
this.$refs.vp.reload()
setTimeout(this.onTimeout, this.reloadTime)
}
}
}
</script>