paginar 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -9749,6 +9749,14 @@ function loadSavedSettings(settings) {
9749
9749
  ) {
9750
9750
  state.textFont = savedSettings.textFont;
9751
9751
  }
9752
+
9753
+ if (savedSettings.mode === 'dark') {
9754
+ const htmlRoot = document.querySelector('html');
9755
+ if (htmlRoot) {
9756
+ htmlRoot.classList.remove("light");
9757
+ htmlRoot.classList.add("dark");
9758
+ }
9759
+ }
9752
9760
  }
9753
9761
  }
9754
9762
 
@@ -9766,6 +9774,18 @@ function setFontSize(value) {
9766
9774
 
9767
9775
  function setMode(value) {
9768
9776
  state.mode = value;
9777
+
9778
+ const htmlRoot = document.querySelector('html');
9779
+ if (htmlRoot) {
9780
+ if (htmlRoot.classList.contains("dark")) {
9781
+ htmlRoot.classList.remove("dark");
9782
+ htmlRoot.classList.add("light");
9783
+
9784
+ } else {
9785
+ htmlRoot.classList.remove("light");
9786
+ htmlRoot.classList.add("dark");
9787
+ }
9788
+ }
9769
9789
  }
9770
9790
 
9771
9791
  function saveSettings() {
@@ -10265,13 +10285,17 @@ const { columns } = useReaderSettings;
10265
10285
  const { currentPage } = usePagination;
10266
10286
 
10267
10287
  const el = ref(null);
10288
+
10289
+ const { width } = useWindowSize();
10268
10290
  const { distanceX } = usePointerSwipe(el, {
10269
10291
  onSwipeEnd() {
10270
- if (distanceX.value > 150) {
10271
- usePagination.next();
10272
- }
10273
- if (distanceX.value < -150) {
10274
- usePagination.prev();
10292
+ if (width.value < 600) {
10293
+ if (distanceX.value > 100) {
10294
+ usePagination.next();
10295
+ }
10296
+ if (distanceX.value < -100) {
10297
+ usePagination.prev();
10298
+ }
10275
10299
  }
10276
10300
  }
10277
10301
  });