Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

kunfei 3 лет назад
Родитель
Сommit
af22eab50b

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookChapter-06bf4dbb.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookChapter-086816ba.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookChapter-0f403887.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookChapter-cf3fdac5.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookShelf-5b28d6eb.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookShelf-803cc512.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/BookShelf-84e79ecf.css


+ 1 - 1
app/src/main/assets/web/vue/assets/config-da530f4f.js → app/src/main/assets/web/vue/assets/config-dd18a77f.js

@@ -1 +1 @@
-import{A as f,u as i}from"./index-aa0dac2e.js";import"./vendor-b9134af1.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=i();let o=JSON.parse(t),s=a.config;o=Object.assign(s,o),a.setConfig(o)}});
+import{A as f,u as i}from"./index-e7b92a96.js";import"./vendor-b9134af1.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=i();let o=JSON.parse(t),s=a.config;o=Object.assign(s,o),a.setConfig(o)}});

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/index-bd50a38f.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/index-e7b92a96.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
app/src/main/assets/web/vue/assets/loading-e922d89e.js


+ 2 - 2
app/src/main/assets/web/vue/index.html

@@ -4,10 +4,10 @@
         <meta charset="UTF-8" />
         <link rel="icon" href="./favicon.ico" />
     <meta name="viewport" content="width=device-width,initial-scale=1.0" />
-      <script type="module" crossorigin src="./assets/index-aa0dac2e.js"></script>
+      <script type="module" crossorigin src="./assets/index-e7b92a96.js"></script>
       <link rel="modulepreload" crossorigin href="./assets/vendor-b9134af1.js">
       <link rel="stylesheet" href="./assets/vendor-5578283d.css">
-      <link rel="stylesheet" href="./assets/index-f9e374f2.css">
+      <link rel="stylesheet" href="./assets/index-bd50a38f.css">
     </head>
 
     <body>

+ 3 - 2
modules/web/.eslintrc-auto-import.json

@@ -78,6 +78,7 @@
     "watch": true,
     "watchEffect": true,
     "watchPostEffect": true,
-    "watchSyncEffect": true
+    "watchSyncEffect": true,
+    "toValue": true
   }
-}
+}

+ 3 - 3
modules/web/scripts/sync.js

@@ -3,7 +3,7 @@ import fs from "node:fs";
 
 const LEGADO_ASSETS_WEB_VUE_DIR = new URL(
   "../../../app/src/main/assets/web/vue",
-  import.meta.url
+  import.meta.url,
 );
 const VUE_DIST_DIR = new URL("../dist", import.meta.url);
 
@@ -33,8 +33,8 @@ fs.rm(
             throw error;
           }
           console.log("> cp success");
-        }
+        },
       );
     });
-  }
+  },
 );

+ 5 - 5
modules/web/src/api/index.js

@@ -30,7 +30,7 @@ const saveBookProgressWithBeacon = (bookProgress) => {
   // 常规请求可能会被取消 使用Fetch keep-alive 或者 navigator.sendBeacon
   navigator.sendBeacon(
     `${import.meta.env.VITE_API || location.origin}/saveBookProgress`,
-    JSON.stringify(bookProgress)
+    JSON.stringify(bookProgress),
   );
 };
 
