Store page width in localStorage
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Bruder 2019-12-22 21:17:30 +00:00
parent 772be9d1d1
commit d02ae9dbb4
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -58,6 +58,10 @@ export default {
},
mounted () {
API.getVolumeInfo(this.$route.params.id, info => (this.info = info))
if (localStorage.pageWidth) {
this.pageWidth = parseInt(localStorage.pageWidth)
}
},
methods: {
setPage (page) {
@ -92,6 +96,7 @@ export default {
changePageWidth (change) {
if (this.pageWidth + change > 0 && this.pageWidth + change <= 100) {
this.pageWidth += change
localStorage.pageWidth = this.pageWidth
}
},