-
+
+
+
+
-
@@ -54,6 +60,10 @@ import Path from 'path'
import { Archive } from 'libarchive.js/main.js'
import { CompressedFile } from 'libarchive.js/src/compressed-file'
+// This is % with respect to the screen width
+const MAX_SCALE = 400
+const MIN_SCALE = 10
+
Archive.init({
workerUrl: '/libarchive/worker-bundle.js'
})
@@ -81,7 +91,8 @@ export default {
showInfoMenu: false,
loadTimeout: null,
loadedFirstPage: false,
- comicMetadata: null
+ comicMetadata: null,
+ scale: 80
}
},
watch: {
@@ -136,6 +147,12 @@ export default {
return p
}) || []
)
+ },
+ canScaleUp() {
+ return this.scale < MAX_SCALE
+ },
+ canScaleDown() {
+ return this.scale > MIN_SCALE
}
},
methods: {
@@ -331,10 +348,37 @@ export default {
orderedImages = orderedImages.concat(noNumImages.map((i) => i.filename))
this.pages = orderedImages
+ },
+ zoomIn() {
+ this.scale += 10
+ },
+ zoomOut() {
+ this.scale -= 10
+ },
+ scroll(event) {
+ const imageContainer = this.$refs.imageContainer
+
+ imageContainer.scrollBy({
+ top: event.deltaY,
+ left: event.deltaX,
+ behavior: 'auto'
+ })
}
},
- mounted() {},
- beforeDestroy() {}
+ mounted() {
+ const prevButton = this.$refs.prevButton
+ const nextButton = this.$refs.nextButton
+
+ prevButton.addEventListener('wheel', this.scroll, { passive: false })
+ nextButton.addEventListener('wheel', this.scroll, { passive: false })
+ },
+ beforeDestroy() {
+ const prevButton = this.$refs.prevButton
+ const nextButton = this.$refs.nextButton
+
+ prevButton.removeEventListener('wheel', this.scroll, { passive: false })
+ nextButton.removeEventListener('wheel', this.scroll, { passive: false })
+ }
}
diff --git a/client/components/stats/YearInReview.vue b/client/components/stats/YearInReview.vue
new file mode 100644
index 00000000..a6bed203
--- /dev/null
+++ b/client/components/stats/YearInReview.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/components/stats/YearInReviewBanner.vue b/client/components/stats/YearInReviewBanner.vue
new file mode 100644
index 00000000..f7736078
--- /dev/null
+++ b/client/components/stats/YearInReviewBanner.vue
@@ -0,0 +1,141 @@
+
+
+
+
+ close
+
+
+
+
+
{{ yearInReviewYear }} Year in Review
+
+
{{ showYearInReview ? 'Hide Year in Review' : 'See Year in Review' }}
+
+
+
+
+
+
+
+
+
+ chevron_left
+ Previous
+
+
+
Share
+
+
+
Your Year in Review ({{ yearInReviewVariant + 1 }})
+
{{ yearInReviewVariant + 1 }}
+
+
+
+
+ Refresh
+ refresh
+
+
+
+ Next
+ chevron_right
+
+
+
+
+
+
+
+ Share
+
+
+
+
+
+
+
+
+ chevron_left
+ Previous
+
+
+
Share
+
+
+
Server Year in Review ({{ yearInReviewServerVariant + 1 }})
+
{{ yearInReviewServerVariant + 1 }}
+
+
+
+
+ Refresh
+ refresh
+
+
+
+ Next
+ chevron_right
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/components/stats/YearInReviewServer.vue b/client/components/stats/YearInReviewServer.vue
new file mode 100644
index 00000000..e6c10fa2
--- /dev/null
+++ b/client/components/stats/YearInReviewServer.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/components/stats/YearInReviewShort.vue b/client/components/stats/YearInReviewShort.vue
new file mode 100644
index 00000000..18b12087
--- /dev/null
+++ b/client/components/stats/YearInReviewShort.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/components/ui/Checkbox.vue b/client/components/ui/Checkbox.vue
index 439d6c7d..58770aa8 100644
--- a/client/components/ui/Checkbox.vue
+++ b/client/components/ui/Checkbox.vue
@@ -2,7 +2,8 @@
{{ label }}
@@ -31,7 +32,8 @@ export default {
type: String,
default: ''
},
- disabled: Boolean
+ disabled: Boolean,
+ partial: Boolean
},
data() {
return {}
diff --git a/client/components/ui/Dropdown.vue b/client/components/ui/Dropdown.vue
index 58155499..632e38ec 100644
--- a/client/components/ui/Dropdown.vue
+++ b/client/components/ui/Dropdown.vue
@@ -1,6 +1,6 @@
-
{{ label }}
+
{{ label }}
{{ selectedText }}
@@ -64,7 +64,7 @@ export default {
},
itemsToShow() {
return this.items.map((i) => {
- if (typeof i === 'string') {
+ if (typeof i === 'string' || typeof i === 'number') {
return {
text: i,
value: i
diff --git a/client/components/ui/InputDropdown.vue b/client/components/ui/InputDropdown.vue
index 852aa997..a9ae7467 100644
--- a/client/components/ui/InputDropdown.vue
+++ b/client/components/ui/InputDropdown.vue
@@ -1,6 +1,6 @@
-
{{ label }}
+
{{ label }}