@@ -41,19 +41,19 @@ const getChapterList = (/** @type {string} */ bookUrl) =>
 
 const getBookContent = (
   /** @type {string} */ bookUrl,
-  /** @type {number} */ chapterIndex
+  /** @type {number} */ chapterIndex,
 ) =>
   ajax.get(
     "/getBookContent?url=" +
       encodeURIComponent(bookUrl) +
       "&index=" +
-      chapterIndex
+      chapterIndex,
   );
 
 const search = (
   /** @type {string} */ searchKey,
   /** @type {(data: string) => void} */ onReceive,
-  /** @type {() => void} */ onFinish
+  /** @type {() => void} */ onFinish,
 ) => {
   // webSocket
   const url = `ws://${hostname}:${Number(port) + 1}/searchBook`;
@@ -97,7 +97,7 @@ const debug = (
   /** @type {string} */ sourceUrl,
   /** @type {string} */ searchKey,
   /** @type {(data: string) => void} */ onReceive,
-  /** @type {() => void} */ onFinish
+  /** @type {() => void} */ onFinish,
 ) => {
   // webSocket
   const url = `ws://${hostname}:${Number(port) + 1}/${

+ 1 - 0
modules/web/src/auto-imports.d.ts

@@ -61,6 +61,7 @@ declare global {
   const toRaw: typeof import('vue')['toRaw']
   const toRef: typeof import('vue')['toRef']
   const toRefs: typeof import('vue')['toRefs']
+  const toValue: typeof import('vue')['toValue']
   const triggerRef: typeof import('vue')['triggerRef']
   const unref: typeof import('vue')['unref']
   const useAttrs: typeof import('vue')['useAttrs']

+ 1 - 1
modules/web/src/components/BookItems.vue

@@ -62,7 +62,7 @@ const getCover = (coverUrl) => {
 };
 
 const subJustify = computed(() =>
-  props.isSearch ? "space-between" : "flex-start"
+  props.isSearch ? "space-between" : "flex-start",
 );
 </script>
 

+ 9 - 5
modules/web/src/components/ChapterContent.vue

@@ -59,7 +59,7 @@ const paragraphRef = ref();
 const scrollToReadedLength = (length) => {
   if (length === 0) return;
   let paragraphIndex = chapterPos.value.findIndex(
-    (wordCount) => wordCount >= length
+    (wordCount) => wordCount >= length,
   );
   if (paragraphIndex === -1) return;
   nextTick(() => {
@@ -81,14 +81,14 @@ onMounted(() => {
           emit(
             "readedLengthChange",
             props.chapterIndex,
-            parseInt(target.dataset.chapterpos)
+            parseInt(target.dataset.chapterpos),
           );
         }
       }
     },
     {
       rootMargin: `0px 0px -${window.innerHeight - 24}px 0px`,
-    }
+    },
   );
   intersectionObserver.observe(titleRef.value);
   paragraphRef.value.forEach((element) => {
@@ -105,8 +105,12 @@ onUnmounted(() => {
 <style lang="scss" scoped>
 .title {
   margin-bottom: 57px;
-  font: 24px / 32px PingFangSC-Regular, HelveticaNeue-Light,
-    "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
+  font:
+    24px / 32px PingFangSC-Regular,
+    HelveticaNeue-Light,
+    "Helvetica Neue Light",
+    "Microsoft YaHei",
+    sans-serif;
 }
 
 p {

+ 6 - 2
modules/web/src/components/PopCatalog.vue

@@ -106,8 +106,12 @@ onUpdated(() => {
       //width: 50%;
       height: 40px;
       cursor: pointer;
-      font: 16px / 40px PingFangSC-Regular, HelveticaNeue-Light,
-        "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
+      font:
+        16px / 40px PingFangSC-Regular,
+        HelveticaNeue-Light,
+        "Helvetica Neue Light",
+        "Microsoft YaHei",
+        sans-serif;
     }
   }
 

+ 10 - 3
modules/web/src/components/ReadSettings.vue

@@ -362,7 +362,10 @@ const uploadConfig = (config) => {
         list-style: none outside none;
 
         i {
-          font: 12px / 16px PingFangSC-Regular, "-apple-system", Simsun;
+          font:
+            12px / 16px PingFangSC-Regular,
+            "-apple-system",
+            Simsun;
           display: inline-block;
           min-width: 48px;
           margin-right: 16px;
@@ -410,8 +413,12 @@ const uploadConfig = (config) => {
           text-align: center;
           vertical-align: middle;
           display: inline-block;
-          font: 14px / 34px PingFangSC-Regular, HelveticaNeue-Light,
-            "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
+          font:
+            14px / 34px PingFangSC-Regular,
+            HelveticaNeue-Light,
+            "Helvetica Neue Light",
+            "Microsoft YaHei",
+            sans-serif;
         }
         .font-item-input {
           width: 168px;

+ 2 - 2
modules/web/src/components/SourceDebug.vue

@@ -31,7 +31,7 @@ watch(
   () => store.isDebuging,
   () => {
     if (store.isDebuging) startDebug();
-  }
+  },
 );
 
 const appendDebugMsg = (msg) => {
@@ -46,7 +46,7 @@ const startDebug = async () => {
     store.currentSourceUrl,
     searchKey.value || store.searchKey,
     appendDebugMsg,
-    store.debugFinish
+    store.debugFinish,
   );
 };
 

+ 3 - 3
modules/web/src/components/ToolBar.vue

@@ -211,8 +211,8 @@ const buttons = ref(
     { name: "↶撤销操作", hotKeys: [], action: undo },
     { name: "↷重做操作", hotKeys: [], action: redo },
     { name: "⇏调试源", hotKeys: [], action: debug },
-    { name: "✓保存源", hotKeys: [], action: saveSource }
-  )
+    { name: "✓保存源", hotKeys: [], action: saveSource },
+  ),
 );
 const hotkeysDialogVisible = ref(true);
 
@@ -250,7 +250,7 @@ watch(
         buttons.value[recordKeyDownIndex.value].hotKeys = pressedKeys;
     });
   },
-  { immediate: true }
+  { immediate: true },
 );
 
 const recordKeyDown = (index) => {

+ 11 - 7
modules/web/src/views/BookChapter.vue

@@ -225,7 +225,7 @@ const checkPageWidth = (readWidth) => {
 };
 watch(
   () => store.config.readWidth,
-  (width) => checkPageWidth(width)
+  (width) => checkPageWidth(width),
 );
 // 顶部底部跳转
 const top = ref();
@@ -285,8 +285,8 @@ const getContent = (index, reloadChapter = true, chapterPos = 0) => {
         chapterData.value.push({ index, content, title });
         store.setShowContent(true);
         throw err;
-      }
-    )
+      },
+    ),
   );
 };
 
@@ -498,8 +498,8 @@ onMounted(() => {
       (err) => {
         ElMessage({ message: "获取书籍目录失败", type: "error" });
         throw err;
-      }
-    )
+      },
+    ),
   );
 });
 
@@ -624,7 +624,9 @@ onUnmounted(() => {
 
 .day {
   :deep(.popup) {
-    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
+    box-shadow:
+      0 2px 4px rgba(0, 0, 0, 0.12),
+      0 0 6px rgba(0, 0, 0, 0.04);
   }
 
   :deep(.tool-icon) {
@@ -645,7 +647,9 @@ onUnmounted(() => {
 
 .night {
   :deep(.popup) {
-    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.48), 0 0 6px rgba(0, 0, 0, 0.16);
+    box-shadow:
+      0 2px 4px rgba(0, 0, 0, 0.48),
+      0 0 6px rgba(0, 0, 0, 0.16);
   }
 
   :deep(.tool-icon) {

+ 5 - 5
modules/web/src/views/BookShelf.vue

@@ -29,7 +29,7 @@
                   readingRecent.name,
                   readingRecent.author,
                   readingRecent.chapterIndex,
-                  readingRecent.chapterPos
+                  readingRecent.chapterPos,
                 )
               "
               :class="{ 'no-point': readingRecent.url == '' }"
@@ -100,7 +100,7 @@ const readingRecent = ref({
 const shelfWrapper = ref(null);
 const { showLoading, closeLoading, loadingWrapper } = useLoading(
   shelfWrapper,
-  "正在获取书籍信息"
+  "正在获取书籍信息",
 );
 
 const books = ref([]);
@@ -144,7 +144,7 @@ const searchBook = () => {
       if (books.value.length == 0) {
         ElMessage.info("搜索结果为空");
       }
-    }
+    },
   );
 };
 
@@ -195,7 +195,7 @@ onMounted(() => {
     store
       .saveBookProgress()
       //确保各种网络情况下同步请求先完成
-      .finally(fetchBookShelfData)
+      .finally(fetchBookShelfData),
   );
 });
 const fetchBookShelfData = () => {
@@ -209,7 +209,7 @@ const fetchBookShelfData = () => {
             var x = a["durChapterTime"] || 0;
             var y = b["durChapterTime"] || 0;
             return y - x;
-          })
+          }),
         );
       } else {
         ElMessage.error(response.data.errorMsg);

Некоторые файлы не были показаны из-за большого количества измененных файлов