Store page width in localStorage
continuous-integration/drone/push Build is passing Details

master
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
1 changed files with 5 additions and 0 deletions

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
}
},