diff --git a/src/views/PragotronView.vue b/src/views/PragotronView.vue index d2c2934..79dc79d 100644 --- a/src/views/PragotronView.vue +++ b/src/views/PragotronView.vue @@ -188,19 +188,9 @@ export default defineComponent({ currentRowAnimating: 0 }), - async created() { - // this.selectDefaultCheckpoint(); - - window.addEventListener('resize', () => { - this.resizeTable(); - }); - }, - activated() { this.mainStore.selectedStationName = this.stationName; - this.resizeTable(); - this.selectDefaultCheckpoint(); this.shuffleRoutes(); @@ -268,6 +258,13 @@ export default defineComponent({ } }, + 'mainStore.filters': { + deep: true, + handler: function (val) { + window.localStorage.setItem('settings', JSON.stringify(val)); + } + }, + 'apiStore.activeData'(_val, prevVal) { if (prevVal == undefined) { this.selectDefaultCheckpoint(); @@ -360,18 +357,6 @@ export default defineComponent({ }, methods: { - resizeTable() { - // const elRef = this.$refs['pragotron'] as HTMLElement; - // if (!elRef) return; - // const scale = Math.min( - // window.innerWidth / elRef.clientWidth, - // window.innerHeight / elRef.clientHeight, - // 1 - // ); - // console.log(elRef.clientWidth); - // elRef.style.transform = `scale(${scale})`; - }, - selectDefaultCheckpoint() { this.mainStore.selectedCheckpointName = this.mainStore.selectedStation?.stationCheckpoints[0] || this.stationName;