diff --git a/.gitignore b/.gitignore index 2543443bb..700c700fe 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ /release /tmp node_modules/ +/app/app +/app/google +/app/gradle.properties package-lock.json diff --git a/app/src/main/assets/web/book.html b/app/src/main/assets/web/book.html deleted file mode 100644 index bc7ea6c90..000000000 --- a/app/src/main/assets/web/book.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - 阅读3.0书架 - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/app/src/main/assets/web/bookshelf.html b/app/src/main/assets/web/bookshelf.html index 87ee3bf9b..86639426f 100644 --- a/app/src/main/assets/web/bookshelf.html +++ b/app/src/main/assets/web/bookshelf.html @@ -1,46 +1,39 @@ - - + + - - - - - yd-web-tool - - - - - - - - - - - - - - - - - - - - - - + + 阅读3.0书架 + + - - -
- - + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/app/src/main/assets/web/index.html b/app/src/main/assets/web/index.html index a0a00ef1c..4339538d9 100644 --- a/app/src/main/assets/web/index.html +++ b/app/src/main/assets/web/index.html @@ -359,8 +359,8 @@
(?i) 前缀表示忽略大小写 代码在线运行工具 - 阅读书架(经典) - 阅读书架(新潮) + 阅读书架(经典) + 阅读书架(新潮) diff --git a/app/src/main/assets/web/index.js b/app/src/main/assets/web/index.js index fb2298bbd..7b0ec52a3 100644 --- a/app/src/main/assets/web/index.js +++ b/app/src/main/assets/web/index.js @@ -36,23 +36,28 @@ const RuleJSON = (() => { // 搜索规则 $$('.rules .ruleSearch').forEach(item => searchJson[item.title] = ''); - ruleJson.ruleSearch = JSON.stringify(searchJson); + //ruleJson.ruleSearch = JSON.stringify(searchJson); + ruleJson.ruleSearch = searchJson; // 发现规则 $$('.rules .ruleExplore').forEach(item => exploreJson[item.title] = ''); - ruleJson.ruleExplore = JSON.stringify(exploreJson); + //ruleJson.ruleExplore = JSON.stringify(exploreJson); + ruleJson.ruleExplore = exploreJson; // 详情页规则 $$('.rules .ruleBookInfo').forEach(item => bookInfoJson[item.title] = ''); - ruleJson.ruleBookInfo = JSON.stringify(bookInfoJson); + //ruleJson.ruleBookInfo = JSON.stringify(bookInfoJson); + ruleJson.ruleBookInfo = bookInfoJson; // 目录规则 $$('.rules .ruleToc').forEach(item => tocJson[item.title] = ''); - ruleJson.ruleToc = JSON.stringify(tocJson); + //ruleJson.ruleToc = JSON.stringify(tocJson); + ruleJson.ruleToc = tocJson; // 正文规则 $$('.rules .ruleContent').forEach(item => contentJson[item.title] = ''); - ruleJson.ruleContent = JSON.stringify(contentJson); + //ruleJson.ruleContent = JSON.stringify(contentJson); + ruleJson.ruleContent = contentJson; return ruleJson; })(); @@ -110,38 +115,48 @@ function rule2json() { // 转换搜索规则 let searchJson = {}; - Object.keys(JSON.parse(RuleJSON.ruleSearch)).forEach(key => { + //Object.keys(JSON.parse(RuleJSON.ruleSearch)).forEach(key => { + Object.keys(RuleJSON.ruleSearch).forEach(key => { searchJson[key] = $('#' + 'ruleSearch_' + key).value; }); - RuleJSON.ruleSearch = JSON.stringify(searchJson); + //RuleJSON.ruleSearch = JSON.stringify(searchJson); + RuleJSON.ruleSearch = searchJson; // 转换发现规则 let exploreJson = {}; - Object.keys(JSON.parse(RuleJSON.ruleExplore)).forEach(key => { + //Object.keys(JSON.parse(RuleJSON.ruleExplore)).forEach(key => { + Object.keys(RuleJSON.ruleExplore).forEach(key => { exploreJson[key] = $('#' + 'ruleExplore_' + key).value; }); - RuleJSON.ruleExplore = JSON.stringify(exploreJson); + //RuleJSON.ruleExplore = JSON.stringify(exploreJson); + RuleJSON.ruleExplore = exploreJson; // 转换详情页规则 let bookInfoJson = {}; - Object.keys(JSON.parse(RuleJSON.ruleBookInfo)).forEach(key => { + //Object.keys(JSON.parse(RuleJSON.ruleBookInfo)).forEach(key => { + Object.keys(RuleJSON.ruleBookInfo).forEach(key => { bookInfoJson[key] = $('#' + 'ruleBookInfo_' + key).value; }); - RuleJSON.ruleBookInfo = JSON.stringify(bookInfoJson); + //RuleJSON.ruleBookInfo = JSON.stringify(bookInfoJson); + RuleJSON.ruleBookInfo = bookInfoJson; // 转换目录规则 let tocJson = {}; - Object.keys(JSON.parse(RuleJSON.ruleToc)).forEach(key => { + //Object.keys(JSON.parse(RuleJSON.ruleToc)).forEach(key => { + Object.keys(RuleJSON.ruleToc).forEach(key => { tocJson[key] = $('#' + 'ruleToc_' + key).value; }); - RuleJSON.ruleToc = JSON.stringify(tocJson); + //RuleJSON.ruleToc = JSON.stringify(tocJson); + RuleJSON.ruleToc = tocJson; // 转换正文规则 let contentJson = {}; - Object.keys(JSON.parse(RuleJSON.ruleContent)).forEach(key => { + //Object.keys(JSON.parse(RuleJSON.ruleContent)).forEach(key => { + Object.keys(RuleJSON.ruleContent).forEach(key => { contentJson[key] = $('#' + 'ruleContent_' + key).value; }); - RuleJSON.ruleContent = JSON.stringify(contentJson); + //RuleJSON.ruleContent = JSON.stringify(contentJson); + RuleJSON.ruleContent = contentJson; RuleJSON.lastUpdateTime = RuleJSON.lastUpdateTime == '' ? 0 : parseInt(RuleJSON.lastUpdateTime); RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder); @@ -171,40 +186,50 @@ function json2rule(RuleEditor) { // 转换搜索规则 if (RuleEditor.ruleSearch) { - let searchJson = JSON.parse(RuleEditor.ruleSearch); - Object.keys(JSON.parse(RuleJSON.ruleSearch)).forEach(key => { + //let searchJson = JSON.parse(RuleEditor.ruleSearch); + let searchJson = RuleEditor.ruleSearch; + //Object.keys(JSON.parse(RuleJSON.ruleSearch)).forEach(key => { + Object.keys(RuleJSON.ruleSearch).forEach(key => { $('#' + 'ruleSearch_' + key).value = searchJson[key] ? searchJson[key] : ''; }); } // 转换发现规则 if (RuleEditor.ruleExplore) { - let exploreJson = JSON.parse(RuleEditor.ruleExplore); - Object.keys(JSON.parse(RuleJSON.ruleExplore)).forEach(key => { + //let exploreJson = JSON.parse(RuleEditor.ruleExplore); + //Object.keys(JSON.parse(RuleJSON.ruleExplore)).forEach(key => { + let exploreJson = RuleEditor.ruleExplore; + Object.keys(RuleJSON.ruleExplore).forEach(key => { $('#' + 'ruleExplore_' + key).value = exploreJson[key] ? exploreJson[key] : ''; }); } // 转换详情页规则 if (RuleEditor.ruleBookInfo) { - let bookInfoJson = JSON.parse(RuleEditor.ruleBookInfo); - Object.keys(JSON.parse(RuleJSON.ruleBookInfo)).forEach(key => { + //let bookInfoJson = JSON.parse(RuleEditor.ruleBookInfo); + //Object.keys(JSON.parse(RuleJSON.ruleBookInfo)).forEach(key => { + let bookInfoJson = RuleEditor.ruleBookInfo; + Object.keys(RuleJSON.ruleBookInfo).forEach(key => { $('#' + 'ruleBookInfo_' + key).value = bookInfoJson[key] ? bookInfoJson[key] : ''; }); } // 转换目录规则 if (RuleEditor.ruleToc) { - let tocJson = JSON.parse(RuleEditor.ruleToc); - Object.keys(JSON.parse(RuleJSON.ruleToc)).forEach(key => { + //let tocJson = JSON.parse(RuleEditor.ruleToc); + //Object.keys(JSON.parse(RuleJSON.ruleToc)).forEach(key => { + let tocJson = RuleEditor.ruleToc; + Object.keys(RuleJSON.ruleToc).forEach(key => { $('#' + 'ruleToc_' + key).value = tocJson[key] ? tocJson[key] : ''; }); } // 转换正文规则 if (RuleEditor.ruleContent) { - let contentJson = JSON.parse(RuleEditor.ruleContent); - Object.keys(JSON.parse(RuleJSON.ruleContent)).forEach(key => { + //let contentJson = JSON.parse(RuleEditor.ruleContent); + //Object.keys(JSON.parse(RuleJSON.ruleContent)).forEach(key => { + let contentJson = RuleEditor.ruleContent; + Object.keys(RuleJSON.ruleContent).forEach(key => { $('#' + 'ruleContent_' + key).value = contentJson[key] ? contentJson[key] : ''; }); } diff --git a/app/src/main/assets/web/book.css b/app/src/main/assets/web/new/bookshelf.css similarity index 100% rename from app/src/main/assets/web/book.css rename to app/src/main/assets/web/new/bookshelf.css diff --git a/app/src/main/assets/web/new/bookshelf.html b/app/src/main/assets/web/new/bookshelf.html new file mode 100644 index 000000000..87ee3bf9b --- /dev/null +++ b/app/src/main/assets/web/new/bookshelf.html @@ -0,0 +1,46 @@ + + + + + + + + + yd-web-tool + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/app/src/main/assets/web/book.js b/app/src/main/assets/web/new/bookshelf.js similarity index 100% rename from app/src/main/assets/web/book.js rename to app/src/main/assets/web/new/bookshelf.js diff --git a/app/src/main/assets/web/css/about.f23c15cb.css b/app/src/main/assets/web/new/css/about.f23c15cb.css similarity index 100% rename from app/src/main/assets/web/css/about.f23c15cb.css rename to app/src/main/assets/web/new/css/about.f23c15cb.css diff --git a/app/src/main/assets/web/css/app.e1c0d2e4.css b/app/src/main/assets/web/new/css/app.e1c0d2e4.css similarity index 100% rename from app/src/main/assets/web/css/app.e1c0d2e4.css rename to app/src/main/assets/web/new/css/app.e1c0d2e4.css diff --git a/app/src/main/assets/web/css/chunk-vendors.ad4ff18f.css b/app/src/main/assets/web/new/css/chunk-vendors.ad4ff18f.css similarity index 100% rename from app/src/main/assets/web/css/chunk-vendors.ad4ff18f.css rename to app/src/main/assets/web/new/css/chunk-vendors.ad4ff18f.css diff --git a/app/src/main/assets/web/css/detail.42c41bd6.css b/app/src/main/assets/web/new/css/detail.42c41bd6.css similarity index 100% rename from app/src/main/assets/web/css/detail.42c41bd6.css rename to app/src/main/assets/web/new/css/detail.42c41bd6.css diff --git a/app/src/main/assets/web/fonts/element-icons.535877f5.woff b/app/src/main/assets/web/new/fonts/element-icons.535877f5.woff similarity index 100% rename from app/src/main/assets/web/fonts/element-icons.535877f5.woff rename to app/src/main/assets/web/new/fonts/element-icons.535877f5.woff diff --git a/app/src/main/assets/web/fonts/element-icons.732389de.ttf b/app/src/main/assets/web/new/fonts/element-icons.732389de.ttf similarity index 100% rename from app/src/main/assets/web/fonts/element-icons.732389de.ttf rename to app/src/main/assets/web/new/fonts/element-icons.732389de.ttf diff --git a/app/src/main/assets/web/fonts/iconfont.f9a3fb0e.woff b/app/src/main/assets/web/new/fonts/iconfont.f9a3fb0e.woff similarity index 100% rename from app/src/main/assets/web/fonts/iconfont.f9a3fb0e.woff rename to app/src/main/assets/web/new/fonts/iconfont.f9a3fb0e.woff diff --git a/app/src/main/assets/web/fonts/popfont.f39ecc1a.ttf b/app/src/main/assets/web/new/fonts/popfont.f39ecc1a.ttf similarity index 100% rename from app/src/main/assets/web/fonts/popfont.f39ecc1a.ttf rename to app/src/main/assets/web/new/fonts/popfont.f39ecc1a.ttf diff --git a/app/src/main/assets/web/fonts/shelffont.6c094b6d.ttf b/app/src/main/assets/web/new/fonts/shelffont.6c094b6d.ttf similarity index 100% rename from app/src/main/assets/web/fonts/shelffont.6c094b6d.ttf rename to app/src/main/assets/web/new/fonts/shelffont.6c094b6d.ttf diff --git a/app/src/main/assets/web/img/icons/android-chrome-192x192.png b/app/src/main/assets/web/new/img/icons/android-chrome-192x192.png similarity index 100% rename from app/src/main/assets/web/img/icons/android-chrome-192x192.png rename to app/src/main/assets/web/new/img/icons/android-chrome-192x192.png diff --git a/app/src/main/assets/web/img/icons/android-chrome-512x512.png b/app/src/main/assets/web/new/img/icons/android-chrome-512x512.png similarity index 100% rename from app/src/main/assets/web/img/icons/android-chrome-512x512.png rename to app/src/main/assets/web/new/img/icons/android-chrome-512x512.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon-120x120.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon-120x120.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon-120x120.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon-120x120.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon-152x152.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon-152x152.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon-152x152.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon-152x152.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon-180x180.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon-180x180.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon-180x180.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon-180x180.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon-60x60.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon-60x60.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon-60x60.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon-60x60.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon-76x76.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon-76x76.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon-76x76.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon-76x76.png diff --git a/app/src/main/assets/web/img/icons/apple-touch-icon.png b/app/src/main/assets/web/new/img/icons/apple-touch-icon.png similarity index 100% rename from app/src/main/assets/web/img/icons/apple-touch-icon.png rename to app/src/main/assets/web/new/img/icons/apple-touch-icon.png diff --git a/app/src/main/assets/web/img/icons/favicon-16x16.png b/app/src/main/assets/web/new/img/icons/favicon-16x16.png similarity index 100% rename from app/src/main/assets/web/img/icons/favicon-16x16.png rename to app/src/main/assets/web/new/img/icons/favicon-16x16.png diff --git a/app/src/main/assets/web/img/icons/favicon-32x32.png b/app/src/main/assets/web/new/img/icons/favicon-32x32.png similarity index 100% rename from app/src/main/assets/web/img/icons/favicon-32x32.png rename to app/src/main/assets/web/new/img/icons/favicon-32x32.png diff --git a/app/src/main/assets/web/img/icons/msapplication-icon-144x144.png b/app/src/main/assets/web/new/img/icons/msapplication-icon-144x144.png similarity index 100% rename from app/src/main/assets/web/img/icons/msapplication-icon-144x144.png rename to app/src/main/assets/web/new/img/icons/msapplication-icon-144x144.png diff --git a/app/src/main/assets/web/img/icons/mstile-150x150.png b/app/src/main/assets/web/new/img/icons/mstile-150x150.png similarity index 100% rename from app/src/main/assets/web/img/icons/mstile-150x150.png rename to app/src/main/assets/web/new/img/icons/mstile-150x150.png diff --git a/app/src/main/assets/web/img/icons/safari-pinned-tab.svg b/app/src/main/assets/web/new/img/icons/safari-pinned-tab.svg similarity index 100% rename from app/src/main/assets/web/img/icons/safari-pinned-tab.svg rename to app/src/main/assets/web/new/img/icons/safari-pinned-tab.svg diff --git a/app/src/main/assets/web/img/noCover.b5c48bc1.jpeg b/app/src/main/assets/web/new/img/noCover.b5c48bc1.jpeg similarity index 100% rename from app/src/main/assets/web/img/noCover.b5c48bc1.jpeg rename to app/src/main/assets/web/new/img/noCover.b5c48bc1.jpeg diff --git a/app/src/main/assets/web/js/about.2589b5fe.js b/app/src/main/assets/web/new/js/about.2589b5fe.js similarity index 100% rename from app/src/main/assets/web/js/about.2589b5fe.js rename to app/src/main/assets/web/new/js/about.2589b5fe.js diff --git a/app/src/main/assets/web/js/about~detail.08c372e6.js b/app/src/main/assets/web/new/js/about~detail.08c372e6.js similarity index 100% rename from app/src/main/assets/web/js/about~detail.08c372e6.js rename to app/src/main/assets/web/new/js/about~detail.08c372e6.js diff --git a/app/src/main/assets/web/js/app.b25f3cec.js b/app/src/main/assets/web/new/js/app.b25f3cec.js similarity index 100% rename from app/src/main/assets/web/js/app.b25f3cec.js rename to app/src/main/assets/web/new/js/app.b25f3cec.js diff --git a/app/src/main/assets/web/js/chunk-vendors.b3838a2d.js b/app/src/main/assets/web/new/js/chunk-vendors.b3838a2d.js similarity index 100% rename from app/src/main/assets/web/js/chunk-vendors.b3838a2d.js rename to app/src/main/assets/web/new/js/chunk-vendors.b3838a2d.js diff --git a/app/src/main/assets/web/js/detail.043d6e39.js b/app/src/main/assets/web/new/js/detail.043d6e39.js similarity index 100% rename from app/src/main/assets/web/js/detail.043d6e39.js rename to app/src/main/assets/web/new/js/detail.043d6e39.js diff --git a/app/src/main/assets/web/manifest.json b/app/src/main/assets/web/new/manifest.json similarity index 100% rename from app/src/main/assets/web/manifest.json rename to app/src/main/assets/web/new/manifest.json