mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix linting issues
This commit is contained in:
parent
b5735c8392
commit
d75dbc1b3b
1 changed files with 9 additions and 14 deletions
|
@ -32,7 +32,7 @@ export class BookPlayer {
|
||||||
'dark': { 'body': { 'color': '#d8dadc', 'background': '#000', 'font-size': 'medium' } },
|
'dark': { 'body': { 'color': '#d8dadc', 'background': '#000', 'font-size': 'medium' } },
|
||||||
'sepia': { 'body': { 'color': '#d8a262', 'background': '#000', 'font-size': 'medium' } },
|
'sepia': { 'body': { 'color': '#d8a262', 'background': '#000', 'font-size': 'medium' } },
|
||||||
'light': { 'body': { 'color': '#000', 'background': '#fff', 'font-size': 'medium' } }
|
'light': { 'body': { 'color': '#000', 'background': '#fff', 'font-size': 'medium' } }
|
||||||
}
|
};
|
||||||
this.themeOrder = ['dark', 'sepia', 'light'];
|
this.themeOrder = ['dark', 'sepia', 'light'];
|
||||||
|
|
||||||
this.fontSize = 'medium';
|
this.fontSize = 'medium';
|
||||||
|
@ -242,27 +242,22 @@ export class BookPlayer {
|
||||||
const newTheme = this.themeOrder[(this.themeOrder.indexOf(this.theme) + 1) % this.themeOrder.length];
|
const newTheme = this.themeOrder[(this.themeOrder.indexOf(this.theme) + 1) % this.themeOrder.length];
|
||||||
this.rendition.themes.select(newTheme);
|
this.rendition.themes.select(newTheme);
|
||||||
this.theme = newTheme;
|
this.theme = newTheme;
|
||||||
console.dir(this.rendition);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
increaseFontSize() {
|
increaseFontSize() {
|
||||||
if (this.loaded) {
|
if (this.loaded && this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) {
|
||||||
if (this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) {
|
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)];
|
||||||
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)];
|
this.rendition.themes.fontSize(newFontSize);
|
||||||
this.rendition.themes.fontSize(newFontSize);
|
this.fontSize = newFontSize;
|
||||||
this.fontSize = newFontSize;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
decreaseFontSize() {
|
decreaseFontSize() {
|
||||||
if (this.loaded) {
|
if (this.loaded && this.fontSize !== this.fontSizeOrder[0]) {
|
||||||
if (this.fontSize !== this.fontSizeOrder[0]) {
|
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)];
|
||||||
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)];
|
this.rendition.themes.fontSize(newFontSize);
|
||||||
this.rendition.themes.fontSize(newFontSize);
|
this.fontSize = newFontSize;
|
||||||
this.fontSize = newFontSize;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue