Frontend: Code clean-up
This commit is contained in:
parent
0ae5b7831d
commit
b1934d2533
2 changed files with 20 additions and 20 deletions
|
@ -22,13 +22,22 @@ import "./css/app.css";
|
||||||
import Event from "pubsub-js";
|
import Event from "pubsub-js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'photoprism',
|
name: 'Photoprism',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
touchStart: 0,
|
touchStart: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
created() {
|
||||||
|
window.addEventListener('touchstart', (e) => this.onTouchStart(e), {passive: true});
|
||||||
|
window.addEventListener('touchmove', (e) => this.onTouchMove(e), {passive: true});
|
||||||
|
this.$config.setVuetify(this.$vuetify);
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
window.removeEventListener('touchstart', (e) => this.onTouchStart(e), false);
|
||||||
|
window.removeEventListener('touchmove', (e) => this.onTouchMove(e), false);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTouchStart(e) {
|
onTouchStart(e) {
|
||||||
this.touchStart = e.touches[0].pageY;
|
this.touchStart = e.touches[0].pageY;
|
||||||
|
@ -49,14 +58,5 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
window.addEventListener('touchstart', (e) => this.onTouchStart(e), {passive: true});
|
|
||||||
window.addEventListener('touchmove', (e) => this.onTouchMove(e), {passive: true});
|
|
||||||
this.$config.setVuetify(this.$vuetify);
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
window.removeEventListener('touchstart', (e) => this.onTouchStart(e), false);
|
|
||||||
window.removeEventListener('touchmove', (e) => this.onTouchMove(e), false);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -22,13 +22,22 @@ import "./css/app.css";
|
||||||
import Event from "pubsub-js";
|
import Event from "pubsub-js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'photoprism',
|
name: 'Photoprism',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
touchStart: 0,
|
touchStart: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
created() {
|
||||||
|
window.addEventListener('touchstart', (e) => this.onTouchStart(e), {passive: true});
|
||||||
|
window.addEventListener('touchmove', (e) => this.onTouchMove(e), {passive: true});
|
||||||
|
this.$config.setVuetify(this.$vuetify);
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
window.removeEventListener('touchstart', (e) => this.onTouchStart(e), false);
|
||||||
|
window.removeEventListener('touchmove', (e) => this.onTouchMove(e), false);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTouchStart(e) {
|
onTouchStart(e) {
|
||||||
this.touchStart = e.touches[0].pageY;
|
this.touchStart = e.touches[0].pageY;
|
||||||
|
@ -49,14 +58,5 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
window.addEventListener('touchstart', (e) => this.onTouchStart(e), {passive: true});
|
|
||||||
window.addEventListener('touchmove', (e) => this.onTouchMove(e), {passive: true});
|
|
||||||
this.$config.setVuetify(this.$vuetify);
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
window.removeEventListener('touchstart', (e) => this.onTouchStart(e), false);
|
|
||||||
window.removeEventListener('touchmove', (e) => this.onTouchMove(e), false);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue