From 81ad5d7a2cc158ceb3592958b8654a88ed591eb1 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 13 Jul 2022 14:47:24 +0700 Subject: [PATCH 1/3] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecentBooksPage/RecentBooksPage.vue | 88 +++++++++++-------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue index 66b6f6dc..55d523c8 100644 --- a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -101,40 +101,44 @@
-
-
- {{ item.num }} -
-
- Читался: {{ item.touchTime }} -
-
- Загружен: {{ item.loadTime }} -
-
-
-
- -
+
{{ item.desc.author }}
{{ item.desc.title }}
-
-
-
+
+
{{ item.desc.textLen }}
-
+ +
+
+
+ +
{{ item.desc.perc }}
-
+
-
+
+
+ {{ item.num }} +
+
+
+ Загружен: {{ item.loadTime }} +
+
+ Читался: {{ item.touchTime }} +
+
+
+
+
@@ -617,12 +621,6 @@ export default vueComponent(RecentBooksPage); white-space: normal; } -.read-bar { - height: 3px; - background-color: #aaaaaa; - margin-bottom: 2px; -} - .even { background-color: #f2f2f2; } @@ -643,18 +641,6 @@ export default vueComponent(RecentBooksPage); transform: rotate(90deg); } -.row-info-top { - line-height: 110%; - border-left: 1px solid #cccccc; - border-bottom: 1px solid #cccccc; -} - -.row-info-bottom { - line-height: 110%; - border: 1px solid #cccccc; - border-right: 0; -} - .tool-button { min-width: 30px; width: 30px; @@ -663,4 +649,28 @@ export default vueComponent(RecentBooksPage); margin: 10px 6px 0px 3px; background-color: white; } + +.row-info-top { + line-height: 110%; + border-left: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; + height: 12px; +} + +.row-info-bottom { + line-height: 110%; + border: 1px solid #cccccc; + border-right: 0; + height: 12px; +} + +.time-info, .row-info-bottom { + color: #888888; +} + +.read-bar { + height: 5px; + background-color: #bbbbbb; + margin-bottom: 2px; +} From 955bcda032695fd346bed69520d3df5042bc70cf Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 13 Jul 2022 15:01:35 +0700 Subject: [PATCH 2/3] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecentBooksPage/RecentBooksPage.vue | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue index 55d523c8..2237e9dd 100644 --- a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -108,35 +108,35 @@
{{ item.desc.title }}
-
-
+
+
{{ item.desc.textLen }}
-
+
-
+
{{ item.desc.perc }}
-
+
-
-
+
+
{{ item.num }}
-
+
Загружен: {{ item.loadTime }}
-
+
Читался: {{ item.touchTime }}
-
+
@@ -650,26 +650,26 @@ export default vueComponent(RecentBooksPage); background-color: white; } -.row-info-top { +.row-info-bottom { line-height: 110%; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; height: 12px; } -.row-info-bottom { +.row-info-top { line-height: 110%; border: 1px solid #cccccc; border-right: 0; height: 12px; } -.time-info, .row-info-bottom { +.time-info, .row-info-top { color: #888888; } .read-bar { - height: 5px; + height: 6px; background-color: #bbbbbb; margin-bottom: 2px; } From 23353a49602de031e35693aa6914345185d57a13 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 13 Jul 2022 16:23:52 +0700 Subject: [PATCH 3/3] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=20=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=20fb2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/share/BookParser.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/client/components/Reader/share/BookParser.js b/client/components/Reader/share/BookParser.js index 025880df..259e0d28 100644 --- a/client/components/Reader/share/BookParser.js +++ b/client/components/Reader/share/BookParser.js @@ -3,6 +3,7 @@ import sax from '../../../../server/core/sax'; import * as utils from '../../../share/utils'; const maxImageLineCount = 100; +const maxParaTextLength = 10000; // defaults const defaultSettings = { @@ -226,13 +227,25 @@ export default class BookParser { paraOffset += len; }; - const growParagraph = (text, len) => { + const growParagraph = (text, len, textRaw) => { if (paraIndex < 0) { newParagraph(); growParagraph(text, len); return; } + //ограничение на размер куска текста в параграфе + if (textRaw && textRaw.length > maxParaTextLength) { + while (textRaw.length > 0) { + const textPart = textRaw.substring(0, maxParaTextLength); + textRaw = textRaw.substring(maxParaTextLength); + + newParagraph(); + growParagraph(textPart, textPart.length); + } + return; + } + if (inSubtitle) { curSubtitle.title += text; } else if (inTitle) { @@ -536,7 +549,7 @@ export default class BookParser { tClose += (center ? '' : ''); if (text != ' ') - growParagraph(`${tOpen}${text}${tClose}`, text.length); + growParagraph(`${tOpen}${text}${tClose}`, text.length, text); else growParagraph(' ', 1); }