Compare commits
18 Commits
0.12.1
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9809e6661 | ||
|
|
083151460a | ||
|
|
c8f97ef386 | ||
|
|
c9a22a5eaf | ||
|
|
f926732070 | ||
|
|
3fbe6e9d9b | ||
|
|
225230381f | ||
|
|
b58d3a1b8b | ||
|
|
ffedce4351 | ||
|
|
a4fdb67913 | ||
|
|
6ba46421b9 | ||
|
|
d201961046 | ||
|
|
614a7f9da7 | ||
|
|
113ab3e596 | ||
|
|
c95870bfe5 | ||
|
|
e69e9335f9 | ||
|
|
fd21cd77dd | ||
|
|
d1880acaf9 |
@@ -14,6 +14,7 @@ module.exports = {
|
|||||||
entry: [`${clientDir}/main.js`],
|
entry: [`${clientDir}/main.js`],
|
||||||
output: {
|
output: {
|
||||||
publicPath: '/app/',
|
publicPath: '/app/',
|
||||||
|
clean: true
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ module.exports = merge(baseWpConfig, {
|
|||||||
devtool: 'inline-source-map',
|
devtool: 'inline-source-map',
|
||||||
output: {
|
output: {
|
||||||
path: `${publicDir}/app`,
|
path: `${publicDir}/app`,
|
||||||
filename: 'bundle.js'
|
filename: 'bundle.js',
|
||||||
|
clean: true
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
@@ -38,6 +39,6 @@ module.exports = merge(baseWpConfig, {
|
|||||||
template: `${clientDir}/index.html.template`,
|
template: `${clientDir}/index.html.template`,
|
||||||
filename: `${publicDir}/index.html`
|
filename: `${publicDir}/index.html`
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin({patterns: [{from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
|
new CopyWebpackPlugin({patterns: [{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ module.exports = merge(baseWpConfig, {
|
|||||||
mode: 'production',
|
mode: 'production',
|
||||||
output: {
|
output: {
|
||||||
path: `${publicDir}/app_new`,
|
path: `${publicDir}/app_new`,
|
||||||
filename: 'bundle.[contenthash].js'
|
filename: 'bundle.[contenthash].js',
|
||||||
|
clean: true
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
@@ -54,7 +55,7 @@ module.exports = merge(baseWpConfig, {
|
|||||||
filename: `${publicDir}/index.html`
|
filename: `${publicDir}/index.html`
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin({patterns:
|
new CopyWebpackPlugin({patterns:
|
||||||
[{from: `${clientDir}/assets/*`, to: `${publicDir}/`, context: `${clientDir}/assets` }]
|
[{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/` }]
|
||||||
}),
|
}),
|
||||||
new GenerateSW({
|
new GenerateSW({
|
||||||
cacheId: 'liberama',
|
cacheId: 'liberama',
|
||||||
|
|||||||
@@ -271,6 +271,10 @@ body, html, #app {
|
|||||||
font: normal 12pt ReaderDefault;
|
font: normal 12pt ReaderDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notify-margin {
|
||||||
|
margin-top: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
.dborder {
|
.dborder {
|
||||||
border: 2px solid magenta !important;
|
border: 2px solid magenta !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,7 +292,6 @@ class Reader {
|
|||||||
libsActive = false;
|
libsActive = false;
|
||||||
recentBooksActive = false;
|
recentBooksActive = false;
|
||||||
clickControlActive = false;
|
clickControlActive = false;
|
||||||
offlineModeActive = false;
|
|
||||||
settingsActive = false;
|
settingsActive = false;
|
||||||
|
|
||||||
clickMapActive = false;
|
clickMapActive = false;
|
||||||
@@ -807,6 +806,10 @@ class Reader {
|
|||||||
return this.reader.toolBarActive;
|
return this.reader.toolBarActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get offlineModeActive() {
|
||||||
|
return this.reader.offlineModeActive;
|
||||||
|
}
|
||||||
|
|
||||||
mostRecentBook() {
|
mostRecentBook() {
|
||||||
const result = bookManager.mostRecentBook();
|
const result = bookManager.mostRecentBook();
|
||||||
this.mostRecentBookReactive = result;
|
this.mostRecentBookReactive = result;
|
||||||
@@ -1019,7 +1022,7 @@ class Reader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
offlineModeToggle() {
|
offlineModeToggle() {
|
||||||
this.offlineModeActive = !this.offlineModeActive;
|
this.commit('reader/setOfflineModeActive', !this.offlineModeActive);
|
||||||
this.$refs.serverStorage.offlineModeActive = this.offlineModeActive;
|
this.$refs.serverStorage.offlineModeActive = this.offlineModeActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
export const versionHistory = [
|
export const versionHistory = [
|
||||||
|
{
|
||||||
|
version: '0.12.2',
|
||||||
|
releaseDate: '2022-09-04',
|
||||||
|
showUntil: '2022-09-11',
|
||||||
|
content:
|
||||||
|
`
|
||||||
|
<ul>
|
||||||
|
<li>исправлен баг с формой для доната, показывалась каждый день, а не каждый месяц</li>
|
||||||
|
<li>автор приносит извинения за доставленные неудобства</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
`
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
version: '0.12.1',
|
version: '0.12.1',
|
||||||
releaseDate: '2022-09-01',
|
releaseDate: '2022-09-01',
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ class Notify {
|
|||||||
icon,
|
icon,
|
||||||
actions: [{icon: 'la la-times notify-button-icon', color: 'black'}],
|
actions: [{icon: 'la la-times notify-button-icon', color: 'black'}],
|
||||||
html: true,
|
html: true,
|
||||||
|
classes: 'notify-margin',
|
||||||
|
|
||||||
message:
|
message:
|
||||||
`<div style="max-width: 350px;">
|
`<div style="max-width: 350px">
|
||||||
${caption}
|
${caption}
|
||||||
<div style="color: ${messageColor}; overflow-wrap: break-word; word-wrap: break-word;">${message}</div>
|
<div style="color: ${messageColor}; overflow-wrap: break-word; word-wrap: break-word;">${message}</div>
|
||||||
</div>`
|
</div>`
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function formatDate(d, format) {
|
|||||||
case 'coDate':
|
case 'coDate':
|
||||||
return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
|
return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
|
||||||
case 'coMonth':
|
case 'coMonth':
|
||||||
return `${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
|
return `${(d.getMonth() + 1).toString().padStart(2, '0')}`;
|
||||||
case 'noDate':
|
case 'noDate':
|
||||||
return `${d.getDate().toString().padStart(2, '0')}.${(d.getMonth() + 1).toString().padStart(2, '0')}.${d.getFullYear()}`;
|
return `${d.getDate().toString().padStart(2, '0')}.${(d.getMonth() + 1).toString().padStart(2, '0')}.${d.getFullYear()}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ const libsDefaults = {
|
|||||||
// initial state
|
// initial state
|
||||||
const state = {
|
const state = {
|
||||||
toolBarActive: true,
|
toolBarActive: true,
|
||||||
|
offlineModeActive: false,
|
||||||
serverSyncEnabled: false,
|
serverSyncEnabled: false,
|
||||||
serverStorageKey: '',
|
serverStorageKey: '',
|
||||||
profiles: {},
|
profiles: {},
|
||||||
@@ -280,6 +281,9 @@ const mutations = {
|
|||||||
setToolBarActive(state, value) {
|
setToolBarActive(state, value) {
|
||||||
state.toolBarActive = value;
|
state.toolBarActive = value;
|
||||||
},
|
},
|
||||||
|
setOfflineModeActive(state, value) {
|
||||||
|
state.offlineModeActive = value;
|
||||||
|
},
|
||||||
setServerSyncEnabled(state, value) {
|
setServerSyncEnabled(state, value) {
|
||||||
state.serverSyncEnabled = value;
|
state.serverSyncEnabled = value;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ git clone https://github.com/bookpauk/liberama
|
|||||||
### node.js
|
### node.js
|
||||||
```
|
```
|
||||||
sudo apt install -y curl
|
sudo apt install -y curl
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||||
sudo apt install -y nodejs
|
sudo apt install -y nodejs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
28
package-lock.json
generated
28
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "CC0-1.0",
|
"license": "CC0-1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -6161,9 +6161,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/loader-utils": {
|
"node_modules/loader-utils": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"big.js": "^5.2.2",
|
"big.js": "^5.2.2",
|
||||||
@@ -9654,9 +9654,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-style-loader/node_modules/loader-utils": {
|
"node_modules/vue-style-loader/node_modules/loader-utils": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||||
"integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
|
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"big.js": "^5.2.2",
|
"big.js": "^5.2.2",
|
||||||
@@ -15075,9 +15075,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"loader-utils": {
|
"loader-utils": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"big.js": "^5.2.2",
|
"big.js": "^5.2.2",
|
||||||
@@ -17615,9 +17615,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loader-utils": {
|
"loader-utils": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||||
"integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
|
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"big.js": "^5.2.2",
|
"big.js": "^5.2.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"author": "Book Pauk <bookpauk@gmail.com>",
|
"author": "Book Pauk <bookpauk@gmail.com>",
|
||||||
"license": "CC0-1.0",
|
"license": "CC0-1.0",
|
||||||
"repository": "bookpauk/liberama",
|
"repository": "bookpauk/liberama",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
const https = require('https');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const utils = require('./utils');
|
const utils = require('./utils');
|
||||||
|
|
||||||
@@ -16,6 +17,9 @@ class FileDownloader {
|
|||||||
'user-agent': userAgent,
|
'user-agent': userAgent,
|
||||||
timeout: 300*1000,
|
timeout: 300*1000,
|
||||||
},
|
},
|
||||||
|
httpsAgent: new https.Agent({
|
||||||
|
rejectUnauthorized: false // решение проблемы 'unable to verify the first certificate' для некоторых сайтов с валидным сертификатом
|
||||||
|
}),
|
||||||
responseType: 'stream',
|
responseType: 'stream',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ class ReaderWorker {
|
|||||||
let convertFilename = '';
|
let convertFilename = '';
|
||||||
|
|
||||||
const overLoadMes = 'Слишком большая очередь загрузки. Пожалуйста, попробуйте позже.';
|
const overLoadMes = 'Слишком большая очередь загрузки. Пожалуйста, попробуйте позже.';
|
||||||
|
const fileNotFoundMes = 'Файл не найден';
|
||||||
const overLoadErr = new Error(overLoadMes);
|
const overLoadErr = new Error(overLoadMes);
|
||||||
|
|
||||||
let q = null;
|
let q = null;
|
||||||
@@ -184,26 +185,33 @@ class ReaderWorker {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
log(LM_ERR, `url: ${url}, downloadedFilename: ${downloadedFilename}`);
|
||||||
log(LM_ERR, e.stack);
|
log(LM_ERR, e.stack);
|
||||||
let mes = e.message.split('|FORLOG|');
|
let mes = e.message.split('|FORLOG|');
|
||||||
if (mes[1])
|
if (mes[1])
|
||||||
log(LM_ERR, mes[0] + mes[1]);
|
log(LM_ERR, mes[0] + mes[1]);
|
||||||
log(LM_ERR, `downloadedFilename: ${downloadedFilename}`);
|
|
||||||
|
|
||||||
mes = mes[0];
|
mes = mes[0];
|
||||||
if (mes == 'abort')
|
if (mes == 'abort')
|
||||||
mes = overLoadMes;
|
mes = overLoadMes;
|
||||||
|
if (mes.indexOf('ENOTDIR') >= 0)
|
||||||
|
mes = fileNotFoundMes;
|
||||||
|
|
||||||
wState.set({state: 'error', error: mes});
|
wState.set({state: 'error', error: mes});
|
||||||
} finally {
|
} finally {
|
||||||
//clean
|
//clean
|
||||||
if (q)
|
try {
|
||||||
q.ret();
|
if (q)
|
||||||
if (decompDir)
|
q.ret();
|
||||||
await fs.remove(decompDir);
|
if (decompDir)
|
||||||
if (downloadedFilename && !isUploaded)
|
await fs.remove(decompDir);
|
||||||
await fs.remove(downloadedFilename);
|
if (downloadedFilename && !isUploaded)
|
||||||
if (convertFilename)
|
await fs.remove(downloadedFilename);
|
||||||
await fs.remove(convertFilename);
|
if (convertFilename)
|
||||||
|
await fs.remove(convertFilename);
|
||||||
|
} catch (e) {
|
||||||
|
log(LM_ERR, `Remove error: ${e.stack}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user