1
0
Fork 0
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:
Lukas Lüftinger 2023-01-14 17:28:13 +01:00
parent b5735c8392
commit d75dbc1b3b

View file

@ -32,7 +32,7 @@ export class BookPlayer {
'dark': { 'body': { 'color': '#d8dadc', 'background': '#000', 'font-size': 'medium' } },
'sepia': { 'body': { 'color': '#d8a262', 'background': '#000', 'font-size': 'medium' } },
'light': { 'body': { 'color': '#000', 'background': '#fff', 'font-size': 'medium' } }
}
};
this.themeOrder = ['dark', 'sepia', 'light'];
this.fontSize = 'medium';
@ -242,27 +242,22 @@ export class BookPlayer {
const newTheme = this.themeOrder[(this.themeOrder.indexOf(this.theme) + 1) % this.themeOrder.length];
this.rendition.themes.select(newTheme);
this.theme = newTheme;
console.dir(this.rendition);
}
}
increaseFontSize() {
if (this.loaded) {
if (this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) {
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)];
this.rendition.themes.fontSize(newFontSize);
this.fontSize = newFontSize;
}
if (this.loaded && this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) {
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)];
this.rendition.themes.fontSize(newFontSize);
this.fontSize = newFontSize;
}
}
decreaseFontSize() {
if (this.loaded) {
if (this.fontSize !== this.fontSizeOrder[0]) {
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)];
this.rendition.themes.fontSize(newFontSize);
this.fontSize = newFontSize;
}
if (this.loaded && this.fontSize !== this.fontSizeOrder[0]) {
const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)];
this.rendition.themes.fontSize(newFontSize);
this.fontSize = newFontSize;
}
}