|
@@ -43,10 +43,8 @@ import _ from 'lodash';
|
|
|
import './TextPage.css';
|
|
|
|
|
|
import * as utils from '../../../share/utils';
|
|
|
-import dynamicCss from '../../../share/dynamicCss';
|
|
|
|
|
|
import bookManager from '../share/bookManager';
|
|
|
-import wallpaperStorage from '../share/wallpaperStorage';
|
|
|
import DrawHelper from './DrawHelper';
|
|
|
import rstore from '../../../store/modules/reader';
|
|
|
import {clickMap} from '../share/clickMap';
|
|
@@ -162,7 +160,7 @@ class TextPage extends Vue {
|
|
|
const wideLetter = 'Щ';
|
|
|
|
|
|
//preloaded fonts
|
|
|
- this.fontList = [`12px ${this.fontName}`];
|
|
|
+ this.fontList = [`12px '${this.fontName}'`];
|
|
|
|
|
|
//widths
|
|
|
this.realWidth = this.$refs.main.clientWidth;
|
|
@@ -252,28 +250,6 @@ class TextPage extends Vue {
|
|
|
//statusBar
|
|
|
this.statusBarClickable = this.drawHelper.statusBarClickable(this.statusBarTop, this.statusBarHeight);
|
|
|
|
|
|
- //wallpaper css, асинхронно
|
|
|
- (async() => {
|
|
|
- const wallpaperDataLength = await wallpaperStorage.getLength();
|
|
|
- if (wallpaperDataLength !== this.wallpaperDataLength) {//оптимизация
|
|
|
- this.wallpaperDataLength = wallpaperDataLength;
|
|
|
-
|
|
|
- let newCss = '';
|
|
|
- for (const wp of this.userWallpapers) {
|
|
|
- const data = await wallpaperStorage.getData(wp.cssClass);
|
|
|
-
|
|
|
- if (!data) {
|
|
|
- //здесь будем восстанавливать данные с сервера
|
|
|
- }
|
|
|
-
|
|
|
- if (data) {
|
|
|
- newCss += `.${wp.cssClass} {background: url(${data}) center; background-size: 100% 100%;}`;
|
|
|
- }
|
|
|
- }
|
|
|
- dynamicCss.replace('wallpapers', newCss);
|
|
|
- }
|
|
|
- })();
|
|
|
-
|
|
|
//parsed
|
|
|
if (this.parsed) {
|
|
|
let wideLine = wideLetter;
|
|
@@ -524,7 +500,7 @@ class TextPage extends Vue {
|
|
|
}
|
|
|
|
|
|
get font() {
|
|
|
- return `${this.fontStyle} ${this.fontWeight} ${this.fontSize}px ${this.fontName}`;
|
|
|
+ return `${this.fontStyle} ${this.fontWeight} ${this.fontSize}px '${this.fontName}'`;
|
|
|
}
|
|
|
|
|
|
onPage1TransitionEnd() {
|