Compare commits

...

9 Commits

Author SHA1 Message Date
Book Pauk
f926732070 Merge branch 'release/0.12.2-2' 2022-10-05 15:16:24 +07:00
Book Pauk
3fbe6e9d9b Улучшение обработки ошибок 2022-10-05 15:15:26 +07:00
Book Pauk
225230381f Добавлена чистка output перед сборкой 2022-10-01 13:39:02 +07:00
Book Pauk
b58d3a1b8b Поправки параметров CopyWebpackPlugin 2022-09-20 20:21:41 +07:00
Book Pauk
ffedce4351 Поправки обработки ошибок сервера 2022-09-12 15:23:22 +07:00
Book Pauk
a4fdb67913 Merge tag '0.12.2-1' into develop
0.12.2-1
2022-09-04 21:44:06 +07:00
Book Pauk
6ba46421b9 Merge branch 'release/0.12.2-1' 2022-09-04 21:43:54 +07:00
Book Pauk
d201961046 Поправка положения notify-сообщений 2022-09-04 21:42:50 +07:00
Book Pauk
614a7f9da7 Merge tag '0.12.2' into develop
0.12.2
2022-09-04 21:22:39 +07:00
6 changed files with 30 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ module.exports = {
entry: [`${clientDir}/main.js`],
output: {
publicPath: '/app/',
clean: true
},
module: {

View File

@@ -16,7 +16,8 @@ module.exports = merge(baseWpConfig, {
devtool: 'inline-source-map',
output: {
path: `${publicDir}/app`,
filename: 'bundle.js'
filename: 'bundle.js',
clean: true
},
module: {
@@ -38,6 +39,6 @@ module.exports = merge(baseWpConfig, {
template: `${clientDir}/index.html.template`,
filename: `${publicDir}/index.html`
}),
new CopyWebpackPlugin({patterns: [{from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
new CopyWebpackPlugin({patterns: [{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
]
});

View File

@@ -18,7 +18,8 @@ module.exports = merge(baseWpConfig, {
mode: 'production',
output: {
path: `${publicDir}/app_new`,
filename: 'bundle.[contenthash].js'
filename: 'bundle.[contenthash].js',
clean: true
},
module: {
rules: [
@@ -54,7 +55,7 @@ module.exports = merge(baseWpConfig, {
filename: `${publicDir}/index.html`
}),
new CopyWebpackPlugin({patterns:
[{from: `${clientDir}/assets/*`, to: `${publicDir}/`, context: `${clientDir}/assets` }]
[{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/` }]
}),
new GenerateSW({
cacheId: 'liberama',

View File

@@ -271,6 +271,10 @@ body, html, #app {
font: normal 12pt ReaderDefault;
}
.notify-margin {
margin-top: 55px;
}
.dborder {
border: 2px solid magenta !important;
}

View File

@@ -27,9 +27,10 @@ class Notify {
icon,
actions: [{icon: 'la la-times notify-button-icon', color: 'black'}],
html: true,
classes: 'notify-margin',
message:
`<div style="max-width: 350px;">
`<div style="max-width: 350px">
${caption}
<div style="color: ${messageColor}; overflow-wrap: break-word; word-wrap: break-word;">${message}</div>
</div>`

View File

@@ -83,6 +83,7 @@ class ReaderWorker {
let convertFilename = '';
const overLoadMes = 'Слишком большая очередь загрузки. Пожалуйста, попробуйте позже.';
const fileNotFoundMes = 'Файл не найден';
const overLoadErr = new Error(overLoadMes);
let q = null;
@@ -184,26 +185,33 @@ class ReaderWorker {
})();
} catch (e) {
log(LM_ERR, `url: ${url}, downloadedFilename: ${downloadedFilename}`);
log(LM_ERR, e.stack);
let mes = e.message.split('|FORLOG|');
if (mes[1])
log(LM_ERR, mes[0] + mes[1]);
log(LM_ERR, `downloadedFilename: ${downloadedFilename}`);
mes = mes[0];
if (mes == 'abort')
mes = overLoadMes;
if (mes.indexOf('ENOTDIR') >= 0)
mes = fileNotFoundMes;
wState.set({state: 'error', error: mes});
} finally {
//clean
if (q)
q.ret();
if (decompDir)
await fs.remove(decompDir);
if (downloadedFilename && !isUploaded)
await fs.remove(downloadedFilename);
if (convertFilename)
await fs.remove(convertFilename);
try {
if (q)
q.ret();
if (decompDir)
await fs.remove(decompDir);
if (downloadedFilename && !isUploaded)
await fs.remove(downloadedFilename);
if (convertFilename)
await fs.remove(convertFilename);
} catch (e) {
log(LM_ERR, `Remove error: ${e.stack}`);
}
}
}