Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fd577d7c5 | ||
|
|
2c8efebe98 | ||
|
|
93c9fb53ac | ||
|
|
5a4d249cf9 | ||
|
|
4cc7bdee37 | ||
|
|
a6af568411 | ||
|
|
576a6a094a |
@@ -174,7 +174,6 @@ class TextPage extends Vue {
|
|||||||
this.$refs.statusBar.style.top = (this.statusBarTop ? 1 : this.realHeight - this.statusBarHeight) + 'px';
|
this.$refs.statusBar.style.top = (this.statusBarTop ? 1 : this.realHeight - this.statusBarHeight) + 'px';
|
||||||
|
|
||||||
this.statusBarColor = this.hex2rgba(this.textColor || '#000000', this.statusBarColorAlpha);
|
this.statusBarColor = this.hex2rgba(this.textColor || '#000000', this.statusBarColorAlpha);
|
||||||
this.statusBarClickable = this.drawHelper.statusBarClickable(this.statusBarTop, this.statusBarHeight);
|
|
||||||
|
|
||||||
//drawHelper
|
//drawHelper
|
||||||
this.drawHelper.realWidth = this.realWidth;
|
this.drawHelper.realWidth = this.realWidth;
|
||||||
@@ -201,6 +200,9 @@ class TextPage extends Vue {
|
|||||||
this.drawHelper.lineHeight = this.lineHeight;
|
this.drawHelper.lineHeight = this.lineHeight;
|
||||||
this.drawHelper.context = this.context;
|
this.drawHelper.context = this.context;
|
||||||
|
|
||||||
|
//statusBar
|
||||||
|
this.statusBarClickable = this.drawHelper.statusBarClickable(this.statusBarTop, this.statusBarHeight);
|
||||||
|
|
||||||
//parsed
|
//parsed
|
||||||
if (this.parsed) {
|
if (this.parsed) {
|
||||||
this.parsed.p = this.p;
|
this.parsed.p = this.p;
|
||||||
|
|||||||
@@ -145,11 +145,13 @@ class BookManager {
|
|||||||
|
|
||||||
|
|
||||||
async deflateWithProgress(data, callback) {
|
async deflateWithProgress(data, callback) {
|
||||||
const chunkSize = 16384;
|
const chunkSize = 128*1024;
|
||||||
const deflator = new utils.pako.Deflate({level: 9});
|
const deflator = new utils.pako.Deflate({level: 5});
|
||||||
|
|
||||||
let chunkTotal = 1 + Math.floor(data.length/chunkSize);
|
let chunkTotal = 1 + Math.floor(data.length/chunkSize);
|
||||||
let chunkNum = 0;
|
let chunkNum = 0;
|
||||||
|
let perc = 0;
|
||||||
|
let prevPerc = 0;
|
||||||
|
|
||||||
for (var i = 0; i < data.length; i += chunkSize) {
|
for (var i = 0; i < data.length; i += chunkSize) {
|
||||||
if ((i + chunkSize) >= data.length) {
|
if ((i + chunkSize) >= data.length) {
|
||||||
@@ -158,8 +160,13 @@ class BookManager {
|
|||||||
deflator.push(data.substring(i, i + chunkSize), false);
|
deflator.push(data.substring(i, i + chunkSize), false);
|
||||||
}
|
}
|
||||||
chunkNum++;
|
chunkNum++;
|
||||||
callback(Math.round(chunkNum/chunkTotal*100));
|
|
||||||
await utils.sleep(1);
|
perc = Math.round(chunkNum/chunkTotal*100);
|
||||||
|
if (perc != prevPerc) {
|
||||||
|
callback(perc);
|
||||||
|
await utils.sleep(1);
|
||||||
|
prevPerc = perc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deflator.err) {
|
if (deflator.err) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const versionHistory = [
|
export const versionHistory = [
|
||||||
{
|
{
|
||||||
showUntil: '2019-06-22',
|
showUntil: '2019-06-22',
|
||||||
header: '0.6.8 (2019-06-23)',
|
header: '0.6.9 (2019-06-23)',
|
||||||
content:
|
content:
|
||||||
`
|
`
|
||||||
<ul>
|
<ul>
|
||||||
@@ -10,7 +10,7 @@ export const versionHistory = [
|
|||||||
<li>добавлены новые варианты анимации перелистывания</li>
|
<li>добавлены новые варианты анимации перелистывания</li>
|
||||||
<li>на страницу загрузки добавлен блок "Поделиться"</li>
|
<li>на страницу загрузки добавлен блок "Поделиться"</li>
|
||||||
<li>улучшены прогрессбары</li>
|
<li>улучшены прогрессбары</li>
|
||||||
<li>исправления недочетов</li>
|
<li>исправления недочетов, небольшие оптимизации</li>
|
||||||
</ul>
|
</ul>
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.6.8",
|
"version": "0.6.9",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user