From d02ae9dbb46cbc521d7f1029d1e9a1ecf37523e4 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 22 Dec 2019 21:17:30 +0000 Subject: [PATCH] Store page width in localStorage --- frontend/src/views/Reader.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/views/Reader.vue b/frontend/src/views/Reader.vue index 3385dcb..119e21c 100644 --- a/frontend/src/views/Reader.vue +++ b/frontend/src/views/Reader.vue @@ -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 } },